I am writing code in QT that can be compiled with both MinGW and Visual C compiler. I am using define like this:
I have defined VISUAL_STUDIO In my project file as follows:
QMAKE_CFLAGS_DEBUG += -O2 VISUAL_STUDIO
QMAKE_CFLAGS += -O2 -DVISUAL_STUDIO
QMAKE_CFLAGS_DEBUG += -O2 VISUAL_STUDIO
QMAKE_CFLAGS += -O2 -DVISUAL_STUDIO
To copy to clipboard, switch view to plain text mode
I get multiple definition error for the following code
#ifdef VISUAL_STUDIO
int FUNCA(
#else
static inline int FUNCA(
#endif
Pkt_t *pkt
)
#ifdef VISUAL_STUDIO
int FUNCA(
#else
static inline int FUNCA(
#endif
Pkt_t *pkt
)
To copy to clipboard, switch view to plain text mode
Can anybody help me with this or any idea to do it in different was will be appreciated?
Bookmarks