Click here to Skip to main content
15,894,410 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: pkg_config ?? Pin
Vaclav_19-Nov-16 9:29
Vaclav_19-Nov-16 9:29 
GeneralRe: pkg_config ?? Pin
Richard MacCutchan19-Nov-16 12:03
mveRichard MacCutchan19-Nov-16 12:03 
AnswerRe: pkg_config ?? Pin
markkuk20-Nov-16 23:39
markkuk20-Nov-16 23:39 
GeneralRe: pkg_config ?? Pin
Vaclav_21-Nov-16 4:45
Vaclav_21-Nov-16 4:45 
GeneralRe: pkg_config ?? Pin
Vaclav_29-Nov-16 8:35
Vaclav_29-Nov-16 8:35 
Question#ifdef...#endif is not working in Resource(.rc) file Pin
Member 1233569517-Nov-16 17:20
Member 1233569517-Nov-16 17:20 
AnswerRe: #ifdef...#endif is not working in Resource(.rc) file Pin
Richard MacCutchan17-Nov-16 20:50
mveRichard MacCutchan17-Nov-16 20:50 
AnswerRe: #ifdef...#endif is not working in Resource(.rc) file Pin
leon de boer17-Nov-16 20:54
leon de boer17-Nov-16 20:54 
Expanding Richards answer the resource compiler does not have access to the standard C preprocessor predefined macros because you haven't included any of the standard headers Smile | :)

_WIN64 whilst a standard predefined macro in the C preprocessor is not predefined in the resource compiler. So your #ifdef _WIN64 is failing because _WIN64 doesn't exist to the resource compiler.

And trying to do so you usually need to use RC invoke to go around some stuff the header files contain:
RC with predefined Macros (Windows)[^]

So Resource compiler starts with exactly one macro RC_INVOKED and includes only macros that are included in it's include section. Once upon a time there was an undocumented _WIN32 but I think even that has gone these days.

So the more usual trick is to use the build options tab on the resource file to preset a define. On your resource build you have configurations and you can add predefined macros.
Config Properties -> Resources -> General In the macros tab add _WIN64 manually to the 64 bit build. Add _WIN32 to the 32 bit build tab.
In vino veritas

GeneralRe: #ifdef...#endif is not working in Resource(.rc) file Pin
Member 1233569517-Nov-16 21:43
Member 1233569517-Nov-16 21:43 
QuestionCMake - syntax error ? Pin
Vaclav_16-Nov-16 6:11
Vaclav_16-Nov-16 6:11 
AnswerRe: CMake - syntax error ? Pin
Jochen Arndt16-Nov-16 7:21
professionalJochen Arndt16-Nov-16 7:21 
GeneralRe: CMake - syntax error ? Pin
Vaclav_16-Nov-16 14:52
Vaclav_16-Nov-16 14:52 
GeneralRe: CMake - syntax error ? Pin
leon de boer16-Nov-16 18:10
leon de boer16-Nov-16 18:10 
GeneralRe: CMake - syntax error ? Pin
Jochen Arndt16-Nov-16 21:07
professionalJochen Arndt16-Nov-16 21:07 
QuestionSOLVED CMake whose "source directory" ? Pin
Vaclav_14-Nov-16 4:19
Vaclav_14-Nov-16 4:19 
AnswerRe: CMake whose "source directory" ? Pin
Chris Losinger14-Nov-16 4:25
professionalChris Losinger14-Nov-16 4:25 
GeneralRe: CMake whose "source directory" ? Pin
Vaclav_14-Nov-16 4:32
Vaclav_14-Nov-16 4:32 
GeneralRe: CMake whose "source directory" ? Pin
Chris Losinger14-Nov-16 4:46
professionalChris Losinger14-Nov-16 4:46 
GeneralRe: CMake whose "source directory" ? Pin
Vaclav_14-Nov-16 5:10
Vaclav_14-Nov-16 5:10 
AnswerRe: CMake whose "source directory" ? Pin
Albert Holguin15-Nov-16 7:22
professionalAlbert Holguin15-Nov-16 7:22 
GeneralRe: CMake whose "source directory" ? Pin
Vaclav_15-Nov-16 9:27
Vaclav_15-Nov-16 9:27 
AnswerRe: CMake whose "source directory" ? Pin
Vaclav_17-Nov-16 5:11
Vaclav_17-Nov-16 5:11 
QuestionEclipse IDE GCC linker options ? Pin
Vaclav_13-Nov-16 4:40
Vaclav_13-Nov-16 4:40 
AnswerRe: Eclipse IDE GCC linker options ? Pin
NotPolitcallyCorrect13-Nov-16 7:00
NotPolitcallyCorrect13-Nov-16 7:00 
AnswerRe: Eclipse IDE GCC linker options ? Pin
leon de boer13-Nov-16 15:17
leon de boer13-Nov-16 15:17 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.