help with Xcode 3.2 link-- unresolved std::basic_i/ostream Topic is solved

Do you have a question about makefiles, a compiler or IDE you are using and need to know how to set it up for wxWidgets or why it doesn't compile but other IDE's do ? Post your questions here.
Post Reply
tedzini
Knows some wx things
Knows some wx things
Posts: 34
Joined: Tue Apr 20, 2010 2:30 pm

help with Xcode 3.2 link-- unresolved std::basic_i/ostream

Post by tedzini »

Greetings,

I have been using Xcode 3.2 IDE on MAC OSX (10.6.5/gcc 4.2) to re-compile an app which works fine on WinXP and Win7. I compiled static libs of wx 2.9.1 with x86_64bit/cocoa, working off config option examples provided on wxwidgets.org. The sample programs build and run so I then based the Xcode 3.2 IDE project on necessary defs and frameworks as observed from the cmd line make generated from various sample program makefiles.

The samples then compiled, linked, and executed as application bundles using the IDE.

However, for my own app, the linker produced std::basic_ostream/istream errors detailed below. I should mention that the compiler generates copious warnings related to "Vtable" and "Typeinfo name" having "different visibility (default)" than my compiled code. :-? hm. Would anyone be kind and/or knowledgable enough to provide me with some insight or ideas what I'm missing?

thnx to all in advance,
t

<snip> ------------ Xcode 3.2 link stage errors below------>

"std::basic_ostream<wchar_t, std::char_traits<wchar_t> >& std::__ostream_insert<wchar_t, std::char_traits<wchar_t> >(std::basic_ostream<wchar_t, std::char_traits<wchar_t> >&, wchar_t const*, long)", referenced from:


operator<<(std::basic_ostream<wchar_t, std::char_traits<wchar_t> >&, wxScopedCharTypeBuffer<wchar_t> const&)in libwx_baseu-2.9.a(baselib_string.o)


operator<<(std::basic_ostream<wchar_t, std::char_traits<wchar_t> >&, wxCStrData const&)in libwx_baseu-2.9.a(baselib_string.o)


"std::basic_istream<char, std::char_traits<char> >& std::basic_istream<char, std::char_traits<char> >::_M_extract<double>(double&)", referenced from:


wxVariantDoubleData::Read(std::basic_istream<char, std::char_traits<char> >&)in libwx_baseu-2.9.a(baselib_variant.o)


"std::basic_istream<char, std::char_traits<char> >& std::basic_istream<char, std::char_traits<char> >::_M_extract<long>(long&)", referenced from:


wxVariantDataLong::Read(std::basic_istream<char, std::char_traits<char> >&)in libwx_baseu-2.9.a(baselib_variant.o)


"std::basic_ostream<char, std::char_traits<char> >& std::basic_ostream<char, std::char_traits<char> >::_M_insert<double>(double)", referenced from:


wxString::FromCDouble(double)in libwx_baseu-2.9.a(baselib_string.o)


"std::basic_ostream<char, std::char_traits<char> >& std::basic_ostream<char, std::char_traits<char> >::_M_insert<void const*>(void const*)", referenced from:


operator<<(std::basic_ostream<char, std::char_traits<char> >&, wxScopedCharTypeBuffer<wchar_t> const&)in libwx_baseu-2.9.a(baselib_string.o)


"std::basic_ostream<char, std::char_traits<char> >& std::__ostream_insert<char, std::char_traits<char> >(std::basic_ostream<char, std::char_traits<char> >&, char const*, long)", referenced from:


operator<<(std::basic_ostream<char, std::char_traits<char> >&, wxCStrData const&)in libwx_baseu-2.9.a(baselib_string.o)


operator<<(std::basic_ostream<char, std::char_traits<char> >&, wxScopedCharTypeBuffer<char> const&)in libwx_baseu-2.9.a(baselib_string.o)


wxVariantDataLongLong::Write(std::basic_ostream<char, std::char_traits<char> >&) constin libwx_baseu-2.9.a(baselib_variant.o)


wxVariantDoubleData::Write(std::basic_ostream<char, std::char_traits<char> >&) constin libwx_baseu-2.9.a(baselib_variant.o)


wxVariantDataLong::Write(std::basic_ostream<char, std::char_traits<char> >&) constin libwx_baseu-2.9.a(baselib_variant.o)


wxVariantDataList::Write(std::basic_ostream<char, std::char_traits<char> >&) constin libwx_baseu-2.9.a(baselib_variant.o)


wxVariantDataVoidPtr::Write(std::basic_ostream<char, std::char_traits<char> >&) constin libwx_baseu-2.9.a(baselib_variant.o)


wxVariantDataString::Write(std::basic_ostream<char, std::char_traits<char> >&) constin libwx_baseu-2.9.a(baselib_variant.o)


wxVariantDataULongLong::Write(std::basic_ostream<char, std::char_traits<char> >&) constin libwx_baseu-2.9.a(baselib_variant.o)


wxVariantDataBool::Write(std::basic_ostream<char, std::char_traits<char> >&) constin libwx_baseu-2.9.a(baselib_variant.o)


wxVariantDataWxObjectPtr::Write(std::basic_ostream<char, std::char_traits<char> >&) constin libwx_baseu-2.9.a(baselib_variant.o)


ld: symbol(s) not found

:?: :?: :?:
Auria
Site Admin
Site Admin
Posts: 6695
Joined: Thu Sep 28, 2006 12:23 am
Contact:

Post by Auria »

Hi,

a quick googling hints that the issue may be that you are building with GCC and not G++ (http://www.cplusplus.com/forum/beginner/14434/), i.e. building like it was C
"Keyboard not detected. Press F1 to continue"
-- Windows
tedzini
Knows some wx things
Knows some wx things
Posts: 34
Joined: Tue Apr 20, 2010 2:30 pm

Post by tedzini »

yeah, I understand where you are coming from but the Xcode project type is *supposed* to be linking with stdc++. I should mention that I am also referencing cocoa x86_64 OpenSceneGraph 2.8.3 compiled frameworks (and I see in the source that those libraries also reference std::basic io calls). Time to google around to find a way to examine the actual ld command generated by Xcode 3.2....

Finally, I notice in the samples-make files that carbon.framework is still utilized (and I verified that they it needs to be included) even though I specified cocoa in the ./configure script.

that would very helpful.

thanks,
t
Auria
Site Admin
Site Admin
Posts: 6695
Joined: Thu Sep 28, 2006 12:23 am
Contact:

Post by Auria »

tedzini wrote:yeah, I understand where you are coming from but the Xcode project type is *supposed* to be linking with stdc++. I should mention that I am also referencing cocoa x86_64 OpenSceneGraph 2.8.3 compiled frameworks (and I see in the source that those libraries also reference std::basic io calls). Time to google around to find a way to examine the actual ld command generated by Xcode 3.2....

Finally, I notice in the samples-make files that carbon.framework is still utilized (and I verified that they it needs to be included) even though I specified cocoa in the ./configure script.

that would very helpful.

thanks,
t
sorry, you lost me there, what would be useful? :lol:

Anyway, to see the full build log just check in the build results frame, you can click on some icon on a given step to see the raw build command
"Keyboard not detected. Press F1 to continue"
-- Windows
tedzini
Knows some wx things
Knows some wx things
Posts: 34
Joined: Tue Apr 20, 2010 2:30 pm

Post by tedzini »

Well, the problem was a couple missing macro defs required by OpenSceneGraph 2.8.3. For those few users that are integrating wxWindows with OpenSceneGraph for MACOSX/10.6.x, at least apps will run albeit much more testing to do:

<snip>

GCC_PREPROCESSOR_DEFINITIONS = __WXOSX_COCOA__ WX_PRECOMP _FILE_OFFSET_BITS=64 __USE_OSX_AGL_IMPLEMENTATION__
GCC_PREPROCESSOR_DEFINITIONS_NOT_USED_IN_PRECOMPS = DARWIN_IMAGEIO USE_DARWIN_COCOA_IMPLEMENTATION GLU_TESS_CALLBACK_TRIPLEDOT
<snip>

I still receive rather copious number of ld warnings which I don't understand the cause... that is for another thread,

:wink:

cheers,
t
Post Reply