[CMake] CMake: Error running link command: %1 is not a valid Win32 application

Jussi Lind jussi.lind at vincit.fi
Fri Feb 6 02:42:33 EST 2015


I'm trying to build a NaCl extension for Google Chrome on 64-bit Windows
8.1 using CMake. It uses a custom toolchain that comes with the SDK. The
same code works on Ubuntu without any problems.

Everything goes well until CMake tries to link with this command:

cmake -E cmake_link_script link.txt

CMake: Error running link command: %1 is not a valid Win32 application

The link.txt is as follows:

C:/nacl_sdk/pepper_39/toolchain/win_pnacl/bin/pnacl-ar cr libfoo.a
CMakeFiles/foo.dir/Foo.cc.o
C:/nacl_sdk/pepper_39/toolchain/win_pnacl/bin/pnacl-ranlib libfoo.a

This happens with both NMake and Unix makefile generators (the NaCl SDK
contains make.exe for Windows).

If I run those exactly same commands manually, they succeed. What could be
wrong here? It's as if CMake somehow fails to parse the paths correctly for
some reason.
BR,
Jussi
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/cmake/attachments/20150206/035f8255/attachment.html>


More information about the CMake mailing list