Advertisement

Win32 hworld on WinXP

Started by June 01, 2002 01:10 AM
12 comments, last by anarchyhl 22 years, 5 months ago
Hello, I have been trying a hello world program written using Windows code, not C++ (printf("hello world") and I tried it on my computer with Windows XP. It didn't work (not surprised, XP has a shitload of problems). It does work on my other computer that has Windows 98 (Probably because XP is NTFS, not FAT32?) Heres my error: --------------------Configuration: win32_2 - Win32 Debug-------------------- Compiling... win32_2.cpp Command line error D2027 : cannot execute 'c1xx' Error executing cl.exe. win32_2.exe - 1 error(s), 0 warning(s) Heres the code: #define WIN32_LEAN_AND_MEAN #include <windows.h> int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nShowCmd) { MessageBox(NULL, "\tHello, World!", "My First Windows Application", NULL); return 0; } If anyone can give me any help or direction in what to do, it will be greatly appreciated. [edited by - anarchyhl on June 1, 2002 7:48:42 PM]
-oompa loomparea51
Maybe you could tell us how you''ve tried to do it, and what happens.

-Neophyte

-----BEGIN GEEK CODE BLOCK-----
Version: 3.1
GED d- s:+ a- C++$ UL++ P++ L++ E W+ N+ o K? w !O M--(+) V-- PS+
PE Y+ PGP t-- 5++ X+ R(+) rv+(++) b+++ DI+ D(+) G e+>++ h r--> y+
----- END GEEK CODE BLOCK-----
geekcode.com
Advertisement
heh...oops...

Heres my error:

--------------------Configuration: win32_2 - Win32 Debug--------------------
Compiling...
win32_2.cpp
Command line error D2027 : cannot execute ''c1xx''
Error executing cl.exe.

win32_2.exe - 1 error(s), 0 warning(s)


Heres the code:

#define WIN32_LEAN_AND_MEAN

#include <windows.h>

int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int

nShowCmd)
{
MessageBox(NULL, "\tHello, World!", "My First Windows Application", NULL);
return 0;
}
-oompa loomparea51
Try creating a new project from scratch and move your source files in it.
---visit #directxdev on afternet <- not just for directx, despite the name
IndirectX - That didnt work
-oompa loomparea51
I had no problems compiling/running with VC++ .NET and VC++ 6.0 in WinXP.

/*=========================================*/
/* Chem0sh */
/* Lead Software Engineer & Tech Support */
/* http://www.eFaces.biz */
/*=========================================*/
/*=========================================// Chem0sh// Lead Software Engineer & Tech Support// http://www.eFaces.biz=========================================*/
Advertisement
Have you tried reinstalling your VC UNDER XP?
"after many years of singularity, i'm still searching on the event horizon"
When you installed MSVC did you turn off your Norton Antivirus. Sometimes you have to turnoff it off while installing Micro$oft products.


-----------------------------
"There are ones that say they can and there are those who actually do."

"...u can not learn programming in a class, you have to learn it on your own."

-----------------------------"There are ones that say they can and there are those who actually do.""...u can not learn programming in a class, you have to learn it on your own."
D2027
quote: Original post by anarchyhl
Hello, I have been trying a hello world program written using Windows code, not C++ (printf("hello world") and I tried it on my computer with Windows XP. It didn''t work (not surprised, XP has a shitload of problems). It does work on my other computer that has Windows 98 (Probably because XP is NTFS, not FAT32?)

Heres my error:

--------------------Configuration: win32_2 - Win32 Debug--------------------
Compiling...
win32_2.cpp
Command line error D2027 : cannot execute ''c1xx''
Error executing cl.exe.

win32_2.exe - 1 error(s), 0 warning(s)


Heres the code:

#define WIN32_LEAN_AND_MEAN

#include <windows.h>

int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int

nShowCmd)
{
MessageBox(NULL, "\tHello, World!", "My First Windows Application", NULL);
return 0;
}


If anyone can give me any help or direction in what to do, it will be greatly appreciated.

[edited by - anarchyhl on June 1, 2002 7:48:42 PM]



what is "#define WIN32_LEAN_AND_MEAN" in there for?
i think thats your problem

------------------------------http://foogoo.web-trash.com (under construction)

This topic is closed to new replies.

Advertisement