<div>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid"><br><br>
<div><span class="gmail_quote">On 3/13/07, <b class="gmail_sendername">Werner Smekal</b> &lt;<a onclick="return top.js.OpenExtLink(window,event,this)" href="mailto:smekal@iap.tuwien.ac.at" target="_blank">smekal@iap.tuwien.ac.at
</a>&gt; wrote:</span></div>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">Hi,</blockquote>
<div>&nbsp;</div>
<div>Hi Wermer</div><span class="q">
<div><br>&nbsp;</div>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">reading the bug report, the problem is:<br><br># MinGW needs an additional library, mwindows<br># It&#39;s total link flags should look like -lmingw32 -lSDLmain -lSDL 
<br>-lmwindows<br># (Actually on second look, I think it only needs one of the m* libraries.)<br>IF(MINGW)<br>SET(MINGW32_LIBRARY mingw32 CACHE STRING &quot;mwindows for MinGW&quot;)<br>ENDIF(MINGW)<br><br>MSYS!=MINGW for CMake for good reasons. The best solution would be to 
<br>use the MinGW compiler within normal Windows CLI, since it&#39;s so much<br>faster than MSYS, you won&#39;t regret it. </blockquote></span></blockquote>
<div>&nbsp;</div>
<div>Ok, so I just tested you proposal. What I did:</div>
<div>&nbsp;</div>
<div>- launched CMake,</div>
<div>- selected MINGW,</div>
<div>- configured a few variables (QT_QMAKE_EXECUTABLE, SDLIMAGE_INCLUDE_DIR, SDLIMAGE_LIBRARY, SDL_INCLUDE_DIR, SDLMAIN_LIBRARY).</div>
<div>- generated the makefiles.</div>
<div>&nbsp;</div>
<div>- click on start menu, and click on the launcher.</div>
<div>- launched &quot;cmd&quot; (I suppose that this is what you called Windows CLI)</div>
<div>- went to the directory</div>
<div>- launched &quot;mingw32-make.exe&quot;</div>
<div>&nbsp;</div>
<div>And the error is the same as before. The &quot;build.make&quot; is the same as before (I copied the linking part at the end of this mail).</div>
<div>Any idea?</div>
<div>&nbsp;</div>
<div>I would like to check the value of the variables in the FindSDL.cmake (like &quot;MINGW&quot;...) when I try to compile</div>
<div>my program. Is this possible?</div>
<div>&nbsp;</div>
<div>
<div>Can the problem be relevant to the fact that I am using the&nbsp;MINGW version coming with Qt ?</div></div>
<div>&nbsp;</div>
<div>&nbsp;</div>
<div>&nbsp;</div>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid"><span class="q">
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">Another solution would be to<br>change the lines above to<br><br>IF(MINGW AND MSYS)<br>SET(MINGW32_LIBRARY mingw32 CACHE STRING &quot;mwindows for MinGW&quot;) 
<br>ENDIF(MINGW AND MSYS)<br><br>and similar code in&nbsp;&nbsp;FindSDL.cmake. This should work&nbsp;&nbsp;than.</blockquote>
<div>&nbsp;</div></span></blockquote>
<div>&nbsp;</div>
<div>Currently, I suppose that the first issue is not related to that, as even with</div>
<div>MINGW it does not work...</div>
<div>&nbsp;</div></div>
<div>Any idea?</div>
<div>&nbsp;</div>
<div>&nbsp;</div>
<div>&nbsp;</div>
<div>the build.make:</div>
<div>
<div>
<p># External object files for target bloodybeard<br>bloodybeard_EXTERNAL_OBJECTS =</p>
<p>bloodybeard.exe: CMakeFiles/bloodybeard.dir/main.obj<br>bloodybeard.exe: CMakeFiles/bloodybeard.dir/qGameEngine.obj<br>bloodybeard.exe: CMakeFiles/bloodybeard.dir/moc_qGameEngine.obj<br>bloodybeard.exe: lib/SDL_image.lib
<br>bloodybeard.exe: lib/libSDLmain.a<br>bloodybeard.exe: C:/Qt/4.2.1/lib/libQtCore4.a<br>bloodybeard.exe: CMakeFiles/bloodybeard.dir/build.make<br>&nbsp;@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --red --bold &quot;Linking CXX executable 
bloodybeard.exe&quot;<br>&nbsp;$(CMAKE_COMMAND) -P CMakeFiles\bloodybeard.dir\cmake_clean_target.cmake<br>&nbsp;C:\MinGW\bin\g++.exe&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $(bloodybeard_OBJECTS) $(bloodybeard_EXTERNAL_OBJECTS)&nbsp; -o bloodybeard.exe -Wl,--major-image-version,0,--minor-image-version,0&nbsp; -Le:\dev\bloodybeard\bloodybeard\trunk\src\lib -Lc:\Qt\4.2.1\lib -lSDL_image -Wl,-Bstatic -lSDLmain -lQtCore4 -Wl,-Bdynamic -lWs2_32
</p></div></div>
<div>&nbsp;</div>
<div><br>-- <br>Pierre-André Galmes<br>Free Software consultant<br>StarXpert - <a href="http://www.starxpert.fr">www.starxpert.fr</a><br>6, rue Eugène Varlin - 75010 Paris </div>