Results 1 to 2 of 2
Hi All,
i want to know what's the meaning of #ifdef _USRDLL
(i think it is related to MFC but not sure)
here is my code
Code:
Code:
/*******predictor.cpp*****/
#ifdef ...
- 11-25-2011 #1Just Joined!
- Join Date
- Sep 2011
- Posts
- 4
#ifdef _USRDLL
Hi All,
i want to know what's the meaning of #ifdef _USRDLL
(i think it is related to MFC but not sure)
here is my code
Code:
Code:/*******predictor.cpp*****/ #ifdef _USRDLL #include "../../corenumeric/inc/statuscommunicator.h" CStatusCommunicator gPipe; #endif . .//here i have my pgm code
when i execute the pgm compiler is reporting error as
predictor.cpp:26: error: âgPipeâ was not declared in this scope
this error is due to failure of condition of #ifdef _USRDLL
plz guide me how to overcome this error.......
waiting for your reply........
- 11-28-2011 #2Linux Guru
- Join Date
- Apr 2009
- Location
- I can be found either 40 miles west of Chicago, or in a galaxy far, far away.
- Posts
- 8,975
Yes, this seems to be related to being compiled in an MS environment. I think you need an #else branch in the #ifdef/#endif block that "translates" the MS-specific stuff into ones that will work in Linux. This may not be easy, or even possible without major recoding and/or re-architecting of the code. Writing code that works equally well on MS and Linux/Unix systems requires that the basic code be platform-neutral, which yours is not. I have been doing this for 30 years, so I am familiar with the issues. At the least, you will need to look at the MS statuscommunicator.h file, and determine how to translate its contents into "Linux/Unix" constructs.
Good luck!
P.S. FWIW, it is MUCH easier to go from Linux/Unix compatible code to Windows, vs. the other way around...Sometimes, real fast is almost as good as real time.
Just remember, Semper Gumbi - always be flexible!


Reply With Quote
