Upgrade compilation errors
Willem Kokke
wkokke at gmail.com
Mon Feb 4 19:54:35 PST 2008
Better late then never:
wchar_t in c++ is a separate type according to the standard. It is used for
wide chars, and in Visual Studio it is similar to an unsiged short
In fact, it is so similar, that rather them really adding a wchar_t type,
they just typedeffed it in older version of Visual Studio
In 2003 the option got added to make the compiler standard conform regarding
this issue, and in 2005 it became the default (I think)
now if you have a library compile compiled with the old behavior, al its
function signatures will have unsigned shorts in them. ( as wxWidgets does
by default )
If you then compile the application with the standard coform behaviour, it
expects to find all function signatures with a wchar_t, since it is an
actual distinct type that does not implicitly convert
On 10/11/2007, Patrick Steele <steele.patrick at gmail.com> wrote:
>
> I appear to have fixed it :) Previously in my project settings, I had set:
> Treat wchar_t as Built-in Type: Yes
> Setting it to No seems to resolve the problem. I would be interested to
> hear the reason that this fixes it though please? It was vanilla installs=
of
> both versions of wxWidgets.
> Patrick
>
>
>
>
> On Nov 10, 2007 9:25 PM, Patrick Steele <steele.patrick at gmail.com> wrote:
>
> > OS: XP SP2
> > wxWidgets: 2.8.6
> > Compiler: VS 2005
> >
> > Hi,
> > I have just upgraded my wxWidgets source code from 2.6.4 to 2.8.6.
> > Having built the source with default setup ( VC++ compiled static libra=
ries
> > ), I have tested a few of the samples and they seem to work ok on my
> > machine. However, when trying to do a clean and rebuild of my own source
> > code that is dependent upon wxWidgets, I now get the following:
> >
> > ...
> > 4>------ Rebuild All started: Project: trinity_runtime, Configuration:
> > debug Win32 ------
> > 4>Deleting intermediate and output files for project 'trinity_runtime',
> > configuration 'debug|Win32'
> > 4>Compiling...
> > 4>precompiled.cpp
> > 4>Compiling...
> > 4>my_app.cpp
> > 4>my_frame.cpp
> > 4>my_glcanvas.cpp
> > 4>my_glcontext.cpp
> > 4>Generating Code...
> > 4>Compiling manifest to resources...
> > 4>Linking...
> > 4>LINK : D:\trinity\trinity_debug.exe not found or not built by the last
> > incremental link; performing full link
> > 4>trinity_systems_debug.lib(logging.obj) : error LNK2001: unresolved
> > external symbol "public: virtual unsigned int __thiscall
> > wxConvAuto::ToWChar(unsigned short *,unsigned int,char const *,unsigned
> > int)const " (?ToWChar at wxConvAuto@@ UBEIPAGIPBDI at Z)
> > 4>trinity_systems_debug.lib(logging.obj) : error LNK2001: unresolved
> > external symbol "public: virtual unsigned int __thiscall
> > wxConvAuto::FromWChar(char *,unsigned int,unsigned short const *,unsign=
ed
> > int)const " (?FromWChar at wxConvAuto@@ UBEIPADIPBGI at Z)
> > 4>trinity_systems_debug.lib(logging.obj) : error LNK2001: unresolved
> > external symbol "public: virtual unsigned int __thiscall
> > wxMBConv::MB2WC(unsigned short *,char const *,unsigned int)const "
> > (?MB2WC at wxMBConv@@ UBEIPAGPBDI at Z)
> > 4>trinity_systems_debug.lib(logging.obj) : error LNK2001: unresolved
> > external symbol "public: virtual unsigned int __thiscall
> > wxMBConv::WC2MB(char *,unsigned short const *,unsigned int)const "
> > (?WC2MB at wxMBConv@@ UBEIPADPBGI at Z)
> > 4>trinity_systems_debug.lib(logging.obj) : error LNK2001: unresolved
> > external symbol "public: virtual unsigned int __thiscall
> > wxMBConv::ToWChar(unsigned short *,unsigned int,char const *,unsigned
> > int)const " (?ToWChar at wxMBConv@@ UBEIPAGIPBDI at Z)
> > 4>trinity_systems_debug.lib(logging.obj) : error LNK2001: unresolved
> > external symbol "public: virtual unsigned int __thiscall
> > wxMBConv::FromWChar(char *,unsigned int,unsigned short const *,unsigned
> > int)const " (?FromWChar at wxMBConv@@ UBEIPADIPBGI at Z)
> > 4>D:\trinity\trinity_debug.exe : fatal error LNK1120: 6 unresolved
> > externals
> > 4>Build Time 0:05
> > 4>Build log was saved at
> > "file://d:\trinity\source\trinity_runtime\debug\BuildLog.htm"
> > 4>trinity_runtime - 7 error(s), 0 warning(s)
> > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D Rebuild All: 3 succeeded, 1 failed, 0 sk=
ipped =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
> >
> >
> > I'm somewhat confused because I do not call any of the missing functions
> > in logging.cpp , or at least not directly to my knowledge. Can anyone
> > please help?
> > Patrick
> >
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.wxwidgets.org/pipermail/wx-users/attachments/20080205/6ba=
8a78d/attachment.htm
More information about the wx-users
mailing list