<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
<span
style="font-size: 7.5pt; font-family: "Arial","sans-serif"; color: gray;"></span>I
have managed to resolve this issue. The problem was that I only ran
cmake once. Running it a second time before running mingw32-make
produced the correct results. I guess this has something to do with the
cache not having all the right values after just one run.<br>
<br>
Stiaan<br>
<br>
On 05/19/2011 05:53 PM, Yuri Timenkov wrote:
<blockquote
cite="mid:BANLkTinYbufnduuLbdpLZAQS2w64VAFofw@mail.gmail.com"
type="cite">Sorry, usually there are errors when trying to generate
project under cygwin, but cmake uses backslashes.
<div><br>
</div>
<div>Then I suggest looking at
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<span class="Apple-style-span"
style="border-collapse: collapse; font-family: Arial;">xmlparse and </span>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<span class="Apple-style-span"
style="border-collapse: collapse; font-family: Arial;">CE_FEMxml
dependencies. Because they're static libraries, CMake adds all their
dependencies into link command.</span></div>
<div><font class="Apple-style-span" face="Arial"><span
class="Apple-style-span" style="border-collapse: collapse;">You can
also check CMake's advanced variables and files in CMakeFiles. There
information about system is kept (along with linker and compiler's
command line templates).</span></font></div>
<div><br>
<div class="gmail_quote">On Thu, May 19, 2011 at 6:55 PM, Stiaan
Gerber <span dir="ltr"><<a moz-do-not-send="true"
href="mailto:sgerber@sun.ac.za">sgerber@sun.ac.za</a>></span> wrote:<br>
<blockquote class="gmail_quote"
style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div bgcolor="#ffffff" text="#000000">
<div>
<div class="h5">On 19/05/11 14:41, Yuri Timenkov wrote:
<blockquote type="cite">May be you should use Cygwin build of CMake?<br>
<br>
<div class="gmail_quote">On Thu, May 19, 2011 at 12:46 PM, Stiaan
Gerber <span dir="ltr"><<a moz-do-not-send="true"
href="mailto:sgerber@sun.ac.za" target="_blank">sgerber@sun.ac.za</a>></span>
wrote:<br>
<blockquote class="gmail_quote"
style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div bgcolor="#ffffff">
<div><font face="Arial" size="2">Dear list</font></div>
<div> </div>
<div><font face="Arial" size="2">On Windows, MinGW (gcc 4.5.2),
CMake 2.8.4.</font></div>
<div> </div>
<div><font face="Arial" size="2">I have a project building two
executables. The first one builds correctly. On the second one it
appears to me as though CMake adds flags to link to the standard MinGW
libraries (mingw32, moldname, mingwex, ...) with an incorrect .lib
suffix. (See the output below) As far as I can tell this is totally
unnecessary since these flags are automatically added by the gfortran
compiler. So in the end I have -lmingw32.lib (presumably added by
CMake, which fails) and -lmingw32 (automatically added by gfortran,
which correctly links libmingw32.a)</font></div>
<div> </div>
<div><font face="Arial" size="2">My CMakelists file for the
target
CE_SEMFEM is</font></div>
<div><font face="Arial" size="2">-------------------------------------------------------------------------------------------------------</font></div>
<div><font face="Arial" size="2">cmake_minimum_required
(VERSION
2.8.4)<br>
project (CE_SEMFEM Fortran)</font></div>
<div> </div>
<div><font face="Arial" size="2">set (CE_SRCS<br>
src/CE_SEMFEM.f95<br>
src/CE_config_module.f95<br>
)</font></div>
<div> </div>
<div><font face="Arial" size="2">add_executable (CE_SEMFEM
${CE_SRCS})<br>
target_link_libraries (CE_SEMFEM SEMFEM CE_FEMxml xmlparse)</font></div>
<div><font face="Arial" size="2">-------------------------------------------------------------------------------------------------------</font></div>
<div> </div>
<div><font face="Arial" size="2">The libraries SEMFEM,
CE_FEMxml
and xmlparse are built elsewhere in the project.</font></div>
<div> </div>
<div><font face="Arial" size="2">Ideas how I can fix this? Any
help
is much appreciated.</font></div>
<div> </div>
<div><font face="Arial" size="2">Stiaan</font></div>
<div> </div>
<div><font face="Arial" size="2">
<div><font face="Arial" size="2">-------------------------------------------------------------------------------------------------------</font></div>
Linking Fortran executable CE_SEMFEM.exe<br>
Driving: C:\MinGW\bin\gfortran.exe -v
CMakeFiles/CE_SEMFEM.dir/src/CE_SEMFEM.f95.obj
CMakeFiles/CE_SEMFEM.dir/src/CE_con<br>
fig_module.f95.obj -o CE_SEMFEM.exe
-LC:\Loher_Berechner_repo\build\Utilities\xml_parser
-LC:\Loher_Berechner_repo\build<br>
\SEMFEM\trunk\SEMFEM\core -Lc:\MinGW\lib\gcc\mingw32\4.5.2
-Lc:\MinGW\lib\gcc -Lc:\MinGW\mingw32\lib -Lc:\MinGW\lib -L\M<br>
inGW\lib ..\..\core\SEMFEM.lib
..\..\..\..\..\Utilities\xml_parser\libCE_FEMxml.a
..\..\..\..\..\Utilities\xml_parser\li<br>
bxmlparse.a C:\MPICH2\lib\fmpich2g.lib -lmingw32.lib -lmoldname.lib
-lmingwex.lib -lmsvcrt.lib -luser32.lib -lkernel32.l<br>
ib -ladvapi32.lib -lshell32.lib -lmingw32.lib -lmoldname.lib
-lmingwex.lib -lmsvcrt.lib -lgfortran -shared-libgcc<br>
Using built-in specs.<br>
COLLECT_GCC=C:\MinGW\bin\gfortran.exe<br>
COLLECT_LTO_WRAPPER=c:/mingw/bin/../libexec/gcc/mingw32/4.5.2/lto-wrapper.exe<br>
Target: mingw32<br>
Configured with: ../gcc-4.5.2/configure
--enable-languages=c,c++,ada,fortran,objc,obj-c++
--disable-sjlj-exceptions --wi<br>
th-dwarf2 --enable-shared --enable-libgomp --disable-win32-registry
--enable-libstdcxx-debug --enable-version-specific-r<br>
untime-libs --disable-werror --build=mingw32 --prefix=/mingw<br>
Thread model: win32<br>
gcc version 4.5.2 (GCC)<br>
COMPILER_PATH=c:/mingw/bin/../libexec/gcc/mingw32/4.5.2/;c:/mingw/bin/../libexec/gcc/;c:/mingw/bin/../lib/gcc/mingw32/4.<br>
5.2/../../../../mingw32/bin/<br>
LIBRARY_PATH=c:/mingw/bin/../lib/gcc/mingw32/4.5.2/;c:/mingw/bin/../lib/gcc/;c:/mingw/bin/../lib/gcc/mingw32/4.5.2/../..<br>
/../../mingw32/lib/;c:/mingw/bin/../lib/gcc/mingw32/4.5.2/../../../;/mingw/lib/<br>
COLLECT_GCC_OPTIONS='-v' '-o' 'CE_SEMFEM.exe'
'-LC:\Loher_Berechner_repo\build\Utilities\xml_parser'
'-LC:\Loher_Berechn<br>
er_repo\build\SEMFEM\trunk\SEMFEM\core'
'-Lc:\MinGW\lib\gcc\mingw32\4.5.2' '-Lc:\MinGW\lib\gcc'
'-Lc:\MinGW\mingw32\lib'<br>
'-Lc:\MinGW\lib' '-L\MinGW\lib' '-shared-libgcc' '-mtune=i386'
'-march=i386'<br>
c:/mingw/bin/../libexec/gcc/mingw32/4.5.2/collect2.exe -Bdynamic -u
___register_frame_info -u ___deregister_frame_info<br>
-o CE_SEMFEM.exe c:/mingw/bin/../lib/gcc/mingw32/4.5.2/../../../crt2.o
c:/mingw/bin/../lib/gcc/mingw32/4.5.2/crtbegin.o<br>
-LC:\Loher_Berechner_repo\build\Utilities\xml_parser
-LC:\Loher_Berechner_repo\build\SEMFEM\trunk\SEMFEM\core -Lc:\MinGW<br>
\lib\gcc\mingw32\4.5.2 -Lc:\MinGW\lib\gcc -Lc:\MinGW\mingw32\lib
-Lc:\MinGW\lib -L\MinGW\lib -Lc:/mingw/bin/../lib/gcc/m<br>
ingw32/4.5.2 -Lc:/mingw/bin/../lib/gcc
-Lc:/mingw/bin/../lib/gcc/mingw32/4.5.2/../../../../mingw32/lib
-Lc:/mingw/bin/..<br>
/lib/gcc/mingw32/4.5.2/../../.. -L/mingw/lib
CMakeFiles/CE_SEMFEM.dir/src/CE_SEMFEM.f95.obj
CMakeFiles/CE_SEMFEM.dir/src<br>
/CE_config_module.f95.obj ..\..\core\SEMFEM.lib
..\..\..\..\..\Utilities\xml_parser\libCE_FEMxml.a ..\..\..\..\..\Utilit<br>
ies\xml_parser\libxmlparse.a C:\MPICH2\lib\fmpich2g.lib -lmingw32.lib
-lmoldname.lib -lmingwex.lib -lmsvcrt.lib -luser32<br>
.lib -lkernel32.lib -ladvapi32.lib -lshell32.lib -lmingw32.lib
-lmoldname.lib -lmingwex.lib -lmsvcrt.lib -lgfortran -lmi<br>
ngw32 -lgcc_s -lgcc -lmoldname -lmingwex -lmsvcrt -luser32 -lkernel32
-ladvapi32 -lshell32 -lmingw32 -lgcc_s -lgcc -lmol<br>
dname -lmingwex -lmsvcrt c:/mingw/bin/../lib/gcc/mingw32/4.5.2/crtend.o<br>
c:/mingw/bin/../lib/gcc/mingw32/4.5.2/../../../../mingw32/bin/ld.exe:
cannot find -lmingw32.lib<br>
c:/mingw/bin/../lib/gcc/mingw32/4.5.2/../../../../mingw32/bin/ld.exe:
cannot find -lmoldname.lib<br>
c:/mingw/bin/../lib/gcc/mingw32/4.5.2/../../../../mingw32/bin/ld.exe:
cannot find -lmingwex.lib<br>
c:/mingw/bin/../lib/gcc/mingw32/4.5.2/../../../../mingw32/bin/ld.exe:
cannot find -lmsvcrt.lib<br>
c:/mingw/bin/../lib/gcc/mingw32/4.5.2/../../../../mingw32/bin/ld.exe:
cannot find -luser32.lib<br>
c:/mingw/bin/../lib/gcc/mingw32/4.5.2/../../../../mingw32/bin/ld.exe:
cannot find -lkernel32.lib<br>
c:/mingw/bin/../lib/gcc/mingw32/4.5.2/../../../../mingw32/bin/ld.exe:
cannot find -ladvapi32.lib<br>
c:/mingw/bin/../lib/gcc/mingw32/4.5.2/../../../../mingw32/bin/ld.exe:
cannot find -lshell32.lib<br>
c:/mingw/bin/../lib/gcc/mingw32/4.5.2/../../../../mingw32/bin/ld.exe:
cannot find -lmingw32.lib<br>
c:/mingw/bin/../lib/gcc/mingw32/4.5.2/../../../../mingw32/bin/ld.exe:
cannot find -lmoldname.lib<br>
c:/mingw/bin/../lib/gcc/mingw32/4.5.2/../../../../mingw32/bin/ld.exe:
cannot find -lmingwex.lib<br>
c:/mingw/bin/../lib/gcc/mingw32/4.5.2/../../../../mingw32/bin/ld.exe:
cannot find -lmsvcrt.lib<br>
collect2: ld returned 1 exit status<br>
<div><font face="Arial" size="2">-------------------------------------------------------------------------------------------------------</font></div>
</font></div>
</div>
<br>
_______________________________________________<br>
Powered by <a moz-do-not-send="true" href="http://www.kitware.com"
target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a moz-do-not-send="true"
href="http://www.kitware.com/opensource/opensource.html"
target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Please keep messages on-topic and check the CMake FAQ at: <a
moz-do-not-send="true" href="http://www.cmake.org/Wiki/CMake_FAQ"
target="_blank">http://www.cmake.org/Wiki/CMake_FAQ</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a moz-do-not-send="true"
href="http://www.cmake.org/mailman/listinfo/cmake" target="_blank">http://www.cmake.org/mailman/listinfo/cmake</a><br>
</blockquote>
</div>
<br>
</blockquote>
<br>
</div>
</div>
I do not quite understand the suggestion. I do not have Cygwin
installed and I do not wish to go that route. I use CMake with the
"MinGW Makefiles" generator.<br>
<br>
Kind regards<br>
Stiaan<br>
</div>
<br>
_______________________________________________<br>
Powered by <a moz-do-not-send="true" href="http://www.kitware.com"
target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a moz-do-not-send="true"
href="http://www.kitware.com/opensource/opensource.html"
target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Please keep messages on-topic and check the CMake FAQ at: <a
moz-do-not-send="true" href="http://www.cmake.org/Wiki/CMake_FAQ"
target="_blank">http://www.cmake.org/Wiki/CMake_FAQ</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a moz-do-not-send="true"
href="http://www.cmake.org/mailman/listinfo/cmake" target="_blank">http://www.cmake.org/mailman/listinfo/cmake</a><br>
</blockquote>
</div>
<br>
</div>
</blockquote>
</body>
</html>