Aha! thats works with a bit of jiggery pokery. However, I can't get it to compile for arm, and don't think I will be able to without a change of the tools. Long story short is you can't link to exported data in symbian OS. Or this is what Im taking the error im getting to mean. I'm going to post this error to the symbian tools team, see what they say about it. Writable static data has long been a issue with symbian.
For details see. http://www3.symbian.com/faq.nsf/0/71C212DB06DCE71380256D6E005AD2A8?OpenDocum...
So, memory wise, using a shared library gives little advantage over the static library. In storage you get a little win, but phone have loads of storage available to them these days.
So, now my attentions turn to static libraries. Is it just the case that if I compile everything in lib/ with ___PRIMAL and ___LIBRARY ill get a static library I can link against?
Regards Ivan
On Fri, Aug 07, 2009 at 02:00:33PM -0400, Marc Feeley wrote:
On 7-Aug-09, at 7:51 AM, Ivan Kelly wrote:
Im compiling gambit on windows with ___SHARED defined, in a symbian OS emulator environment. I've managed to get it working without issue compiling to one big monolith, taking pointers from the openwatcom batch file (also compiled with gcce and running on phone).
However, ___SHARED is proving to be a bit more difficult. The dll compiles with very little issue. ___LIBRARY and ___PRIMAL are defined for all *.c inputs to that, and it compiles without error apart from the unused variables, whose warnings i've hidden.
gsi is proving trickier though. In getting a load of errors for ___gstate being defined in many places. Also, ___G__20__gsilib is twice defined.
Can you try this recipe:
in lib/:
for each file <file>.c: gcc <many options> -c -o <file>.o -D___PRIMAL -D___SHARED - D___LIBRARY <file>.c
gcc -shared -o libgambc.dll <all .o files> -lws2_32
in gsi/:
for each file <file>.c in _gsilib.c _gambcgsi.c: gcc <many options> -c -o <file>.o -D___SHARED -D___LIBRARY <file>.c
gcc -shared -o libgambcgsi.dll _gsilib.o _gambcgsi.o ../lib/ libgambc.dll -lws2_32
for each file <file>.c in gsi.c _gsi_.c: gcc <many options> -c -o <file>.o -D___SHARED <file>.c
gcc <many options> -o gsi.exe _gsi.o _gsi_.o ../lib/libgambc.dll - lws2_32 libgambcgsi.dll
I've tested it on Windows with MinGW, so I expect it to also work on similar OSes.
Note that -D___SHARED is passed to all compilations of .c files.
Marc
Gambit-list mailing list Gambit-list@iro.umontreal.ca https://webmail.iro.umontreal.ca/mailman/listinfo/gambit-list