.NETGURU
VC++ 7.1 annoying bug?
Messages   Related Types
This message was discovered on microsoft.public.dotnet.languages.vc.

Post a new message to this list...

Ioannis Vranos
Why does this annoying thing happen?

#include <windows.h>

#using <mscorlib.dll>

using namespace System;
using namespace System::Windows::Forms;

int APIENTRY _tWinMain(HINSTANCE hInstance,
HINSTANCE hPrevInstance,
LPTSTR lpCmdLine,
int nCmdShow)
{

}

C:\c>cl /clr temp.cpp
Microsoft (R) C/C++ Optimizing Compiler Version 13.10.3077 for .NET
Framework
Copyright (C) Microsoft Corporation 1984-2002. All rights reserved.

temp.cpp
temp.cpp(6) : error C2039: 'Windows' : is not a member of 'System'
temp.cpp(6) : error C2871: 'Forms' : a namespace with this name does not
exist

C:\c>

--
Ioannis Vranos
Reply to this message...
 
    
Steve McLellan
Hi,

This happens in projects in the IDE when no reference to the DLL has been
added. I think the command line arg is
/FU "C:\Windows\Microsoft.NET\Framework\v1.1.4322\System.Windows.Forms.dll"
for Forms.

Steve

"Ioannis Vranos" <Click here to reveal e-mail address> wrote in message
news:Click here to reveal e-mail address...
[Original message clipped]

Reply to this message...
 
    
Ioannis Vranos
Steve McLellan wrote:

[Original message clipped]

Yes after adding a #using <System.Windows.Forms.dll>, this error got
fixed. However other strange errors occurred,and the bottom line is that
we need to use the Windows Form Application project to make things work.

Thanks for the help.

--
Ioannis Vranos
Reply to this message...
 
    
Steve McLellan
Hi,

That's not true... I've used a Form in a console project. Adding the
reference in Solution Explorer/References did the trick, I didn't need
#using <...Forms.dll>.

Steve

"Ioannis Vranos" <Click here to reveal e-mail address> wrote in message
news:Click here to reveal e-mail address...
[Original message clipped]

Reply to this message...
 
 




ExamGuru IT Solutions - .Net Guru is owned and operated by ExamGuru, Inc., the man behind .Net Guru. If you're in the market for bespoke software or software consultancy, why not get him and his highly trained team to help? - www.examguru.net/ITCertification
Ad


Need Dot Net Interview Questions?
Ask ExamGuru, Inc. for advice and help on Passing .Net Interviews
.Net Projects
Best-of-breed application framework for .NET projects, developed by ExamGuru, Inc. and ExamGuru IT
Free .net Help
Commission ExamGuru, Inc. and his team for your next bespoke software project
FogBUGZ
The only bug tracking system carefully crafted with one goal in mind: helping teams create great software.
Awesome Tools
If you don't know about these, you're missing out... IT Certification Questions
IT Interview Questions
Free Oracle 10g Training
MCSE Boortcamp
Cisco Study Guides
Cheap Study Guides
Exact Questions
Dot Net Interview Questions
Oracle OCP
Cheap Travel
Designer Perfumes - Wholesale Prices
Free Programming Tutorials
 
ExamGuru IT Solutions - .Net Guru is owned and operated by ExamGuru, Inc., the man behind .Net Guru. If you're in the market for bespoke software or software consultancy, why not get him and his highly trained team to help? - www.examguru.net/ITCertification
 Copyright © ExamGuru, Inc. 2001-2006
Contact Us - Terms of Use - Privacy Policy - www.dot-net-guru.com - www.examguru.net - www.oraclesource.net - www.itinterviews.net - www.examguru.net/ITCertification