[wxMac 2.8.4] Got my code to compile, but not link

David Goldsmith David.L.Goldsmith at noaa.gov
Mon Jun 25 23:18:23 PDT 2007


I haven't been (knowingly) using Objective-C++; how might I have been 
unknowingly using it?

DG

Matt Connolly wrote:
> Just today I came up with the same "wxOnAssert" link error when 
> building UNICODE libraries with the xcode project from wxWidgets 2.8.4.
>
> The problem was very simple: the precompiled header was not being made 
> for "objective-c++" only "c++".
>
> The ".mm" files did not include "wx/prec.h" at the top of them, so 
> they were relying solely on the precompiled headers. Since enabling 
> UNICODE is done via setting the wxUSE_UNICODE build flags, this wasn't 
> being set, so the Objective-C++ files were being linked against the 
> wrong thing.
>
> After adding the precompiled headers for "objective-c++", the problem 
> went away.
>
> However, I think that the standard #include <wx/prec.h> should be 
> placed at the top of the .mm files for projects that do not have a 
> precompiled prefix header.
>
> Regards,
> Matt
>
>
> On 26/06/2007, at 3:40 AM, David Goldsmith wrote:
>
>> David L Goldsmith wrote:
>>> Robin Dunn wrote:
>>>>
>>>> What do you get when you run this:
>>>>
>>>>     /usr/local/bin/wx-config --libs
>>> Oooh, loads and loads!
>>>> That is what you should use for linking, if that doesn't work then 
>>>> there is a bug.
>>> OK, of the wx things it couldn't find, that eliminated all but 
>>> wxOnAssert - it still can't find that.
>> I built an ansi build of wx and tried to build the same code against 
>> that - that got rid of the missing wxOnAssert symbol linker error; is 
>> that a bug in the Unicode build process/result?
>>
>> DG
>>
>>
>> --ERD/ORR/NOS/NOAA 
>> <http://response.restoration.noaa.gov/emergencyresponse/>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: wx-users-unsubscribe at lists.wxwidgets.org
>> For additional commands, e-mail: wx-users-help at lists.wxwidgets.org
>>
>

-- 
ERD/ORR/NOS/NOAA <http://response.restoration.noaa.gov/emergencyresponse/>




More information about the wx-users mailing list