Results 1 to 5 of 5

Thread: Linux vs Windows 3rd party libraries

  1. #1
    Join Date
    Jan 2010
    Posts
    40
    Thanks
    2
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Linux vs Windows 3rd party libraries

    I have developed a Qt application in Linux and am trying to port it to Windows. The application used several third party libraries and I am currently searching for Windows versions, or Windows equivalents. My question is this. How do I link to 3rd party libraries in Windows? In Linux it was pretty straightforward. I went to the Ubuntu software center or Synaptic Package Manager, and got the development files for whatever I needed, like LAME or QJson. The package came with a shared object (.so) file in the /usr/lib directory, as well as a .h file in the /usr/include directory. You added the .so file to the Libs section of the Qt project file, and did a #include to the .h file in whatever module you needed it. How does this work in Windows? Do I need a .h file and a dll, or just a dll, as if I were programming in VB or C# ? If it is just a dll, how do I access the classes and procedures inside? Sorry if I come off sounding like an imbecile, but considering how straightforward this is in Linux, Windows is kind of obtuse. Any help you can give would be most appreciated.

  2. #2
    Join Date
    Jan 2006
    Location
    Belgium
    Posts
    1,938
    Thanked 268 Times in 268 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows
    Wiki edits
    20

    Default Re: Linux vs Windows 3rd party libraries

    Libraries that do not come with header files are not meant to be used as a public programming api (in other words: they are not meant for you to be used).

    However, Microsoft has a tool that creates a header file for a lib file. I can't remember the name, but surely msdn will give you tons of information.
    The qt activex module contains information on this tool too when creating header files for Office objects.

    Libraries should ALWAYS be installed in a folder known by the PATH environment variable. On linux, usually /usr/lib on windows c:\window\system... I think.
    The same with header files.

    If not, you will need to tell qmake or whatever you use to find them. Then it's probably a good idea to include them in your project folder.

  3. #3
    Join Date
    Jan 2010
    Posts
    40
    Thanks
    2
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: Linux vs Windows 3rd party libraries

    Thanks. Is there an equivalent to /usr/include in Windows where Qt automatically looks for header files?

  4. #4
    Join Date
    Dec 2008
    Location
    Poland
    Posts
    383
    Thanks
    52
    Thanked 42 Times in 42 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows Android

    Default Re: Linux vs Windows 3rd party libraries

    Look in the Path variable in the MyComputer->Properties->Advanced->Envir.Variables (bottom of the window) ->System (or User) variables and Path variable.
    Path is global - system wide - (or in Logged User space variable, depending where it is declared) for path lookup. Here add path to i.e. c:\mingw32\bin or any other lib\inlcude that You want to use.
    Better is to use pro file and use include directive. And no there is nothing like /use/include on the windows (well maybe %SystemRoot%/System32 and it's dll's ), and %SystemRoot% is always checked so You can CTRL+C/V to the c:\Windows ( <- joke).

  5. #5
    Join Date
    Jan 2010
    Posts
    40
    Thanks
    2
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: Linux vs Windows 3rd party libraries

    Thanks for everything. Now I just need to find Windows versions, or Windows equivalents, to the following libraries. libkCcmpactdisc,libkcddb,libcdio_cdda,libcdio_para noia,libmp3lame,libvorbisenc, and libFLAC++. It's basically a cd ripper component for a jukebox program. Works great in Linux, but the Windows conversion is proving tricky. There don't seem to be Windows development libraries for these, like there are for Linux, so I may need to compile from source.

Similar Threads

  1. macdeployqt and third party libraries
    By calumcjr in forum Installation and Deployment
    Replies: 0
    Last Post: 10th May 2010, 21:20
  2. Linking Third party Libraries
    By jsmith in forum Qt Programming
    Replies: 1
    Last Post: 13th October 2009, 06:18
  3. Using third-party libraries in qt
    By apj in forum Newbie
    Replies: 1
    Last Post: 15th May 2009, 22:27
  4. Replies: 2
    Last Post: 30th September 2007, 21:23
  5. How to export resources in libraries on LINUX using Qt????
    By Shuchi Agrawal in forum Qt Programming
    Replies: 8
    Last Post: 1st June 2007, 10:14

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.