PDA

View Full Version : doesn't the makefile generate according to the .pro ?



Lokl
7th July 2016, 18:13
I'm trying to build a project that I found on sourgeforge call Volbx. Obviously you need a proper environment with boost, Qt 4 QuaZip and Qwt but anyway I just want to make it run with Qt5. First Quazip should be build under Qt4 so I change the .pro to get rid of it. I muted some classes which own Quazip lib and tried to make it build as far as I can. But for any good reason when I do qmake, in my makefile I still get classes that I mute in .pro. shouldn't the .pro who manage the generation of makefile ? Doesn't exist any tips and tricks to pass around some missing lib to compile a project ?

Thanks in advance for any advice which light my path to a better knowledge of Qt world

anda_skoa
7th July 2016, 21:23
When you remove source files from the .pro then these won't be compiled.
When you remove headers files from the .pro then these won't be used as input for moc. However they can still be included by source files or other headers which are still being built.

Cheers,
_

d_stranz
7th July 2016, 22:47
Doesn't exist any tips and tricks to pass around some missing lib to compile a project ?

If a library is required for linking, then you either have to compile the library yourself or find a pre-compiled version that is compatible with your environment so you can link to it. Without that, your project will not link to create an executable file. You could create a dummy library that contains dummy versions of the classes and functions required to satisfy the link dependencies, but you almost certainly won't get a program that will run correctly.

So if your project depends on Quazip, then you need to build Quazip.

Lokl
8th July 2016, 16:41
Thanks Anda_skoa and d_stranz. So If I understand even if I mute some classes in .pro and I have some other classes which call them after all I still get them in the makefile. About quazip in the readme they say that it could be only build under Qt 4. Can I build it with Qt 5 even though can't I?

d_stranz
8th July 2016, 17:08
Can I build it with Qt 5 even though can't I?

According to the Quazip web site (http://quazip.sourceforge.net/):


Platforms supported

QuaZIP has been currently tested on the following platforms:

linux-g++ (Ubuntu 11.10, Qt 4.7.4)
freebsd-g++ (Qt 4.0.0
hpux-acc (HP-UX 11.11)
hpux-g++ (HP-UX 11.11)
win32-g++ (MinGW)
win32-msvc2010 (MS VS 2010 Express, Qt 4.8.4)
win32-msvc2010 (Qt Creator, Qt 5.0.1)
win32-msvc2012 (Qt Creator, Qt 5.2.0)
some Symbian version, reportedly

Requirements

Just zlib and Qt 4/5. Well, Qt 4 depends on zlib anyway, but you will need zlib headers to compile QuaZIP. With Qt5 sometimes you need the zlib library as well (on Windows, for example).

So it appears to be compatible with both Qt 4 and 5; you may have to edit your Qt Creator configuration so it finds the right locations for include files. The Quazip site does have a "Building, testing, and installing" section with some guidelines.

It's an open-source project, so you should expect to have to do some additional work to get it built and usable.