I have a a function definition that can be compiled with both MinGW or Visual C compiler. I need to define flags for the compiler.
See below, functionA has different definition for Visual C and MinGW compiler.
This is how I define flag in the .pro file
QMAKE_CFLAGS += -O2 -DVISUAL_STUDIO
QMAKE_CFLAGS += -O2 -DVISUAL_STUDIO
To copy to clipboard, switch view to plain text mode
This is in my code
#ifdef VISUAL_STUDIO
int functionA(
...........
#else
static inline int functionA(
..........
#ifdef VISUAL_STUDIO
int functionA(
...........
#else
static inline int functionA(
..........
To copy to clipboard, switch view to plain text mode
I get the following two warning:
:-1: warning: D9024 : unrecognized source file type 'VISUAL_STUDIO', object file assumed
:-1: warning: D9027 : source file 'VISUAL_STUDIO' ignored
Any idea how to do this?
Bookmarks