[Dev-C++] "Hello for Win32 Problem solved!!!"
Open Source C & C++ IDE for Windows
Brought to you by:
claplace
|
From: B. <ama...@uo...> - 2002-11-17 01:36:17
|
Thank you very much gentlemen.
I made a reinstallation in my Dev and the problem disappeared!!! :)
Regards
Andr=E9 Mac=E1rio Barros
xxxxx=3D=3D=3D=3D=3Dxxxx=3D=3D=3D=3D
Let me review, because some new facts happend:
-I'm running in Win'95;
-It's working fine with VC++;
-I have already tried with g++ and the same linker error occurs;
-Compiler Options with CygWin or MingWin produces the same error
code; and...
-This is the First Program of Petzhold's Book, Ch 01.
--->And the problem is:
problem()
{
Hi Folks,
Please give me some help about the following error:
1. I opened the Dev-C++, choose "New Project", choose "Windows
Application", choose "C++ Project" and clicked "OK";
2. I removed from the project the unitc "Untitled" WinMain function
that Dev-C++ puts automatically;
3. I inserted the following unit, called "hello.cpp" in my project:
=3D=3D=3D=3D=3D=3D=3D=3D=3D
#include <windows.h>
int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, PSTR
szCmdLine, int iCmdShow)
{
MessageBox (NULL, TEXT ("Hello, World!"), TEXT
("HelloMsg"), 0) ;
return 0 ;
}
=3D=3D=3D=3D=3D=3D=3D=3D
4. The Project Options were automatically checked for "Compile C++
Project" and "Do not create a console";
5. The Compiler Options, too, was whit the "Compile for Win32"
checked;
BUT....
The following Linker Error is being presented:
Line 2, "Syntax Error before 'int'"
What is happening, gentlemen?
}
Regards
Andr=E9 Mac=E1rio Barros
|