[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: ld problem GNUmakefile osx
From: |
Nicola Pero |
Subject: |
Re: ld problem GNUmakefile osx |
Date: |
Thu, 1 Jul 2010 09:54:20 +0100 |
On 1 Jul 2010, at 04:45, Lucas Samaruga wrote:
Hello
I have compiled an application but when it tries to link gives me
this error
ld: in /Developer/SDKs/MacOSX10.5.sdk/System/Library/Frameworks/
ApplicationServices.framework, can't map file, errno=22
collect2: ld returned 1 exit status
To help you understand what is happening, you should try
make messages=yes
this will print out the command used to launch the compiler and to
link. :-)
You can then more easily see what the effect of the various options
is ;-)
in the GNUmakefile I do
MyApp_OBJC_LIBS = \
/Developer/SDKs/MacOSX10.5.sdk/System/Library/Frameworks/
ApplicationServices.framework \
/Developer/SDKs/MacOSX10.5.sdk/System/Library/Frameworks/
Carbon.framework \
/Developer/SDKs/MacOSX10.5.sdk/System/Library/Frameworks/
Cocoa.framework \
...
If you want to link against these, the correct syntax is --
MyApp_OBJC_LIBS = \
-framework ApplicationServices \
-framework Carbon \
-framework Cocoa \
...
but are you sure you need them ?
"-framework Foundation -framework AppKit" should automatically be
used, which should mean you don't need "-framework Cocoa";
ApplicationServices and Carbon
as far as I know are only available on Apple so would limit the
portability of your application. Maybe you already know that and you
really need them,
in which case it's fine ;-)
Else, you could just try removing your MyApp_OBJC_LIBS entirely and
see what happens ? :-)
Thanks