# Microsoft Layer for Unicode, Win98 and MSVC++6...?

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

## Recommended Posts

Hello. I am using MSVC++6 with Win98SE and I still can't get it working despite having followed all material I can get my hands on... If I give you all the information about my set-up that I have perhaps someone could spot the problem! I have my unicows.lib in VC98/Lib unicows.dll in the project directory under \Debug In the Project settings. Under the C/C++ tab the preprocessor defintions are:
WIN32, _DEBUG, UNICODE, _UNICODE, _WINDOWS, _MBCS, DEBUG


and the project options are:
/nologo /MLd /W3 /GX /0d /D /"WIN32" /D"_DEBUG" /D /Fp"Debug\Animation Entity.pch" /YX /Fo"Debug/" /Fd"Debug/" /FD /GZ /c


Under the link tab the object/library modules are:
unicows.lib kernel32.lib advapi32.lib user32.lib gdi32.lib shell32.lib comdlg32.lib version.lib mpr.lib rasapi32.lib winmm.lib winspool.lib vfw32.lib secur32.lib oleacc.lib oledlg.lib sensapi.lib strmbasd.lib strmiids.lib d3dx9.lib d3d9.lib dxerr9.lib


And the project options are:
unicows.lib kernel32.lib advapi32.lib user32.lib gdi32.lib shell32.lib comdlg32.lib version.lib mpr.lib rasapi32.lib winmm.lib winspool.lib vfw32.lib secur32.lib oleacc.lib oledlg.lib sensapi.lib strmbasd.lib strmiids.lib d3dx9.lib d3d9.lib dxerr9.lib /nologo /subsystem:windows /incremental:yes /pdb:"Debug\Animation Entity.pdb" /debug /machine:I386 /nodefaultlib:unicows.lib /nodefaultlib:kernel32.lib /nodefaultlib:advapi32.lib /nodefaultlib:user32.lib /nodefaultlib:gdi32.lib /nodefaultlib:shell32.lib /nodefaultlib:comdlg32.lib /nodefaultlib:version.lib /nodefaultlib:mpr.lib /nodefaultlib:rasapi32.lib /nodefaultlib:winmm.lib /nodefaultlib:winspool.lib /nodefaultlib:vfw32.lib /nodefaultlib:secur32.lib /nodefaultlib:oleacc.lib /nodefaultlib:oledlg.lib /nodefaultlib:sensapi.lib /out:"Debug\Animation Entity.exe" /pdbtype:sept


'Generate debug info' and 'Link incrementally' and both checked. I thought that this would work but I still get the error 120 from the following code:
WNDCLASSEX wc = {sizeof(WNDCLASSEX),
CS_CLASSDC,
0L,
0L,
hInstance,
NULL,
NULL,
NULL,
NULL,
L"Star Chart",
NULL};

RegisterClassEx(&wc);

SetLastError(0);
WCHAR error[80];
swprintf(error, L"Error Code: %i", GetLastError());
MessageBox(0, error, L"Error Code", 0);


Does anyone have any ideas? I am pulling my hair out over this! Mark Coleman

##### Share on other sites
According to this page at msdn your linker options should have /nod:kernel32.lib etc. and then unicows.lib and then any of the libraries you need but /nod:ed earlier. Presumably the compiler is set up to link kernel32.lib et. al. by default and the /nod: prevents it from linking them until after it's linked unicows.lib.

I'm just guessing since I've never done this myself but it seems to make sense.

Enigma

##### Share on other sites
Enigma,

I had thought that also, but when I go into the project options and swap them around MSVC++6 just puts them back again?

Does anybody know if there is some way to get MSVC++6 to include library files in a specific order?

Regards.

Mark Coleman

##### Share on other sites
There is a checkbox that says "ignore default libraries" in the linker options.

##### Share on other sites
I checked the box and got 385 errors are saying things about unresolved external symbols?

Is there someway to check the dependencies of my program so that I can include all the lib files in the project settings box?

Mark Coleman

##### Share on other sites
Well, it is doing what you told it to. You add the references back in yourself starting with the default libraries that it lists.

##### Share on other sites
Don't define MBCS if you define UNICODE. The two are orthogonal concepts.

Cheers
Chris

##### Share on other sites
Chris, thanks I should have spotted that one myself.

antareus, I have all these:
unicows.lib kernel32.lib advapi32.lib user32.lib gdi32.lib shell32.lib comdlg32.lib version.lib mpr.lib rasapi32.lib winmm.lib winspool.lib vfw32.lib secur32.lib oleacc.lib oledlg.lib sensapi.lib strmbasd.lib strmiids.lib d3dx9.lib d3d9.lib dxerr9.lib

Could somebody explain to me why these external dependency errors are arising? Is it that the lib I have included automatically include other libs which the linker cannot find because I have told it to ignore them?

I just don't understand the whole link process and if anybody would be kind enough to explain it to me I would be eternally grateful. If I knew what was supposed to be happening then maybe I could go about fixing the problems?

Does anybody have a sample project with MLSU in it that they could mail to me?

Mark Coleman

[Edited by - mrmrcoleman on December 2, 2004 11:16:17 AM]

##### Share on other sites

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

## Create an account

Register a new account

• ### Forum Statistics

• Total Topics
628667
• Total Posts
2984143

• 13
• 10
• 10
• 9
• 9