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

_______________________________________________
Discuss-gnustep mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/discuss-gnustep

Reply via email to