Hi,

I try to set up my toolchain file for building Windows executables in a Linux 
environment. I started with the example from 
http://www.cmake.org/Wiki/CmakeMingw

The only thing I noticed was that I needed to use "ar" and "ranlib" from MinGW 
as well, for creating the archives. I can do this by manually editing the file 
CMakeFiles/CMakeCXXCompiler.cmake after cmake has run. Code compiles 
successfully.

I then tried to add the following two lines to the toolchain file:
SET(CMAKE_AR i486-mingw32-ar)
SET(CMAKE_RANLIB i486-mingw32-ranlib)

(yes, the prefix for my MinGW install is different from the example)

Sadly, that makes the initial compiler test fail. For fortran it actually 
still works, but the test fails for c and c++. I have tried to search for a 
while without finding out what I do wrong. Please tell me. Or ask if something 
is unclear.

Thanks!

Cheers,
Yngve
--

Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake

Reply via email to