Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

help building/compiling .cpp file.

Status
Not open for further replies.

mstrdrgn1012

Programmer
Nov 11, 2004
8
0
0
US
this may seem ridiculous...but I'm not used to this version of visual c++, and i cant even seem to be able to compile a VERY SIMPLE .cpp file. i just want to build/compile and execute it. In my old version, i just went under Debug and selected build, then compile, then execute.
sry if it sounds ridiculous...but the help files do NOT help.....

im using microsoft visual c++ 6.0 Beta version (the one thats up for download by microsoft right now). a lil help ASAP please, thank u.
 
ok well, i coudln do that cuz apparenlty u need ur file to be attached to a project...(sry)

but now, when i build it and run it (or just run it), the black window shows up, then disapears without showing anything, and i dont see the output at all....

and this is the message i get:

'Love.exe': Loaded 'C:\Documents and Settings\Alexandre\My Documents\Visual Studio\Projects\Love\Love\Debug\Love.exe', Symbols loaded.
'Love.exe': Loaded 'C:\WINDOWS\SYSTEM32\NTDLL.DLL', Exports loaded.
'Love.exe': Loaded 'C:\WINDOWS\SYSTEM32\KERNEL32.DLL', Exports loaded.
The program '[3180] Love.exe: Native' has exited with code 0 (0x0).
 
im using the 2005 (express) beta version. and i hate it.

oh and i ALWAYS get 0 error messages no matter what my code is............that cant be normal.
 
What happens if you put a breakpoint on the first line of code in main() and run it in the debugger? If it stops at the breakpoint, step through line by line and see if it does what you were expecting.
 
no, i still get the same thing happen. the window appears then disapears and i get that same message....
i dont think it compiled it at all...cuz i always get 0 errors, even when i pur ridiculous code.
 
I don't have the 2005 Beta, but if it is anything like 2003, then try this:[ul][li]Open Visual Studio and close any open files, projects or solutions.[/li]
[li]Go to File->New->Project.[/li]
[li]In the dialog, select the Visual C++ projects folder on the left, and Empty Project (.NET) on the right.[/li]
[li]Type in the name for your project and make sure the location is correct, then hit OK.[/li]
[li]Go to Project->Add New Item.[/li]
[li]In the dialog, select the Visual C++ folder on the left, and C++ File (.cpp) on the right.[/li]
[li]Type in the name for your file, then hit Open.[/li]
[li]Add your code.[/li]
[li]Go to Build->Build Solution, or hit F7.[/li][/ul]
It should have something like this in the output window:
------ Build started: Project: ProjectName, Configuration: Debug Win32 ------

Compiling...
FileName.cpp

Build log was saved at "file://c:\MyProjects\ProjectName\Debug\BuildLog.htm"
ProjectName - 0 error(s), 0 warning(s)


---------------------- Done ----------------------

Build: 1 succeeded, 0 failed, 0 skipped
 
well yeah, i get that. but im used to using VC++ 6.0, and correct me if im wrong, but i should get that lil black window to pop up and show the output.
otherwise how do i get the output???
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top