Jump to content
  • Advertisement
Sign in to follow this  

Microsoft Layer for Unicode compilation...

This topic is 4979 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I am currently trying to get the MSLU compiling correctly in my application but I am not sure that I fully understand the MSDN documentation and was hoping that some of the more experienced members here might be able to help me out a little. On the MSDN page 'Compiling your applications with the Microsoft Layer for Unicode' (http://msdn.microsoft.com/library/default.asp?url=/library/en-us/mslu/winprog/compiling_your_application_with_the_microsoft_layer_for_unicode.asp) I can't quite see if I am supposed to use LaodLibrary or not. I have followed steps 1, 2 and 3 but do I then need to LoadLibrary unicows.dll or is this done automatically? Also, if I do need to use LoadLibrary, is it sufficient to just call LoadLibrary(L"unicows.dll") or do I have to do something with the handle that is returned? Also where would a load library call go? In a global area? Or in my winmain? This probably seems like a stupid question but I need to be sure that I am doing this correctly. Thanks in advance for any help. Mark Coleman p.s. How do I put hyperlinks in my posts? URLs copied and pasted don't look to good! [Edited by - mrmrcoleman on December 1, 2004 2:44:33 PM]

Share this post

Link to post
Share on other sites
Which three steps are you following? The ones that asks you to add UnicoWS.dll and UnicoWS.lib and tells you to set a bunch of link options or the ones that tell you to add certain code to your application?

If the three steps with the link options (the first set on your link) you do not need to call LoadLibrary(). The system will do it for you.

If you do the second set of three steps you will need to call LoadLibrary(). If you do this step you do not want to call


since that would attempt to call the Unicode API. You want to call instead


so that the ANSI version of the API is explicitly used.

Share this post

Link to post
Share on other sites

I have followed the instructions as per the web page and I get the following error:

unicows.lib(thunk_kernel32_CompareStringW.obj) Fatal Error LNK1103: debugging information corrupt; recompile module

Any ideas anybody?

Also, in the MSDN instructions it states that the link options should read:

nod: declarations -> unicows.lib -> rest of the libraries

however when I put the link options into my compiler like this it rearranges them so that the rest of the libraries come first followed by the nod: declarations?

I assume I correct in adding all this to the project options windows in the Link Tab of the Project Settings menu item in MSVC++6?

Could somebody post their project options please so that I might be able to see what I am doing wrong?

Thanks again.

Mark Coleman

[Edited by - mrmrcoleman on December 1, 2004 5:28:48 PM]

Share this post

Link to post
Share on other sites
Sign in to follow this  

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!