__declspec(dllexport) equivalent under linux / osx with g++ ?

M

majestik666

Hi,

i'm bulding a multi platform app under windows/linux/osx
an i have a bit of trouble exporting c++ symbols from
a dynamic library...
Under windows, i compile a dll exporting symbols
using :
__declspec(dllexport) & __declspec(dllimport)

I do export non-static and static members from my c++ code
without any problems ...
But I can't find a way to do it uner linux or osx with g++
anybody can help on this one ?

Thanks a lot
Francois
 
J

Jack Klein

Hi,

i'm bulding a multi platform app under windows/linux/osx
an i have a bit of trouble exporting c++ symbols from
a dynamic library...
Under windows, i compile a dll exporting symbols
using :
__declspec(dllexport) & __declspec(dllimport)

I do export non-static and static members from my c++ code
without any problems ...
But I can't find a way to do it uner linux or osx with g++
anybody can help on this one ?

Thanks a lot
Francois

Ask in the family. These things are
not part of the C++ language to start with, they are non-standard
platform specific extensions.
 
A

Asfand Yar Qazi

Jack said:
Ask in the family. These things are
not part of the C++ language to start with, they are non-standard
platform specific extensions.

Or perhaps in the gnu.gcc.help newsgroup
 
J

JH Trauntvein

Hi,

i'm bulding a multi platform app under windows/linux/osx
an i have a bit of trouble exporting c++ symbols from
a dynamic library...
Under windows, i compile a dll exporting symbols
using :
__declspec(dllexport) & __declspec(dllimport)

I do export non-static and static members from my c++ code
without any problems ...
But I can't find a way to do it uner linux or osx with g++
anybody can help on this one ?


I might be barking mad here but I believe, based upon my own experience
of porting a windows DLL to a linux shared library, that, with a shared
library, you don't have control over which symbols are exported from
the DLL.

I have, by the way, always preferred to use a .def file to declare the
exports from a DLL. I really dislike having to muck with function
signatures.

Regards,

Jon Trauntvein
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,020
Latest member
GenesisGai

Latest Threads

Top