Results 1 to 2 of 2

Thread: Configuring project with 3rd party api

  1. #1
    Join Date
    May 2014
    Posts
    13
    Qt products
    Qt5
    Platforms
    Windows

    Question Configuring project with 3rd party api

    I have been developing a Windows based Qt application for some time now utilizing Qt Creator. It is my first C++ application and I am getting to a point where I am struggling. I really need some help.

    The application requires a 3rd party API. The API came with all the necessary instructions on how to set up the Qt application with the proper include path and necessary libs so it has been going smoothly. Now I am at a point where I need to generate custom shape files that will be used by the main application. Based on research in a lot of forums I chose the GDAL/OGR API to accomplish this. I even found a coding example for reading and writing shapefiles using OGR. My problem is I can't find any documentation that helps me properly set up the project to be able to use the API. When I try to build some test code that uses GDAL I get errors for missing lib files or missing obj files. Without specific documentation I don't have a clue how to determine how to set up the project. So far I haven't been able to find any. That's why I'm asking for help on the Qt forum.

    I am primarily a Java developer and used to having everything in JAR files. So I am still learning a lot about C++. For C++ development I think I understand the relationship between the code, the lib files and the DLLs but I am totally lost trying to determine how to put a project together for specific APIs. I understand that the directory containing the 3rd party headers are added to the include path. I also understand that the necessary DLLs are placed either in the path or directly in the directory where the exe file is. I think my main problem is understanding how to identify which lib files match which header files. Or am I totally off base here?

    If someone is familiar with using GDAL with Qt would you please give me some assistance with my GDAL setup? If not, would someone please give me some pointers as to how to figure this out?

    I really appreciate it!!!

  2. #2
    Join Date
    Mar 2009
    Location
    Brisbane, Australia
    Posts
    7,729
    Thanks
    13
    Thanked 1,610 Times in 1,537 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows
    Wiki edits
    17

    Default Re: Configuring project with 3rd party api

    I am assuming you are using QMake

    You use any third party library in much the same way.
    • Add a path or paths to INCLUDEPATH to allow the C++pre-processor to find the library headers during compilation
    • Add a path or paths to LIBS using -L options to allow the linker to find the library files during linking
    • Add a name or names to LIBS using -l options to name the libraries you want the linker search for symbols during linking

    In the case of dynamically loaded libraries: they must be located at run time either:
    • In the same directory as the executable or on the system PATH on Windows
    • On the UNIX LD_LIBRARY_PATH.


    Perhaps you could elaborate on where in the process you are getting problems, and what the error or warning messages are.

Similar Threads

  1. Error in third party Libaray addition in qt android project
    By abin in forum Qt for Embedded and Mobile
    Replies: 1
    Last Post: 10th October 2014, 01:03
  2. Replies: 1
    Last Post: 21st April 2014, 23:21
  3. Configuring of Qt5 on Kubuntu 13.04
    By HelderC in forum Installation and Deployment
    Replies: 1
    Last Post: 3rd August 2013, 10:39
  4. Trouble configuring Qt
    By empty_board in forum Installation and Deployment
    Replies: 2
    Last Post: 7th April 2013, 20:07
  5. Qt GUI Application Project with 3rd party dll problem
    By MarkoSan in forum Qt Programming
    Replies: 1
    Last Post: 22nd February 2010, 09:24

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.