* export problem
@ 2001-03-02 11:30 Mvasarhely
2001-03-02 11:59 ` Alexandre Oliva
0 siblings, 1 reply; 2+ messages in thread
From: Mvasarhely @ 2001-03-02 11:30 UTC (permalink / raw)
To: gcc-help
Hello all,
Can anybody help me put in the below problem?
I have ported a Windows executable and DLL to Unix. I can compile with GNU
(g++) and run it fine when I add the DLL code directly to the exe code before
compiling.
However, I want to maintain the same structure as on Windows -- i.e., I want
to link the dynamic library (not executable) under UNIX with the GNU (g++)
linker.
I can link the DLL's code as a shared library under UNIX, but when I call a
function from the shared library using the dlsym () unix runtime function, I
get a message saying symbol NOT visible from outside the library.
My question is:
How can I make functions visible from outside the shared library so calling
them via a pointer using dlsym () will work? Something that would correspond
to export under Windows?
Thank you in advance, Szabolcs.
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: export problem
2001-03-02 11:30 export problem Mvasarhely
@ 2001-03-02 11:59 ` Alexandre Oliva
0 siblings, 0 replies; 2+ messages in thread
From: Alexandre Oliva @ 2001-03-02 11:59 UTC (permalink / raw)
To: Mvasarhely; +Cc: gcc-help
On Mar 2, 2001, Mvasarhely@aol.com wrote:
> How can I make functions visible from outside the shared library so calling
> them via a pointer using dlsym () will work?
It depends on the operating system and on the linker being used. With
GNU ld, -export-dynamic should do it.
--
Alexandre Oliva Enjoy Guarana', see http://www.ic.unicamp.br/~oliva/
Red Hat GCC Developer aoliva@{cygnus.com, redhat.com}
CS PhD student at IC-Unicamp oliva@{lsd.ic.unicamp.br, gnu.org}
Free Software Evangelist *Please* write to mailing lists, not to me
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2001-03-02 11:59 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-03-02 11:30 export problem Mvasarhely
2001-03-02 11:59 ` Alexandre Oliva
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).