First Visual Studio C++.net Project


G

Guest

I'm attempting to build my first VC++ .net project and I'm unable to get a
clean compile. Please view code below:

// This is the main project file for VC++ application project
// generated using an Application Wizard.

#include "stdafx.h"

#using <mscorlib.dll>

using namespace System;

int _tmain()
{
// TODO: Please replace the sample code below with your own.
Console::WriteLine(S"Hello World");
return 0;
}

The above code is very simple nothing fancy. I continue to get a compile
error however, not errors are display in the output window. What ever the
error is it's not allowing the "exe" to be built.

Does any one see anthing wrong? Where else should I be looking to locate
what's wrong?
thanks
 
Ad

Advertisements

G

Guest

Here's the out of my compile:

Build Log ------- Build started: Project: ASimpleProject,
Configuration: Debug|Win32 -------

Command Lines Creating temporary file "c:\Documents and
Settings\louis.AZALEA\My Documents\Visual Studio
Projects\ASimpleProject\ASimpleProject\Debug\RSP000005.rsp" with contents
[
/Od /AI "C:\Documents and Settings\louis.AZALEA\My Documents\Visual Studio
Projects\ASimpleProject\Debug" /D "WIN32" /D "_DEBUG" /D "_MBCS" /FD /EHsc
/MTd /GS /Yu"stdafx.h" /Fp"Debug/ASimpleProject.pch" /Fo"Debug/"
/Fd"Debug/vc70.pdb" /W3 /c /Zi /clr /TP /FU
"C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\mscorlib.dll"
/FU "C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\System.dll"
/FU "C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\System.Data.dll"
".\AssemblyInfo.cpp"
".\ASimpleProject.cpp"
]
Creating command line "cl.exe @"c:\Documents and Settings\louis.AZALEA\My
Documents\Visual Studio
Projects\ASimpleProject\ASimpleProject\Debug\RSP000005.rsp" /nologo"
Creating temporary file "c:\Documents and Settings\louis.AZALEA\My
Documents\Visual Studio
Projects\ASimpleProject\ASimpleProject\Debug\RSP000006.rsp" with contents
[
/Od /AI "C:\Documents and Settings\louis.AZALEA\My Documents\Visual Studio
Projects\ASimpleProject\Debug" /D "WIN32" /D "_DEBUG" /D "_MBCS" /FD /EHsc
/MTd /GS /Yc"stdafx.h" /Fp"Debug/ASimpleProject.pch" /Fo"Debug/"
/Fd"Debug/vc70.pdb" /W3 /c /Zi /clr /TP /FU
"C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\mscorlib.dll"
/FU "C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\System.dll"
/FU "C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\System.Data.dll"
".\stdafx.cpp"
]
Creating command line "cl.exe @"c:\Documents and Settings\louis.AZALEA\My
Documents\Visual Studio
Projects\ASimpleProject\ASimpleProject\Debug\RSP000006.rsp" /nologo"
Output Window Results Build log was saved at
"file://c:\Documents and Settings\louis.AZALEA\My Documents\Visual Studio
Projects\ASimpleProject\ASimpleProject\Debug\BuildLog.htm"
ASimpleProject - 1 error(s), 0 warning(s)

Thanks
 
Ad

Advertisements

C

Carl Daniel [VC++ MVP]

Larry said:
Here's the out of my compile:

<build log snipped>

Could you post the text from the Output window in the VC++ IDE?
Unfortunately, the build log doesn't show what the errors were - just that
there were errors.

-cd
 
G

Guest

The output is below:
------ Build started: Project: ASimpleProject, Configuration: Debug Win32
------


Build log was saved at "file://c:\Documents and Settings\louis.AZALEA\My
Documents\Visual Studio
Projects\ASimpleProject\ASimpleProject\Debug\BuildLog.htm"
ASimpleProject - 1 error(s), 0 warning(s)


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

Build: 0 succeeded, 1 failed, 0 skipped

Thanks
 
G

Guest

Larry,
Have you tried rebuilding it twice? I have found that it usually reports
no errors on the second attempt.

John Gabriel
 
G

Guest

I've tried building it serveral times and get the same results. I've also
perform a run on it and received the message that the project is out of date.
I click the yes button to build the project and still get the same results.

Does anyone know what might be happing here.

Thanks
 
P

Peter van der Goes

Larry Bird said:
I'm trying to use the console template.

Thanks
OK, I've copied the code in your original post into a Console Application
shell here, and it compiles without error and runs correctly. That
exonerates the code. How long have you had Visual Studio installed (And,
please say which version you have. I use Visual Studio .NET 2003), and have
you tried any other project/template types to see if they work (a simple VB
Windows app, for instance)?
Right now, it looks as if there is something wrong with your installation,
and with only the symptoms reported to go on, I'd suggest a repair install
of Visual Studio.
 
Ad

Advertisements

G

Guest

Yeah I know what your problem is, I'm having the same problem. However, I do
not know what to do since I'm having the same problem. When you create that
app there are two files needed to compile that code, AssemblyInfo.cpp,
stdafx.cpp, and some other ones. One of two of them are not loading,
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

ArrayList 3
VC++2003.NET to Visual Studio EXPRESS 2
C1190 Error 4
ANSI C to VC++ 2008 2
Newbie Question 8
Having problems initializing a managed array 3
OpenSSL projects in VC2008 4
Help 1

Top