Okay, so I'm using Visual C++. I made a Win32 project. I've barely touched the code, although I took all of these changes out and it made no difference. Whenever I compile, I get four errors and one warning:
1 2 3 4 5
Error 1 error C2143: syntax error : missing ';' before 'constant' c:\documents and settings\randy\desktop\xbla_spawn\xbla_spawn.rc 20
Error 2 error C4430: missing type specifier - int assumed. Note: C++ does not support default-int c:\documents and settings\randy\desktop\xbla_spawn\xbla_spawn.rc 20
Warning 3 warning C4068: unknown pragma c:\documents and settings\randy\desktop\xbla_spawn\xbla_spawn.rc 21
Error 4 error C2065: 'hInst' : undeclared identifier c:\documents and settings\randy\desktop\xbla_spawn\xbla_spawn.cpp 112
Error 5 error C2065: 'hInst' : undeclared identifier c:\documents and settings\randy\desktop\xbla_spawn\xbla_spawn.cpp 153
Now, I really want to get on with Win32, but I have no idea how to solve these stupid errors!
Can someone help me?
maybe post your code here, anyway i think Error 1 is caused by missing semicolon in line 19
and Error 2 occures because main() should be int type (according to std), you probably typed something like this:
1 2 3 4
main()
{
//...
}
Error 4/5? probably you're using local variables declared once in oher scope, or you just forgot to declare it
Error 1 - you are missing a semicolon somewhere in the specified file.
Error 2 - one of your functions or variables is not cast
Error 3 - unknown pragma statement
Error 4 - the variable hInst is undeclared
Error 5 - same as Error 4
Guys, guys, guys, I can read.
I don't need you to spell out what the errors mean. I need help solving them. I shouldn't even be getting errors, seeing as how all of the source code is auto generated.
Also, most of these errors are in .RC files, which means I really can't solve them, because I have no clue what syntax .RC uses.
RC files are text files just like any other code file. The compiler is telling you where the error is and what the error is. If you can't make hay out of that you probably need to buy a basic book on C/C++ programming.
For example, the first error is a missing semicolon in xbla_spawn.rc
This means you need to open xbla_spawn.rc and locate the missing semicolon. This is basic C/C++.
Obviously you have not run into many resource files.
I would really appreciate help from someone who has actually used VC++ 2008 to do a Win32 project, and am also wondering if they got these errors aswell with the premade source files.
I use VC++ 2008 and have written numerous WIN32 Project Windows programs, which in turn means I have created numerous RC files.
What's obvious is that you are the one who doesn't have a CLUE about resource files.
Now, once again, if you want to fix your error, open the resource file and locate the missing semicolon. Then go through the resource file to fix the remaining errors in the same way.
Here's yet another hint for you... as I stated before, resource files are text files. If you don't know how to open a text file, take a class on basic Windows use.
Moreover, you need to more fully explain what you mean by "premade". That term could mean anything, from writing not an iota of code to dickering around with things once the original project was set up by VC.
In fact, when you stated above that you have "removed" all the code, it is clear that you or someone has inserted errors into the original code. You only THINK you have removed them.
The compiler is right; you are wrong. Always.
What steps exactly have you taken. VC won't give these errors unless you or someone else has dickered with the code or with other things in the project.
If you really did do nothing more than add and remove header files without affecting anything else, you won't get errors. If you do get errors, you -- not the compiler -- have done something wrong.