[SOLVED] cannot find -lQtGuid4 -lQtNetworkd4 -lQtCored4



  • This is a weird problem that keeps happening on my system. I have a working Qt project with a working .pro file that is configured for my system. The project worked but I needed to integrate openssl so I recompiled Qt 4.8.6 with openssl support. Here is what I ran in an Administrator CMD shell:

    mingw32-make confclean
    configure -release -opensource -confirm-license -static -openssl -webkit -qt-style-windows -L C:\deps\openssl-1.0.1h\include
    mingw32-make

    Everything seems to compile and go smoothly until I try to build. At the very end of the build i get the following errors from QrCreator:

    cannot find -lQtGuid4
    cannot find -lQtNetworkd4
    cannot find -lQtCored4

    The 3 libraries are included in the .pro file:

    QT += core gui network

    So I am really at loss here. Any help is appreciated!


  • Lifetime Qt Champion

    Hi and welcome to devnet,

    First thing i'd avoid is to use an administrator shell for development, this is a bad idea.

    Next, add the -L and -I flags for OpenSSL to configure, otherwise you are likely to not get openssl detected properly.

    Did you completely wipe your application build before retrying ?

    Also did you check that the Qt libraries were properly built ?



  • yes I have cleaned the project and also deleted the debug folder of the project when rebuilding it.

    How would I go about checking if the libraries were successfully built. I can see the appropriate dlls and .a files in Qt/4.8.6/lib

    edit: also what is the correct -L and -I path for openssl? Thanks for your support.


  • Lifetime Qt Champion

    Ok, it's simpler than that: you have built a release only Qt and trying build a debug version of your application.



  • ohhhh so the problem is because I am specifying the -release flag. If I omit it then what kind of application do I get?

    edit: just checked the default is -debug so i will get a debug version. Man going to take a while to recompile Qt on a single core CPU. So glad I am receiving my i7 4790K today in the mail it is about time.


  • Lifetime Qt Champion

    Since you are developing/debugging, drop also the static flag, if you really want to go static, do it only for deployment. Also don't forget that static linking may have licensing issues.



  • will do! So now I am trying to compile Qt with the following commands:

    mingw32-make confclean
    configure -opensource -confirm-license -openssl -webkit -qt-style-windows -L C:\deps\openssl-1.0.1h\apps -I C:\deps\openssl-1.0.1h\include
    mingw32-make


  • Lifetime Qt Champion

    You don't really need to set the style, it's automagically done for you. The rest is fine.



  • Okay sounds good. Will report once everything is recompiled on whether the application will build.



  • So I ran the compile overnight and it gave me an error with the webkit compilation. I am reconfiguring the build with -shared . can anybody tell me if -static and -webkit do not work together?

    I read that you cannot compile webkit with a static build. is that true?


  • Lifetime Qt Champion

    I remember that from the Qt 4.7 time, but I don't know if it's still relevant. Unless needed, I don't build this module since it's very time/resource consuming.



  • I need this module because I am using the webkit module in my code. Is there something else I have to configure outside of Qt?

    There are installation procedures with perl, python, and ruby for Webkit but I am not sure if I need to configure anything there or if Qt will build everything for you.


  • Lifetime Qt Champion

    I don't remember installing anything special for Qt 4 webkit. But it's been a long time.

    I can only recommend to try, but yes, do it shared.



  • Okay awesome. I am compiling it as shared now and will report back on how it goes.

    In the meantime, just received my i7 4790k. Quite an upgrade from a single core Intel Pentium processor



  • Yes release build was the problem, configuring qt without the -release flag solved the issue.

    Thanks SGaist!


  • Lifetime Qt Champion

    You're welcome !

    Have fun and happy coding :)


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.