Hi Di,
you shouldn't be compiling OSG with the unicode setting. If you're in Visual
C++ then for all OSG projects the General/Character Set setting should be
"Use Multi-Byte Character Set". However, if you want to use different
settings for other projects in your solution that will work fine.

2010/12/27 Di xiaoru <[email protected]>

> Hi Robert,
>
> OSG can not correctly compile with unicode setting in windows, because the
> problem of string or windows handler.
>
> I find it can be solved by  changing code as the follow:
>
> // GraphicsWindowWin32.cpp
>
>     WNDCLASSEX wc; // ln 639
>     WNDCLASSEXA wc;
>
>     wc.hIcon         = ::LoadIcon(hinst, "OSG_ICON"); // ln
> ->    wc.hIcon         = ::LoadIconA(hinst, "OSG_ICON");
>
>     if (::RegisterClassEx(&wc)==0) // ln 660
>     if (::RegisterClassExA(&wc)==0)
>
>     HWND hwnd = ::CreateWindowEx // ln 706
>     HWND hwnd = ::CreateWindowExA
>     SetWindowText(_hwnd, name.c_str());
>     SetWindowTextA(_hwnd, name.c_str());
>
> and some else in other file
>
>  LoadLibrary -> LoadLibraryA
>  GetFullPathName ->  GetFullPathNameA
>  GetShortPathName -> GetShortPathNameA
>  GetLongPathName ->  GetLongPathNameA
>
> Cheers,
> / Di xiaoru
>
>
>
>
>
> _______________________________________________
> osg-submissions mailing list
> [email protected]
>
> http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org
>
>
_______________________________________________
osg-submissions mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org

Reply via email to