Problem with shared build
Kit Bishop
kit at bishop.net.nz
Mon Oct 15 18:15:13 PDT 2007
Vadim Zeitlin wrote:
> On Mon, 15 Oct 2007 13:34:22 +1300 Kit Bishop <kit at bishop.net.nz> wrote:
>
> KB> However, for my own build process, I have problems with using the shared
> KB> build. For all my building, I use wx-config to get the various settings
> KB> etc. I have tried these with the minimal sample (see below). With
> KB> static build, all is fine; with shared build, when I try to execute the
> KB> program I always get a "Segmentation fault"
>
> Do you have a backtrace for this crash?
>
> KB> I must need something different in my compile and link lines for shared
> KB> build
>
> You should compare the g++ command lines used by the standard makefiles
> and your own ones (such as make displays them, i.e. after wx-config
> expansion) but normally there is nothing extra needed...
>
> BTW, what is your architecture? Would it be amd64 by chance? Under x86
> there is really no difference between static and shared code at this level
> AFAIK...
>
> Regards,
> VZ
>
>
I have found the problem. For the compile and link lines, there are
significant differences between those used in the samples makefile and
those generated using wx-config.
However, the bit that makes a difference is that `wx-config --static=no
--ld` gives "g++ -shared -fPIC -o" - if I remove the -shared, all is OK.
I don't know what the significance of the -shared is. For your
information, since you ask, my architecture is a standard i686, Pentium
4 system.
I don't know whether it is significant or not, but the "g++ --version"
gives "g++ (GCC) 4.2.1 (SUSE Linux)"
Should this problem be fixed in the build, or is it a problem with my
system and components?
Best regards,
Kit
More information about the wx-users
mailing list