Skip to main content
Submitted by guillaume.mathias on Wed, 12/03/2014 - 10:50

Hello everyone,

I've seen some similar posts on the forum, but I couldn't manage to get things right, so I'm posting here.

I have Qt Creator 3.2.2 with Qt 5.3.2 (MSVC 2010, 32 bit) and the MinGW 4.9.1 32 bits installed, and I would like to create a program using the librairies that are proposed on your website. So far, what I'm trying to do is just to make the "example.cpp" program that was proposed with the "LibGalil-2.0.4.514-vs2010-x86" package. I created a new project, I added the "galil.h" and the "example.cpp", and I tryed to link the librairies by "adding an external librairy", which creates the proper lines into the *.pro file. I linked it to the "galil2.lib", because it seems that some people have problems with the version with the Qt GUI (the -1 version).

After clean/qmake I try to build it, but it seems that it cannot find the proper functions, and I get many errors like "error : undefined reference to `_imp___ZN5Galil14libraryVersionEv'" which refers to "Galil::libraryVersion()", and for each function from "Galil::" I get one error message similar to that one.

Any help would be much appreciated,
Thanks a lot

Guillaume

Comments 2

guillaume.mathias on 12/04/2014 - 00:23

It appears that compiling with MinGW was a bad idea, according to the fact that I was trying to use the librairies built with msvc 2010. Now I use the msvc 2010 compiler, and I don't get the same errors. When I'm in "release" mode, everything seems to work fine but it is not the case with the "release" mode (I have even tryed with the Qt librairies -1 and it works fine too). It doesn't work at all with the "debug" mode, I mean the building is fine, but when I'm running it, it crashes after a few seconds.

MattK on 12/19/2014 - 16:45

Hi Guillaume

With our website upgrade my forum alerts got lost in the mix, hence the late reply.

It sounds like you are seeing compiler conflicts, ie the linker in your compiler is still directing you to release binaries when you have selected debug mode.
When compiling in C++, it is crucial that the correct binaries be used in conjunction with the compiler. These are reliant on a few factors:
Compiler (MSVC, QT etc.)
Architecture (x86 vs 64 bit)
Release or Debug mode

I would suggest investigating exactly what files your compiler is linking to and ensuring they are appropriate.