[SOLVED] QT and boost : cannot find -llibboost_filesystem...
-
I checked my boost lib dir and I do have a libboost_thread-mgw... .dll and .lib so maybe you investigate the build of the boost libraries.
wrote on 24 Apr 2015, 14:37 last edited byI downloaded and built boost 1.58.
This time I do have '.a', '.dll' and '.dll.a' for libbost_thread...
But it does not change anythingI don't recall doing anything in particular but the errors about 'thread' are not the same anymore.
They were like :
undefined reference to _imp___ZN5boost6threadC1Ev'
undefined reference to _imp___ZN5boost6thread4joinEv'And now :
undefined reference to boost::thread::thread()'
undefined reference to boost::thread::joinable() const'I just noticed that I have another error :
cc1plus.exe:-1: erreur : note: initialized from here
file not found : cc1plus.exe -
wrote on 27 Apr 2015, 11:07 last edited by
cc1plus.exe is the cpp compiler invoked by gcc.
Do you have another MinGW installation on your system?
Maybe you have some references in your local or global PATH
environment variable pointing to the wrong MinGW bin dir? -
wrote on 28 Apr 2015, 08:18 last edited by
I have MinGW installed in C:/MinGW
And also the one that comes with Qt Creator.In my PATH I have set "C:\Qt\qtcreator-2.4.1\mingw\bin"
Nevermind, this error appeared because I changed the MinGW to use in Project options.
If I select the MinGW that comes with Qt Creator this error disappears. -
wrote on 28 Apr 2015, 14:34 last edited by
I may have an idea why it's not working.
I did not see, but I had Strawberry perl installed and it has mingw.
In my path I had "C:\Strawberry\c\bin" set, so I built boost using this mingw (v4.8.1) and the mingw that comes with Qt creator is v4.4.0I removed strawberry from the path.
I am currently rebuilding boost with the correct mingw, will update tomorrow. -
wrote on 28 Apr 2015, 15:24 last edited by
I´m curious about it.
-
Never modify PATH when you are developing (it should also be avoided as much as possible the rest of the time), it's in the same category as developing as root on linux ;)
More seriously, having MinGW or the Qt bin path in your PATH is an open door to a world of problem since you will be thing you are using one version of a library while in fact using another one. Also, MinGW isn't always compatible between two versions of their compiler. That's probably why you had problem in the first place since you where using two different versions.
In any case, one rule that you should apply on Windows: Use the same compiler for all your code and dependencies. It's not always possible but it will greatly simplify your life.
-
wrote on 29 Apr 2015, 08:26 last edited by
That was it, it works fine now !
@SGaist : I did not notice in the first place that I was using two versions of MinGW.
When I installed Strawberry some weeks ago he added himself his path to the environement variable PATH.
So I thought I was compiling boost with the MinGW from Qt Creator, I did not pay enough attention to the 'mg48' in librairies' name that should have been 'mg44'.How do I make this subject "solved" ?
-
Windows can be tricky for that
IF you don't have the option in the Topic Tools menu, just edit the thread title and prepend [solved]
-
wrote on 30 Apr 2015, 07:16 last edited by
OK, thank you all for your help :)
21/29