discuss-gnustep
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Linking frameworks does not work


From: Andreas Fink
Subject: Re: Linking frameworks does not work
Date: Wed, 2 May 2018 15:49:23 +0200

could it simply be that your /etc/ld.so.conf setup does not include the needed paths to find SRFoundation framework or you didnt run ldconfig after installing/updating the shared library?



On 2 May 2018, at 15:45, Andreas Höschler <ahoesch@smartsoft.de> wrote:

Hi Wolfgang,

On 2. May 2018, at 15:36, Wolfgang Lux <wolfgang.lux@gmail.com> wrote:

Selectors do not count here. They are only resolved at runtime not a link time.
You would need an explicit reference to a class, function or global variable from your frameworks inside the code of the test application to have the linker include those libraries in the executable.

int main (int argc, const char **argv, char** env)
  {
   NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
   
   [NSApplication sharedApplication];
   
   controller = [[Controller  alloc] init];
   NSLog(@"controller %@", controller);
   [NSApp setDelegate:controller];
   
   [NSString stringByChaining:@"ass" count:3];

...

   [pool release];

   return NSApplicationMain (argc, argv);
}

Is this directly enough? The method NSString::stringByChaining:count:] is defined/implemented in my SRFoundation framework. When I do

make 

I get a resulting app and starting it leads to "NSString does not recognize selector stringByChaining:count: exception. When I instead build with

make shared=no

I get

...
/usr/bin/ld: cannot find -lSRFoundation
...

and buolding the app fails!???

Thanks,

 Andreas



_______________________________________________
Discuss-gnustep mailing list
Discuss-gnustep@gnu.org
https://lists.gnu.org/mailman/listinfo/discuss-gnustep


reply via email to

[Prev in Thread] Current Thread [Next in Thread]