help-gplusplus
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: is there any directive available ?


From: Guy Harrison
Subject: Re: is there any directive available ?
Date: Wed, 15 Dec 2004 16:59:59 GMT
User-agent: KNode/0.7.7

chetan wrote:

> Microsoft's 32 bit compiler 'cl' for C++ provides directive
> __dllexport
> to export symbol that are "name mangled"  into  particular part of the
> dll file. So that can be viewed by the dumpbin /export command .
> 
> Is there any directive like that __dllexport available with 'g++'  ,
> so that i can export c++ symbols from my c++ program into particular
> section of ELF ?

All non-static symbols are exported by default.
 
> It is expected that that directive will put those symbols in that
> section in
> "name mangled" form rather than simple names that are place by
> EXPORT_SYMBOL(symbol) macro written in ksyms.c in LINUX
> 
> (Exporting  means at least i can see those symbols in particular
> section of ELF file)
> 
> I nees those symbols to be found collectively at particular section,
> so that i can use them as interface while building an application
> based on that oject file ..

Wrap them in "extern C". If you're seeing them (and I don't think you are)
as "dllexport" something is going on behind the scenes. A "raw" dllexport
is mangled. If it's relevant, I know nothing about .NET (please confirm) -
that aside, winapi has no mechanism. DLL's do have 'ordinals' but as that's
firmly in win32 teritory read elsewhere. ;-)

Fwiw: C++ isn't portable (across potentially) even minor versions. Offtopic,
(and to help potential IT-dumb bank managers), hint: trolltech (he might be
using it whilst refusing you) - an example of how far one can reach!



reply via email to

[Prev in Thread] Current Thread [Next in Thread]