Re: [Dev-C++] [Fwd: "Hello World!" for Win32 Compiling Error]
Open Source C & C++ IDE for Windows
Brought to you by:
claplace
|
From: Brenden T. <br...@rc...> - 2002-11-16 20:14:28
|
Your program compiles fine for me also. However....
>BUT....
> The following Linker Error is being presented:
> Line 2, "Syntax Error before 'int'"
>
1. Linker error? Are you sure, or does it say "Build Error"?
2. Assuming that it is "Build Error", I can reproduce your problem if I
change the program like this:
#include <windows.h>
blet int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, PSTR
szCmdLine, int iCmdShow)
{
....
See the "blet" in there? That give me "sytax error before 'int'". So I
have two ideas:
A. You have an illegal control character (ASCII 0 - 31) in your file.
It doesn't display, but it's still there. Delete completely the first
three lines and retype them carefully by hand. (Don't cut and paste.)
If this doesn't work...
B. You have a bad install of Dev Cpp. "Windows.h" has some problem that
is not correct, but the complier doesn't see the problem until it gets
to the first line of your function definiton. (Note: your "windows.h"
may also have a problem if you ever opened any ".h" file to look at it,
and then accidently pressed a key on the keyboard and saved the file.
If you think this is the case, try to remember which file it was and
see if you can go back and fix it by inspection. Otherwise...) You need
to uninstall Dev-Cpp, then delete manually any remaing files and
directories (including C:\Dev-Cpp). Delete the old install file too.
Empty trash and reboot. Then download Dev Cpp again and re-install it.
Hope this one works better.
Those're my best guesses. Good luck.
Brenden
|