I have just installed Qt5 on my system (linux mint petra) by installing the package qt5-default. I have a simple .ui file and a main.cpp. Using uic, I can translate my .ui file into a .h file, which is included by main.cpp. No problem until now.
I run qmake -project, qmake and make. Compiling is just fine, I get main.o. But linking gives me a bunch of "undefined references...".
So, I checked the libraries. This is the linker call:
g++ -m64 -Wl,-O1 -o qttest main.o -L/usr/X11R6/lib64 -lQt5Gui -L/usr/lib/x86_64-linux-gnu -lQt5Core -lGL -lpthread
Ok, so I searched for the libraries. As far as I know, the parameter -lQt5Core forces the linker to look for a file with name libQt5Core.a, in the directories specified with the -L option. However, this folder only contains a libQt5core.so. Same thing with the other needed libraries. As far as I know, .a files are for static linking while .so is for dynamic linking.
Now, how should I proceed? Should I search the internet for a .a library? Why is qmake generating a makefile which tries so static link? Am I missing some packages? I haven't ever dynamically linked. Do I have to add code for loading the .so? I have the feeling statically linking is easier as a first step.
Best Regards