Sign in to follow this  

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.

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

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 this post


Link to post
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 this post


Link to post
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 this post


Link to post
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 this post


Link to post
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

already being put back in.

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?

Thanks in advance.

Mark Coleman

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

Share this post


Link to post
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.

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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this