bloudraak / mingw-and-ndk

Automatically exported from code.google.com/p/mingw-and-ndk
0 stars 0 forks source link

How to compile a simple application for MacOSX #4

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
After running this command in a msysbash

/c/apple-osx/bin/apple-osx-gcc.exe test.cpp \
-I"/c/appleosx/MacOSX10.7.sdk/usr/include" \
-L"/c/appleosx/MacOSX10.7.sdk/usr/lib"

I get this result??

ld: in c:/apple-osx/MacOSX10.7.sdk/usr/lib/libSystem.dylib, file too small for a
rchitecture i386
collect2: ld returned 1 exit status

the test.cpp file is just

int main(){}

Original issue reported on code.google.com by MartellM...@gmail.com on 22 Jun 2012 at 2:57

GoogleCodeExporter commented 9 years ago
Forgot to mention i'm using

multiarch-darwin11-cctools127.2-gcc42-5666.3-llvmgcc42-2336.1-Windows-120614.7z

Original comment by MartellM...@gmail.com on 22 Jun 2012 at 2:59

GoogleCodeExporter commented 9 years ago
Sorry I took so long to reply, I think I need to set up notifications for the 
project.

Use --sysroot=C:/apple-osx/MacOSX10.7.sdk

Also, you should return something from main.

Original comment by mingw.an...@gmail.com on 3 Jul 2012 at 6:18

GoogleCodeExporter commented 9 years ago
nitpick: returning from main is implicit. You can leave it out without bad side 
effects.

Original comment by VanBoxem...@gmail.com on 7 Aug 2012 at 3:49

GoogleCodeExporter commented 9 years ago

Original comment by mingw.an...@gmail.com on 18 Dec 2012 at 12:45