Bonjour
macOS 10.13 - Xcode 9 - wxWidgets 3.1.0
Build "libwx_osx_cocoa.dylib" via ".../wxWidgets-3.1.0/build/osx/wxcocoa.xcodeproj"
OK after
"verify_noerr" to "__Verify_noErr" and "#define wxOSX_USE_QTKIT 1" to "#define wxOSX_USE_QTKIT 0"
Create Xcode project "wxHello" from example "http://docs.wxwidgets.org/trunk/overvie ... world.html"
OK, after inserting flags in Xcode > Other C++ Flags (NB: the method used does not provide wx-config !)
Problem : "wxString::Format(wxT("%d"), ijk);" cause error :
"Undefined symbols for architecture x86_64:
"_wxCRT_StrlenW", referenced from:
wxStrlen(wchar_t const*) in main.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)"
NB: remplacing by "wxString(to_string(ijk))" is OK
Help please
Merci
wxString::Format(wxT("%d"), ijk) error Topic is solved
-
- Filthy Rich wx Solver
- Posts: 235
- Joined: Fri Sep 14, 2012 8:26 am
- Location: Kontich, Belgium
- Contact:
Re: wxString::Format(wxT("%d"), ijk) error
Hi,
First of all, I think the wxT macro is obsolete, or wil become so.
Second, you work on a Mac with xcode. and the error says something about architecture X86_64 which is normal to windows environments. So encountering susch a strange error description my experience tells me almost always this is caused by a missing header file. So I would advise you to re-examine your code to make sure all functions used like strlen which may be used in wxString::Format is included in any way by headers.
Third, do you need to declare some constants like I had to do in my VisualStudio environment (wxMSVC_VERSION_AUTO, WXUSINGDLL) Maybe you need to set such flags too for Mac development ?
Good luck
Regards,
Nunki
First of all, I think the wxT macro is obsolete, or wil become so.
(taken from the wxWidgets 3.0.3 online documentation.Note that since wxWidgets 2.9.0 you shouldn't use wxT() anymore in your program sources (it was previously required if you wanted to support Unicode).
Second, you work on a Mac with xcode. and the error says something about architecture X86_64 which is normal to windows environments. So encountering susch a strange error description my experience tells me almost always this is caused by a missing header file. So I would advise you to re-examine your code to make sure all functions used like strlen which may be used in wxString::Format is included in any way by headers.
Third, do you need to declare some constants like I had to do in my VisualStudio environment (wxMSVC_VERSION_AUTO, WXUSINGDLL) Maybe you need to set such flags too for Mac development ?
Good luck
Regards,
Nunki
Re: wxString::Format(wxT("%d"), ijk) error
You are right :
"wxString::Format("%d", ijk);"
works !
Merci
"wxString::Format("%d", ijk);"
works !
Merci