Visual C++ 2005 Express Edition Beta???

Well its takes a bit of time to get it working, but it does the job. The main problem is it is missing alot of headers, so you might have to download the Platform SDK, to get it to work. Also you might whant to install it on a drive you dont care about reformatting, since it installs the .NET 2.0, very buggy framework. So I would still stick with VS C++6, in less I had no other choice, or if you used something else?
So be careful, if you decide to use it, something can go around and mess up your hard drive.

If you want to get it working, ill pm you the link.
 
Yah i noticed it was looking for header files when i tried to compile my cl_dll with my new stuff in it. It just kept on failing. So thanks for the Platfrom SDK Link

If you could send me the link that would be great :D
 
Raxel said:
Well its takes a bit of time to get it working, but it does the job. The main problem is it is missing alot of headers, so you might have to download the Platform SDK, to get it to work. Also you might whant to install it on a drive you dont care about reformatting, since it installs the .NET 2.0, very buggy framework. So I would still stick with VS C++6, in less I had no other choice, or if you used something else?
So be careful, if you decide to use it, something can go around and mess up your hard drive.

If you want to get it working, ill pm you the link.

*coughcoughvisualstudio.net2003architechtenterpriseeditioncoughcough* :cheese:
 
Just be aware it's a beta and it'll stop working march 2005, oh and you're not really allowed to distribute anything you make with it :)
 
i'd rather wait for a stable release, plus 2003 does a fine job anyway :)
 
Oddly enough, I downloaded this earlier today. I've given up trying to find a true free C++ compiler that is actually decent so the beta was the next choice. ;) I can't work out how to get a simple .NET console app working though. I enter in this, copied from a C++ tutorial, and get "fatal error C1010: unexpected end of file while looking for precompiled header directive".

Code:
#include <iostream.h>
using namespace std;
int main()
{
     cout << "Hello World\n";
     return 0;
}
 
Turn off the "Precompiled Header" option in the C++ compiler properties for your project.

botman
 
Varsity said:
Oddly enough, I downloaded this earlier today. I've given up trying to find a true free C++ compiler that is actually decent so the beta was the next choice. ;) I can't work out how to get a simple .NET console app working though. I enter in this, copied from a C++ tutorial, and get "fatal error C1010: unexpected end of file while looking for precompiled header directive".

Code:
#include <iostream.h>
using namespace std;
int main()
{
     cout << "Hello World\n";
     return 0;
}

Well, the tutorial you used is *wrong*. "Iostream.h" (as opposed to "iostream") does not use namespaces -> namespace std has not be defined -> the line "using namespace std;" should cause an error.

The code should be
Code:
#include <iostream>
using namespace std;
int main()
{
     cout << "Hello World\n";
     return 0;
}

or

Code:
#include "iostream.h"
int main()
{
     cout << "Hello World\n";
     return 0;
}
 
I've tried all possible configurations of your and botman's suggestions, and none of them work. Using the iostream.h variation gives me
Code:
Unit1.cpp(1) : fatal error C1083: Cannot open include file: 'iostream.h': No such file or directory
and using plain iostream gives me
Code:
Unit1.obj : error LNK2005: _main already defined in Test App.obj
Unit1.obj : error LNK2005: "int __cdecl main(void)" (?main@@$$HYAHXZ) already defined in Test App.obj
 
. I've given up trying to find a true free C++ compiler that is actually decent

Any reason why you don't like MinGW? It's a perfectly good compiler, MinGW Studio is an IDE for it that I use. Ok it's not as good as MSVS.Net but it does the job.

iostream.h will not work as it's not a standard header as you can see from the error message it gave you, you have to use just iostream. Oh and try to not use using namespace std as well (it's bad practice), put std::cout or whatever instead.

What kind of project did you create? That second error message seems a bit odd and I can't think of anything that would be causing it off the top of my head, it's basically saying you've got two main functions which you haven't which means you've probably set up the project wrong somehow, or chosen the wrong project type.
 
It's a simple .NET console app (the main reason why I wanted to use VC++, .NET). Your suggestion leads to
Code:
nit1.obj : error LNK2005: _main already defined in Test App.obj
Unit1.obj : error LNK2005: "int __cdecl main(void)" (?main@@$$HYAHXZ) already defined in Test App.obj
Could this just be due to it being beta? I can't see how they would release a beta that was incapable of a simple console app.

Edit: I made a WIN32 console app, and this code worked:
Code:
#include "stdafx.h"
#include "iostream"


int _tmain(int argc, _TCHAR* argv[])
{
	std::cout << "Hello World";
	return 0;
	
}
 
I found the problem: when I made the project, no files opened so I assumed I needed to create my own. The actual file I want is projectt.cpp, hidden away in the solution explorer.
 
Raxel said:
So I would still stick with VS C++6, in less I had no other choice, or if you used something else?
Ugh. IMO the VCExpress beta is pretty damn polished for a beta, and VC6 is crap.

I would recommend using 2005 over VC6 anyday.

The hassle of setting up the PSDK and default project properties is worth the gains in having a nice ISO-compliant C++ compiler, and it has a great IDE to boot.
 
I give up: are there any specific VS C++ 2005 tutorials or guides? It's so different from previous versions of the language that everything I've found is next to useless.
 
It's C++

It's compliant.

What did you program in before?
 
Pascal. And no it isn't compliant:
Console::WriteLine("Hello, what is your name?");
String^ name = Console::ReadLine();
Console::Write("Hello ");
Console::Write(name);
Console::ReadKey();
 
Varsity, VC2005 is, supposed to be, more compliant than previous versions.

The problem you're encountering is that VC2005 actually contains 2 langauges; C++ and managed C++. The code you just showed is managed C++ not C++.
 
But I have to use managed C++ to build .NET apps? I'm guessing I do.
 
Ok im a little new to C++ but i downloaded and installed Visual C++ 2005 beta 2 edition and i cant seem to work it. does it have a built in compiler or should i stick to Dev-C++ for compiling?
 
It has one of the best compilers there is.
In 6.0 it's f7 to compile, and ctrl+f5 to run.
 
Hmmm wierd. I just downloaded it and tested it. I'm getting some wierd error.

First it told me that I should add
Code:
#include "stdafx.h
and then after that it says I'm missing a precompiled header file, which is in the directory of the project I'm in...

Code:
#include <iostream>
#include "stdafx.h"

using namespace std;

int main()
{
	cout << "Hello HL2.net!" << endl;
	return 0;
}

It runs fine using Visual Studio 2003 .NET... Well, that's what you get for using beta software :p
 
I have this problem too. I tried typing the hello world program but a fatal error results.
The following is my code:

#include <iostream.h>

void main()
{
cout << "Hello World!\n";
}

The error:

fatal error C1010: unexpected end of file while looking for precompiled header. Did you forget to add '#include "stdafx.h"' to your source?

Can someone care to explain the remedy for it?
 
Actually, as far as I'm aware, Visual C++ 2005 has three versions. Standard C++, the most standards-compliant version from MS yet, and then two .net flavours, managed extensions for C++ (MC++), and C++/CLI. You need to be using MC++ or C++/CLI to make .net apps, otherwise you're just doing native. C++/CLI is the newest and preferred syntax, I think. If you're only using standard native C++, you might want to make sure the /clr switch is turned off in the compiler options.

Looks like you're using C++/CLI though Varsity, String^ is a new thing in the C++/CLI syntax that means "String handle" to differentiate a garbage-collected .net type from a standard C++ object pointer, which was a problem with the MC++ syntax.
 
^Ben said:
I dunno, try including #include "stdafx.h ?

In my post I said I get that, sorry I didn't make it clear, and I should have actually included the exact error message I get.

Code:
fatal error C1083: Cannot open precompiled header file: 'Release\TestCompile.pch': No such file or directory

Anyways the above post got me looking around. There is indeed an option to turn off Pre-Compiled Headers, obviously I did. Then I removed the stdafx.h file (because it gave errors otherwise), but now I get this lovely beauty of an error when linking.

Code:
MSVCRT.lib(crtexew.obj) : error LNK2019: unresolved external symbol _WinMain@16 referenced in function _WinMainCRTStartup
 
i would reccommend using an open-source compiler, visual studio is not necessary to code it is just flashy.
 
I have spoken to a lot of poeple and they say it's looking really good and the new functions make programming life ever so much easier

but i'm happy with visual studio 6 cpp it serves it's purpose but i'll give 2005 beta a gander
 
Varsity said:
I've given up trying to find a true free C++ compiler that is actually decent so the beta was the next choice. ;)
I was going to say MinGW Developer Studio, until I saw this:
Monder said:
Any reason why you don't like MinGW? It's a perfectly good compiler, MinGW Studio is an IDE for it that I use. Ok it's not as good as MSVS.Net but it does the job.
I think MinGW Developer Studio is better then VS, I've only ever used VS6 though, so no idea what .NET is like, but the kind of projects I do (Working with wx, alot of cross-platform) I think MinGW Developer Studio is perfect.
 
Back
Top