PDA

View Full Version : Compile flags in QT



Frej
1st February 2010, 14:40
Hi I think I need to change compile flags for my QT project since I after adding this line of code:
typedef DLLEXPORT BOOL (__stdcall *sInit_PT)(void);
I get the error:
simcan.cpp:37: warning: 'dllexport' attribute ignored

I think the solution would be to add the flag:
QMAKE_CXXFLAGS= "-fkeep-inline-functions"

But how do I add this flag? I tries adding it to the makefile. But no change. There has to be a way to add compile flags in creator?
Very grateful for any tips.

franz
1st February 2010, 18:39
In your project file, add

QMAKE_CXXFLAGS+=-fkeep-inline-functions

Can't say if this will solve your issue though.

Frej
2nd February 2010, 09:43
This didn´t solve the problem. This error is disabling me from using functionality defined in the dll. So my code is:
#define DLLEXPORT __declspec(dllexport)
typedef DLLEXPORT BOOL (__stdcall *sInit_PT)(void);
Generates the following error:
simcan.cpp:38: warning: 'dllexport' attribute ignored

Any ideas for a solution?