help-gplusplus
[Top][All Lists]
Advanced

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

Re: C++ SHARED LIBRARY HELP


From: Adam in Denver
Subject: Re: C++ SHARED LIBRARY HELP
Date: Sun, 10 Dec 2006 16:49:44 -0700

This is probably stack corruption.  If I strip all the pure virtual methods 
from the base CPlugin class (in static lib) except :

virtual char *Echo(char *psz)=0;

and implement :

char *Echo(char *psz) {return psz;};

in the CPlugin derived plugin class I still get a SIGSEGV in my application.

If I do the same in a another g++ test program I wrote it works fine .... 
please ignore this thread.

Adam.

"Adam in Denver" <adam@local.net> wrote in message 
1165791167_18445@sp6iad.superfeed.net">news:1165791167_18445@sp6iad.superfeed.net...
> Hello,
>
> I'm writing an application with FC5 Eclipse g++ 4.1.1.  The application 
> uses a plugin architecture.
>
> Plugins are shared library that are dynamically dlopen()'d.
>
> After dlopen() a dlsym()'d extern "C" Attach() function is called and a 
> CPlugin class derived object returned.
>
> When I debug, the CPlugin derived objects member variables are visible and 
> accessible, the methods are not.
>
> If I invoke a bound method on the object I get a SIGSEGV.
>
> If I invoke a static method (passing object pointer as variable), I can 
> step into it until I again call
> a bound method on the object and I get a SIGSEGV again.
>
> I fairly new to Linux/g++.
>
> What am I doing wrong ?
>
> Thanks,
>
> Adam.
>
>
> ----== Posted via Newsfeeds.Com - Unlimited-Unrestricted-Secure Usenet 
> News==----
> http://www.newsfeeds.com The #1 Newsgroup Service in the World! 120,000+ 
> Newsgroups
> ----= East and West-Coast Server Farms - Total Privacy via Encryption 
> =----
> 



----== Posted via Newsfeeds.Com - Unlimited-Unrestricted-Secure Usenet 
News==----
http://www.newsfeeds.com The #1 Newsgroup Service in the World! 120,000+ 
Newsgroups
----= East and West-Coast Server Farms - Total Privacy via Encryption =----


reply via email to

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