-init works but not -fini in gcc-2.95.2?
Naomaru Itoi
nao@monkey.org
Tue Apr 9 02:13:00 GMT 2002
Hi,
Thank you so much for your great work.
I am using gcc-2.95.2 on Mac OS X.
[localhost:~/src/dltest] apple% cc --version
2.95.2
I would like to set an initialization function and an exit function of a
shared library. To set the initialization function to "init()", I do
this, and it works.
[localhost:~/src/dltest] apple% cc -init _init -dynamiclib -o dllib.dylib dllib.o
However, when I do this to set the exit function, it fails.
[localhost:~/src/dltest] apple% cc -init _init -fini _fini -dynamiclib -o dllib.dylib dllib.o
cc: _fini: No such file or directory
cc doesn't seem to like the "-fini" option.
What should I do to set the exit function? I tried "#pragma fini (fini)"
as well, but it didn't work, either.
Any help shall be appreciated. Thank you.
--
Concentration ... Naomaru Itoi
More information about the Gcc-help
mailing list