This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: dynamic linking with c++


Hi Wanner,

I bet the PAM module requires C ABI.

If so, you need to put ...
    extern "C"
... in front of your shared routines.

Example...
    extern "C" int getStatus();
    extern "C" void setStatus(int i);

--Eljay



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]