Results 1 to 3 of 3

Thread: Compile flags in QT

  1. #1
    Join Date
    Feb 2010
    Posts
    30
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Windows

    Default Compile flags in QT

    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.

  2. #2
    Join Date
    Jul 2009
    Location
    Enschede, Netherlands
    Posts
    462
    Thanked 69 Times in 67 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Compile flags in QT

    In your project file, add
    Qt Code:
    1. QMAKE_CXXFLAGS+=-fkeep-inline-functions
    To copy to clipboard, switch view to plain text mode 

    Can't say if this will solve your issue though.
    Horse sense is the thing that keeps horses from betting on people. --W.C. Fields

    Ask Smart Questions

  3. #3
    Join Date
    Feb 2010
    Posts
    30
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Windows

    Default Re: Compile flags in QT

    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?

Similar Threads

  1. Does QDataWidgetMapper use flags?
    By Netwiz in forum Qt Programming
    Replies: 1
    Last Post: 29th October 2021, 01:56
  2. remove flags?
    By konvex in forum Qt Programming
    Replies: 5
    Last Post: 18th March 2015, 03:26
  3. Is flags a typdef?
    By chuckle in forum Qt Programming
    Replies: 1
    Last Post: 13th September 2007, 23:26
  4. OR combination flags in QAbstractFileEngine
    By pmaktieh.sirhc in forum Qt Programming
    Replies: 2
    Last Post: 21st March 2007, 13:31
  5. Flags not doing the work
    By chaosgeorge in forum Qt Programming
    Replies: 1
    Last Post: 24th November 2006, 00:35

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.