Find the answer to your Linux question:
Results 1 to 3 of 3
First of all, I'm a linux newbie. I installed Qt in a folder in my home (just downloaded the Qt 4.8 package and compiled it there). I'm trying to compile ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Mar 2013
    Posts
    2

    Problem linking Qt libraries


    First of all, I'm a linux newbie. I installed Qt in a folder in my home (just downloaded the Qt 4.8 package and compiled it there). I'm trying to compile another application (gml2pic, to convert graphs in drawings) which needs Qt. The instructions say to first generate a Makefile with qmake, which I did, no problems so far. The problem is that when executing 'make' to compile the code, i get an error from the linker that "-lQtSvg" can't be found. The same applies to "-lQtCore" and "-lQtGui". I do not know how to tell the linker where those libraries are. The Qt folder has a "lib" subfolder with .la files (which I guess are the libraries?). Any ideas on how to fix this?

  2. #2
    Linux Guru Rubberman's Avatar
    Join Date
    Apr 2009
    Location
    I can be found either 40 miles west of Chicago, in Chicago, or in a galaxy far, far away.
    Posts
    11,453
    Quote Originally Posted by skiforfun View Post
    First of all, I'm a linux newbie. I installed Qt in a folder in my home (just downloaded the Qt 4.8 package and compiled it there). I'm trying to compile another application (gml2pic, to convert graphs in drawings) which needs Qt. The instructions say to first generate a Makefile with qmake, which I did, no problems so far. The problem is that when executing 'make' to compile the code, i get an error from the linker that "-lQtSvg" can't be found. The same applies to "-lQtCore" and "-lQtGui". I do not know how to tell the linker where those libraries are. The Qt folder has a "lib" subfolder with .la files (which I guess are the libraries?). Any ideas on how to fix this?
    Did you run "make install" when you built Qt? Also, by default, the configuration script for most source packages install into /usr/local instead of /usr, so you may need to modify your LD_LIBRARY_PATH environment variable to look in /usr/local/lib and /usr/local/lib64. Alternatively, you can re-run configure for Qt and add the option "--prefix=/usr", then rebuild and reinstall. Then stuff should go into the appropriate default library directories.
    Sometimes, real fast is almost as good as real time.
    Just remember, Semper Gumbi - always be flexible!

  3. #3
    Just Joined!
    Join Date
    Mar 2013
    Posts
    2
    My problem was that I did not run "make install", so it did not install any library. I found out that the .la static library files were no good since they are only used by libtool and I need to point to .a library files which are generated by "make install". Sadly, make install failed because there is an undefined variable error (when building Qt). According to some forum posts with that error, it occurs because the kernel version is too old, which could be true since the machine I'm working with is not really updated. Thanks for the help anyway!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •