Re: Loading the Foundation at runtime

2011-01-26 Thread Eric Wing
On 1/24/11, Mathieu Suen wrote: > Hi All, > > In other to write a binding for a language I need to load the Foundation > framework at run time. > So just to test I wrote a simple example: > > --objc-test.c-- > #include > #include > #include > > void > onLoad (Class this, char* i

Re: Loading the Foundation at runtime

2011-01-25 Thread Jean-Daniel Dupas
Le 25 janv. 2011 à 14:55, Fritz Anderson a écrit : > On 24 Jan 2011, at 10:39 AM, Mathieu Suen wrote: > >> int >> main () >> { >> int error; >> objc_loadModule ("Foundation", onLoad, &error); >> return EXIT_SUCCESS; >> } >> --objc-test.c-- >> >> But the linker complain: >> >> U

Re: Loading the Foundation at runtime

2011-01-25 Thread Fritz Anderson
On 24 Jan 2011, at 10:39 AM, Mathieu Suen wrote: > int > main () > { > int error; > objc_loadModule ("Foundation", onLoad, &error); > return EXIT_SUCCESS; > } > --objc-test.c-- > > But the linker complain: > > Undefined symbols: > "_objc_loadModule", referenced from: > _main

Re: Loading the Foundation at runtime

2011-01-25 Thread Jean-Daniel Dupas
Le 24 janv. 2011 à 17:39, Mathieu Suen a écrit : > Hi All, > > In other to write a binding for a language I need to load the Foundation > framework at run time. > So just to test I wrote a simple example: > > --objc-test.c-- > #include > #include > #include > > void > onLoa

Loading the Foundation at runtime

2011-01-24 Thread Mathieu Suen
Hi All, In other to write a binding for a language I need to load the Foundation framework at run time. So just to test I wrote a simple example: --objc-test.c-- #include #include #include void onLoad (Class this, char* inCat) { printf ("Loading %s in %s\n", class_get