[HELP] Compiling problems

02/09/2013 08:32 noentre0093#1
ok so im having this problems compiling

Code:
using namespace System;
	using namespace System::ComponentModel;
	using namespace System::Collections;
	using namespace System::Windows::Forms;
	using namespace System::Data;
	using namespace System::Drawing;
	using namespace System::IO;
Code:
void Main(void)
{
    Application::EnableVisualStyles();
    Application::SetCompatibleTextRenderingDefault(false);
    Application::Run(gcnew Form1);
    Application::Exit();
}
the error is

[Only registered and activated users can see links. Click Here To Register...]

any solutions?
02/09/2013 10:54 TIMΣ™#2
The compiler have problems with your using namespace's. First it show you that ComponentModel is not a part of System and that there is not a namespace with that name. The other errors are similar to this error. So forget the namespace's and write your code without them. The other possibility is that you try to change your namespaces. But you can use using namespace System; , because it accept it.

Edit: Ironically it accepts using namespace System::IO; too

Edit²: Try this:
Code:
using System::ComponentModel;
using System::Collections;
using System::Windows::Forms;
using System::Data;
using System::Drawing;
using System::IO;
Without using namespace System; ! But I am sure that this wouldn't work.
02/09/2013 12:28 Schlüsselbein#3
Not really on topic but why are you using C++/CLI? Theres almost no reason to use it. If you want o write managed code then C# is your choice. If you want to write unmanaged, use C++(0x). Even if you need to some unmanaged code in your C# program then you can always use p/invoke.
If you just want to have a GUI for your program but dont want to give up the efficiency of pure C++, have a look at one of the great GUI-tookits like Qt, wxWidgets, WTL, Fox-toolkit, FLTK etc.
02/09/2013 14:03 ernilos#4
I only need say c++ .net sucks.
You have added the .net libs?