really stuck on visual C++ 6.0

Started by
25 comments, last by yeeha_sf 15 years, 11 months ago
As I read in the very first lesson, I should make a windows 32 application, add 3 libraries on place and even though I wrote the code in the lesson letter by letter just to try doing it all alone, but whatever I try the program simply doesnt work. I was wondering what 's really best like a start - an empty or simple application from the wizzard, even does it have to be a win32 or win32 console application, but its interesting that I 've got all the variety of errors that 's possible - there is an overall of 3 variations : first, program 's getting stuck om compilation, for this one saying something s wrong with some previewed header files or somethin'... Second, getting stuck on building, for this one saying something 's wrong with main_ I dunno what and a second error, I dont remember what, but that 's generally what 's happenning. And finally, the third variation, the most frustrating, because it actually compiles and builds everything, even asking fullscreen or not, but then comes the rout - failed to register some class, you know, I think that program 's very buggy and maybe it even hates me already - I don 't have an explanation for any of these - my main problem is no matter how I fight, I never get the blessed .EXE file ready and working - the only way I 'm getting it is by writting some simple and nothing-doing program, and I can 't get a clue how did NeHe manage to create, hold and even make the .EXE file work even without the need for the .CPP file to be checked and clean - I 've tried everything and I 'm really stuck...
Advertisement
Visual C++ 6.0 was released in 1998. There are far better tools available to you now, for free. I would recommend you go pick up Visual C++ 2008 Express Edition. Your problems appear to be with manipulating the UI; a modern toolkit will allow people here to help you more effectively and be of more use to you (there have been a lot of improvements to VC++ since 1998!).

EDIT: Paragraph breaks also help make your posts easier for people to understand. :)
http://edropple.com
Visual C++ 6.0 is VERY outdated. Not to say it shouldn't be working fine, but you might find better documentation and a world of people who can help you if you have a more recent version.

The Visual Studio Express versions are free to download, go ask microsoft.com

"The right, man, in the wrong, place, can make all the dif-fer-rence in the world..." - GMan, Half-Life 2

A blog of my SEGA Megadrive development adventures: http://www.bigevilcorporation.co.uk

Step 1: Uninstall VC 6.
Step 2: Take VC6 CD and break it in half
Step 3: Burn the remains of the CD
Step 4: Download Visual Studio 2008 and install it.

VC6 is an absolutely terrible compiler. It came out before the first C++ standard (Over 10 years ago), so it's extremely non-compliant; particularly with templates. It doesn't optimise (Unless you have the professional version) whereas the free version of VC2008 does, it produces incorrect code in some cases, it crashes frequently, and a lot of SDKs and APIs don't support it at all (E.g. DirectX).

EDIT: Bah, too slow [smile]
Quote:Original post by yeeha_sf first, program 's getting stuck om compilation, for this one saying something s wrong with some previewed header files or somethin'...


What is the error reported?

Quote:Second, getting stuck on building, for this one saying something 's wrong with main_ I dunno what


What is the error reported?

Quote: and a second error, I dont remember what, but that 's generally what 's happenning.


What is the error reported?

And finally, the third variation, the most frustrating, because it actually compiles and builds everything, even asking fullscreen or not, but then comes the rout - failed to register some class


What is the error reported?

Quote: and clean - I 've tried everything and I 'm really stuck...


You forgot to list the errors reported.

In same style, one reply to this could be: Fix the problems and it'll work fine.

But when you get an error message, something like 'C4531: Could not....', put that into google. If it's a common problem, it should put you on right track to fixing it.
You know, there are mainly two reasons for why Ï was relying so much on 6.0 - firstly, those very first lessons here on the site are exactly about this version and I was actually relying on them. And secondly, everything free that I found over the net looks just as aged as these lessons. Maybe there are some newer versions of those three great books - green, blue and red, mainly red, because you see, my problem is I can't even start from somewhere so that I can be online with every new version, but I 'll try to find something more fresh like books and programs, although the newer they are, the harder for me like a non-specialist.
Unfortunately when it comes to programming the world changes very quickly. In 5 years time API's will have new versions and could be radically different, and newer tools will be out that make the old ones outdated. I understand it's probably difficult finding a place to jump in especially with so many outdated tutorials floating around, but trust me we're not steering you wrong by telling you to use the latest tools available. Using VC6 will only frustrate you to no end and will prevent others from helping you out (since we all abandoned VC6 years ago).

Antheus, as listed in my first post, the errors are :

First :

c:\program files\microsoft visual studio\myprojects\fds\fds.cpp(291) : fatal error C1010: unexpected end of file while looking for precompiled header directive
Error executing cl.exe.

fds.obj - 1 error(s), 0 warning(s)

Second :

LIBCD.lib(crt0.obj) : error LNK2001: unresolved external symbol _main

Debug/rewq.exe : fatal error LNK1120: 1 unresolved externals
Error executing link.exe.

rewq.exe - 2 error(s), 0 warning(s)

Third :

like Message Box :

Error; Failed to register the window class;

I saw that was somewhere in the code, exactly like :

if(!RegisterClass(&wc))
{
MessageBox(...);
return FALSE;
}

Is there a way to make really working applications on 6.0 ?
First: turn off precompiled headers in the project options.

Second: you must create a Windows application project (not a Console application project) when you use WinMain (as opposed to main).

Third: it sounds like you used a class name that is already in use or some other value you set in your WNDCLASS structure is invalid.

Fourth: get rid of VC6.
I used VC++ 6 pretty heavily for the last 5 years and it worked well enough. I had created some fairly massive sets of game applications/servers/clients/editors/utilities and examined quite a few examples form various gam programming books.

Lots of online samples (many dozens I tried) were still available which worked in VC++6 without many changes.
I sometimes had problems converting other sample program's project files back into the old format (often I just built new projects).
I always figured that when I needed optimization, I would then convert to the latest (or to the Intel one). My large project still hasnt reached the point that this is needed.

I recently installed the VC++8 express freebie compiler (and the DirectX10 SDK)to see what had changed interface-wise and was relieved to see much of it operated the same way.

Its actually funny because I will be using clustered computers to run AI in my project and I will have to convert large chunks of code/applications to run on Linux. Fortunately those are number crunchers which have only a network+console interface. I also mostly program C++ like C and dont use Templates so conversions shouldnt be too bad (I had previously spot tested some of my code on 'compliant' compilers and had virtually no changes to make.)
--------------------------------------------[size="1"]Ratings are Opinion, not Fact

This topic is closed to new replies.

Advertisement