Results 1 to 4 of 4

Thread: Qt + Eclipse + MinGW + Windows: How to include libraries?

  1. #1
    Join Date
    Oct 2007
    Posts
    27
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Qt + Eclipse + MinGW + Windows: How to include libraries?

    Hello,

    I am using Qt with Eclipse and MinGW compiler for C++ under Windows. I can't load any libraries into my project. I just copy/paste libraries in project directory, and Eclipse recognize libs, but when I try to access to them it say "Resource not found". I edited .pro file with line
    LIBS += -LD:/Darko/projects/PCapp -lFTCJTAG -lFTD2XX
    where D:/Darko/projects/PCapp is directory witch contains libs, and FTCJTAG.lib and FTD2XX.lib are libs. When I try to use functions witch are in this libraries compiler returns me an error: "undefined reference to `_imp__JTAG_GetNumDevices@4'", and I think it's linker error. I also need to load dlls, and I go to Project Properties->C/C++ Project Paths->Libraries and there I add a dll files, but it doesn't work too. When I use this libs and dlls in MS Visual C++ it work perfectly.
    What I have to do?
    Sorry about my English.

    Thanks!

  2. #2
    Join Date
    Jan 2006
    Location
    Munich, Germany
    Posts
    4,714
    Thanks
    21
    Thanked 418 Times in 411 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default Re: Qt + Eclipse + MinGW + Windows: How to include libraries?

    In general, minGW and Eclipse are not "Qt aware" IDE's.
    However, Eclipse has a Qt plugin which should make it possible to manage the project and the moc'ing (but I didn't test it so I can't comment on that).

    In general, you need first to generate a Makefile out of the pro file, and to give that make file to the IDE you are working with.
    Calling qmake in such cases has to be out side of the IDE. (Again, Eclips with Qt plugin might allow this from Eclipse)

    When I try to use functions witch are in this libraries compiler returns me an error: "undefined reference to `_imp__JTAG_GetNumDevices@4'", and I think it's linker error.
    Did you include the headers of these libs?

    AFAIK under windows, the DLL's them selves are only used in runtime.
    For building, you need the corresponding *.lib's.
    ==========================signature=============== ==================
    S.O.L.I.D principles (use them!):
    https://en.wikipedia.org/wiki/SOLID_...iented_design)

    Do you write clean code? - if you are TDD'ing then maybe, if not, your not writing clean code.

  3. #3
    Join Date
    Oct 2007
    Posts
    27
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Qt + Eclipse + MinGW + Windows: How to include libraries?

    Yes, I included *.h files in my project. I will try that with make file. What exactly I need to edit in make file to include libraries? Is that -l"name of lib" for each lib or there is something else?
    Thanks

  4. #4
    Join Date
    Jan 2006
    Location
    Munich, Germany
    Posts
    4,714
    Thanks
    21
    Thanked 418 Times in 411 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default Re: Qt + Eclipse + MinGW + Windows: How to include libraries?

    I will try that with make file.
    Not a good idea.
    The make file is generate by qmake based on the pro file.
    ==========================signature=============== ==================
    S.O.L.I.D principles (use them!):
    https://en.wikipedia.org/wiki/SOLID_...iented_design)

    Do you write clean code? - if you are TDD'ing then maybe, if not, your not writing clean code.

Similar Threads

  1. Qt + Portmidi in Windows... libraries problem
    By hipogrito in forum Newbie
    Replies: 2
    Last Post: 19th June 2009, 00:01
  2. QApplication: no such file or directory
    By jochen_r in forum Newbie
    Replies: 13
    Last Post: 15th November 2008, 21:46
  3. Error: Using Multiple files
    By 3nc31 in forum Qt Programming
    Replies: 1
    Last Post: 22nd November 2007, 09:23
  4. Can't create an object : initialisation problem ?
    By Nyphel in forum Qt Programming
    Replies: 5
    Last Post: 12th March 2007, 09:07
  5. use button from another Window
    By raphaelf in forum Qt Programming
    Replies: 11
    Last Post: 2nd March 2006, 20:31

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.