On 8 Mar 2004 at 15:43, Waldek Hebisch wrote:
[...]
I looked at "a2dll" and AFAIKS the procedure works for GPC too:
bash-2.04$ i386-pc-mingw32-gcc --shared -Wl,--export-all -o libgpc.dll -Wl,--output-def=libgpc.def -Wl,--out-implib=libgpc.dll.a -Wl,--whole-archive libgpc.a -Wl,--no-whole-archive
[...]
Yes, it worked here too (cool!). I am able to compile all sorts of programs, that are quite tiny - a first for me with GPC under Windows (a suite of program that would normally compile to a total of about 2.7mb compiled to 390kb).
However, I found that when compiling a program uses the system unit, I get an error about not being able to auto-import "_p_ErrorMessageString". I was directed to the "ld" documentation on "--enable-auto-import", which indicated a number of ways in which the problem could be solved. Declaring the variable as "volatile" (as suggested) didn't help. In the end, I used "-enable-runtime-pseudo-reloc", and that solved the problem.
So, I guess that this is the next best thing after sliced bread ;)
Best regards, The Chief -------- Prof. Abimbola A. Olowofoyeku (The African Chief) web: http://www.bigfoot.com/~african_chief/