Results 1 to 8 of 8

Thread: Use FLTK libraries with QtCreator

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Sep 2011
    Posts
    1,241
    Thanks
    3
    Thanked 127 Times in 126 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Use FLTK libraries with QtCreator

    why dont you ask on a fltk forum? This is a Qt programming forum, and your question has nothing to do with qt programming.
    If you have a problem, CUT and PASTE your code. Do not retype or simplify it. Give a COMPLETE and COMPILABLE example of your problem. Otherwise we are all guessing the problem from a fabrication where relevant details are often missing.

  2. #2
    Join Date
    Apr 2010
    Location
    Italia
    Posts
    149
    Thanked 2 Times in 2 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Use FLTK libraries with QtCreator

    Ok, I wrote in the forum FLTK - general. Let's see what they tell me. But then you have to act on the file .pro of QtCreator to build the project

  3. #3
    Join Date
    Apr 2010
    Location
    Italia
    Posts
    149
    Thanked 2 Times in 2 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default [RESOLVED] Re: Use FLTK libraries with QtCreator

    Found the solution. Having the libraries FLTK 1.3.1 compiled (it can be easily done using the shell of MSYS (rxvt) with MinGW 4.6.2), this is to give the MSYS (rxvt) shell prompt the following command:

    Qt Code:
    1. fltk-config --ldstaticflags
    To copy to clipboard, switch view to plain text mode 

    in this way we obtain the flags necessary for the compilation of any example of using FLTK MinGW and consequently amche our beloved Qt Creator 2.6.0
    In my case for example I got:
    Qt Code:
    1. -mwindows /usr/local/lib/libfltk.a -lole32 -luuid -lcomctl32
    To copy to clipboard, switch view to plain text mode 
    Please note that:
    Qt Code:
    1. /usr/local/
    To copy to clipboard, switch view to plain text mode 
    is in
    Qt Code:
    1. C:\MinGW\msys\1.0\local
    To copy to clipboard, switch view to plain text mode 
    So in the project file of Qt we get:
    Qt Code:
    1. #------------------------------------------------
    2. #
    3. # Uso librerie FLTK 1.3.1
    4. #
    5. #------------------------------------------------
    6. INCLUDEPATH += C:/MinGW/include
    7.  
    8. LIBS += -mwindows C:/MinGW/lib/libfltk.a \
    9. C:/MinGW/lib/libfltk_forms.a \
    10. C:/MinGW/lib/libfltk_gl.a \
    11. C:/MinGW/lib/libfltk_images.a \
    12. C:/MinGW/lib/libfltk_jpeg.a \
    13. C:/MinGW/lib/libfltk_png.a \
    14. C:/MinGW/lib/libfltk_z.a \
    15. -lole32 -luuid -lcomctl32
    To copy to clipboard, switch view to plain text mode 
    For the curious here is the procedure to follow to compile the libraries FLTK 1.3.1 with MinGW 4.6.2 using MSYS (rxvt):
    1- copy the file fltk-1.3.1-source.tar.gz in /home/your-username/ of msys\1.0\ then give the command to
    MSYS shell (rxvt):
    Qt Code:
    1. tar xvzf fltk-1.3.1-source.tar.gz
    To copy to clipboard, switch view to plain text mode 
    2-
    Qt Code:
    1. cd fltk-1.3.1
    To copy to clipboard, switch view to plain text mode 
    3-
    Qt Code:
    1. ./configure & make & make install
    To copy to clipboard, switch view to plain text mode 
    will be installed in /usr/local/lib, /usr/local/include/FL, /usr/local/bin, /usr/local/share. Please note that /usr/local is C:\MinGW\msys\1.0\local
    Have fun with FLTK
    Last edited by giorgik; 14th December 2012 at 08:40. Reason: updated contents

Similar Threads

  1. QtCreator and external libraries
    By GiuseppeBonfa in forum Qt Tools
    Replies: 6
    Last Post: 21st May 2012, 23:26
  2. Replies: 0
    Last Post: 7th February 2012, 09:02
  3. Qt Creator Qtcreator and Pjsip error adding statically libraries
    By kazuya in forum Qt Tools
    Replies: 0
    Last Post: 16th November 2011, 15:49
  4. Replies: 4
    Last Post: 5th November 2011, 01:38
  5. QtCreator 2.0 crashes application working in QtCreator 1.3
    By been_1990 in forum Qt Programming
    Replies: 2
    Last Post: 21st September 2010, 12:58

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
  •  
Qt is a trademark of The Qt Company.