I am writing code to 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:
Qt Code:
  1. QMAKE_CFLAGS_DEBUG += -O2 VISUAL_STUDIO
  2. QMAKE_CFLAGS += -O2 -DVISUAL_STUDIO
To copy to clipboard, switch view to plain text mode 

I get multiple definition error for the following code

Qt Code:
  1. #ifdef VISUAL_STUDIO
  2. int FUNCA(
  3. #else
  4. static inline int FUNCA(
  5. #endif
  6. Pkt_t *pkt
  7. )
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?