Qt Creator Link statements
-
Hello!
I'm new to QT in general and specifically to Qt Creator, so I hope this isn't an obvious question about CMAKE and generated link statements.
To make a long story short, I'm trying to use Qt Creator as the IDE for an open source project (Rescore) that's an offshoot of Musescore, a music notation editor project hosted on Sourceforge which uses Qt. The original developer of Rescore abandoned it and I've been unable to contact him.
I've been able to build Musescore from Qt Creator using its CMakeList, but the Rescore build fails. The reason it fails appears to be a slight difference in the generated link statement for the musescore DLL. The Musescore version that works includes this argument:
-L C:/qtsdk/desktop/qt/4.7.3/mingw/lib
The Recore link has only:
-L /lib
and gets hundreds of link errors due to unresolved imp_ symbols from the Qt libs.
I've used Winmerge to identify all the differences in the two project folders. There are some slight differences in two of the cmakelist statements but none I can see that seem to relate to this difference in the link. The complete compiles of all the rescore source works properly.
So my question is what might explain this difference? Where should I look in the project files?
Regards,
Hartley Mays
Cincinnati, Ohio USA -
Welcome to the forum.
There is one obvious, major difference between the lib pathes you are providing above. The upper one is for windows, while the second one is for linux.
I guess you are using a windows OS and the second lib statement has to fail then. Presumably the project you have downloaded has been developed on a linux OS.
-
Koahnig,
Thanks for the quick reply.
I know that Rescore runs on Windows 7. I don't know if it's possible to build the Windows executable on Linux and then ship it to Windows. I'm working only in the Windows 7 environment. There's a command proc from a Musescore developer which successfully builds both Musescore and Rescore on Windows. It must use the CMakeList files internally because the same version of the proc builds both and there are different source files for them.
I don't know how the orginal developer of Rescore built his project; the readme doesn't discuss that.
What/where/how in a CMakeList file (or elsewhere?) is the -L option handled, and what would it look at to determine whether to generate the full path or the /lib?
Later,
Hartley -
Hartley,
as stated above the first -L seem to give the path to the Qt libs for mingw. The witchcraft for that guess is really minimal ;)
The consequence would be then that the other statement simply assumes the libs on your default drive.
I am not an expert on CMake. Looking at the documentation did not really help for -L.So I am of no help for you. Sorry.