title: Quite strange MinGW ld problem - "collect2: ld returned 1 exit status"
body: <p>I'm building an application for data visualization and the framework I'm using is beautiful <a href="http://openframeworks.cc/" rel="nofollow">OpenFrameworks</a>. On Linux, it compiles and works perfectly, but now it's time to port it to Windows and I'm facing some very strange problems. I can't find relevant information from google. When linking, I get this:</p>
  
  <pre><code>mingw32-g++.exe  -o bin\visualisation.exe ...blah.o, blah2.o... ...lib1 lib2 lib3...
  collect2: ld returned 1 exit status
  Process terminated with status 1 (0 minutes, 3 seconds)
  0 errors, 0 warnings
  </code></pre>
  
  <p>(list of object files an libraries is quite long, so I stripped it a bit)</p>
  
  <p>I tried manually building all libraries from scratch and then trying again, but I always get this. No errors, it just doesn't create any executables. It is usually problem with not included library, but then linker gives an error. I also tried to build all from command line, and I get the same result. </p>
  
  <p>So, my question is pretty obvious, where can be the problem?</p>
  
  <p>Just to mention, I'm using Code::Blocks 8.02, Windows XP Home SP3 and MinGW with following components:</p>
  
  <pre><code>gcc-core-3.4.5-20060117-1-vista.tar.gz 
  gcc-g++-3.4.5-20060117-1-vista.tar.gz 
  mingw-runtime-3.14.tar.gz 
  mingw32-make-3.81-2.tar.gz
  mingw-utils-0.3.tar.gz
  w32api-3.11.tar.gz
  binutils-2.18.50-20080109.tar.gz
  gdb-6.7.50.20071127-mingw.tar.bz2
  </code></pre>
  
  <p>Edit:
  Log when compiling from command line (cmd.exe):</p>
  
  <pre><code>C:\openFrameworks\apps\examples\GraphVisualOFv2&gt;mingw32-g++.exe  -o     bin\visualisation.exe obj\release\src\dataAccess\DBDataLoader.o obj\release\src\dataAccess\DataLoader.o obj\release\src\dataAccess\XMLDataLoader.o obj\release\src\dataAccess\c\sacapidll.o obj\release\src\engine\Engine.o obj\release\src\engine\config\Configuration.o obj\release\src\engine\config\ConfigurationControler.o obj\release\src\graph\Edge.o obj\release\src\graph\Graph.o obj\release\src\graph\Vertex.o obj\release\src\main.o obj\release\src\math\AlgorithmicPositioning.o obj\release\src\math\Positioning.o obj\release\src\math\RandomPositioning.o obj\release\src\metaLayer\MetaEdge.o obj\release\src\metaLayer\MetaGraph.o obj\release\src\metaLayer\MetaVertex.o obj\release\src\testApp.o   ../../../libs/openFrameworksCompiled/lib/win_cb/openFrameworks.lib ../../../libs/FreeImage/lib/win_cb/FreeImage.lib ../../../libs/rtAudio/lib/win_cb/librtaudio.a ../../../libs/rtAudio/lib/win_cb/RtAudio.a ../../../libs/rtAudio/lib/win_cb/RtAudioD.a ../../../libs/quicktime/lib/win_cb/qtmlClient.lib ../../../libs/freetype/lib/win_cb/libfreetype.a ../../../libs/glut/lib/win_cb/libglut.a ../../../libs/videoInput/lib/win_cb/videoInputLib.a ../../../libs/fmodex/lib/win_cb/libfmodex.a ../../../libs/glee/lib/win_cb/GLee.lib ../../../libs/glew/lib/win_cb/glew32s.lib ../../../libs/glu/lib/win_cb/glu32.lib ../../../libs/poco/lib/win_cb/libPocoNetmt.a ../../../libs/poco/lib/win_cb/libPocoUtilmt.a ../../../libs/poco/lib/win_cb/libPocoXMLmt.a ../../../libs/poco/lib/win_cb/libPocoFoundationmt.a ../../../libs/asa/lib/win_cb/dbcapi.lib ../../../libs/asa/lib/win_cb/dbextenv11.lib ../../../libs/asa/lib/win_cb/dblibtm.lib ../../../libs/asa/lib/win_cb/dbmlsynccli11.lib ../../../libs/asa/lib/win_cb/dbtlstm.lib ../../../libs/asa/lib/win_cb/odbc32.lib ../../../libs/asa/lib/win_cb/qany11.lib ../../../libs/dlfcn/lib/libdl.a ../../../libs/rudeconfig/lib/librudeconfig.a ../../../libs/freeglut/lib/libfreeglut.a -lopengl32 -lglu32 -ldsound -lwinmm -ldxguid -lstrmbase -lstrmiids -lz -luuid -lole32 -loleaut32 -lsetupapi -lwsock32 -lws2_32 -lIphlpapi
  collect2: ld returned 1 exit status
  
  C:\openFrameworks\apps\examples\GraphVisualOFv2&gt;
  </code></pre>