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

Re: Linking error with wxWigdets library (XCode) was Re: [XaraXtreme-dev] Mac Developer



On 11/08/06, Cristian Bortes <cristian.bortes@xxxxxxxxx> wrote:
Hi Ben,

I'm using wxWidgets as a static library (until today I used Phil's XCode
project for building static unicode library)

Today I built it using terminal make files. (../configure
--enable-monolithic --disable-shared --enable-unicode
--enable-postscript --enable-debug-flag --enable-precomp-headers), and
now I'm using wx_macud-2.6.a library and try see if this will help.

Let us know how you get on.

Due the fact that we are making a custom build on wxWidgets I think it
is better to use static library.

Also in the INSTALL-MAC.txt I found the following:
"Note that while using this method is okay for development, it is not recommended that you
require endusers to install wxWidgets into their system directories in order to use your program.
 One way to avoid this is to configure wxWidgets with --disable-shared."

I agree. For development purposes (I call this XCode-personal) dynamic
linking is a definite plus, it is a step towards zerolink.

Since we will be embedding the libraries for the deliverable, we
should choose on the basis of whether you prefer/have more experience
with embedding dynamic or static libraries, no?

Ben

Ben Fowler wrote:

> On 10/08/06, Cristian Bortes <cristian.bortes@xxxxxxxxx> wrote:
>> ...
>> Now I'm struggling with the linking errors.
>>
>> All of them are similar to this one:
>>
>> /workxara/XaraLX/build/Development/libwxXtra.a(sizer.o) malformed
>> object, illegal reference for -dynamic code (reference to a coalesced
>> section (__TEXT,__textcoal_nt) from section (__TEXT,__eh_frame)
>> relocation entry (414))
>>
>> I'm guessing that this is a widgets error (all the malformed objects are
>> wxwidgets objects) , caused by the "wrong" building of the wxWidgets.
>> I built wxWidgets library using the XCode project made by Phil.
>> So Phil, can you please tell me, if you succeed to use anywhere the
>> wxWidgets  library that you got from building the project with XCode.
>
> You may want to review the thread starting with
> http://www.xaraxtreme.org/maillists/archive/dev/dev_052006/msg00566.html
> and check whether you are working with static wxWidget libraries.
>
> If you are - and at this stage you probably should be -  please check
> the 'Target Membership' checkboxes within the 'External Frameworks and
> Libraries' Group. I think that you need libwx_macud_static.a ON and
> libwx_macud-2.6.dylib' OFF; but I am not sure, and your project may
> look different. I am not certain, but I do believe that you must make
> this setting correctly by hand, because either XCode or the underlying
> gcc toolchain will select dynamic libraries if it can find them.
>
> In the same vein, it would be helpful if you could advise us on using
> static or dynamic linking for this project at this time.
>
>> Also if anyone knows how to solve this type of error, any help will be
>> welcomed.
>
> I am not using methods quite identical to the published ones (I have
> compiled wxWidgets using the command line, and installed those
> libraries), so I don't have to do the step that I have just mentioned.
>
> You might also want to look at the build transcript (Cmd-Shift-B),
> which will show the exact command that XCode was trying to run when it
> encountered the error. You can copy it and paste it into a terminal or
> text editor to see more clearly what is happening.

I meant to add that if you want me to understand the problems you are
facing, you ought to post the exact steps needed to observe them, as I
will probably have to start afresh.

Ben