JasCodes / android-cmake-old

Automatically exported from code.google.com/p/android-cmake
0 stars 0 forks source link

Build fails at linking step. #8

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
On a Windows 7 computer:

What steps will reproduce the problem?
1. Install mingw32-make if you do not have it: 
http://sourceforge.net/projects/mingw/files/MinGW/Extension/make/mingw32-make-3.
80-3/mingw32-make-3.80.0-3.exe/download
2. Download and unzip 
https://dl.dropbox.com/u/40949268/Bugs/NativeActivityCMakeLists.zip
3. Edit the android_cmake.bat file to point -DCMAKE_TOOLCHAIN_FILE to the 
location of the toolchain on your system.
4. Run android_cmake.bat
5. Run mingw32-make.

What is the expected output? What do you see instead?

Build should finish ok and produce a .so file.

The result looks like follows:

https://dl.dropbox.com/u/40949268/Bugs/androidcmake.png

Somehow cmake seems to be joining the two filenames into one, i.e treating the 
string "file1.c file2." as one file, instead of two separate files?

Original issue reported on code.google.com by juj...@gmail.com on 19 Jun 2012 at 5:06

GoogleCodeExporter commented 9 years ago
Your error is not reproducible. Maybe you have sh.exe somewhere in your PATH.

But anyway for mingw32-make you'd better use "MinGW Makefiles" generator 
instead of "Unix Makefiles" and you missed target_link_libraries(...) in 
attached example.

Original comment by andrey.k...@itseez.com on 19 Aug 2012 at 5:04