473,795 Members | 3,063 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

VC++ 7.1 annoying bug?

Why does this annoying thing happen?

#include <windows.h>

#using <mscorlib.dll >

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

int APIENTRY _tWinMain(HINST ANCE 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
Nov 17 '05 #1
5 1054
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\Mic rosoft.NET\Fram ework\v1.1.4322 \System.Windows .Forms.dll"
for Forms.

Steve

"Ioannis Vranos" <iv*@guesswh.at .grad.com> wrote in message
news:O8******** ******@TK2MSFTN GP14.phx.gbl...
Why does this annoying thing happen?

#include <windows.h>

#using <mscorlib.dll >

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

int APIENTRY _tWinMain(HINST ANCE 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

Nov 17 '05 #2
Steve McLellan wrote:
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\Mic rosoft.NET\Fram ework\v1.1.4322 \System.Windows .Forms.dll"
for Forms.

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
Nov 17 '05 #3
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" <iv*@guesswh.at .grad.com> wrote in message
news:Ov******** ******@TK2MSFTN GP15.phx.gbl...
Steve McLellan wrote:
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\Mic rosoft.NET\Fram ework\v1.1.4322 \System.Windows .Forms.dll" for Forms.

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

Nov 17 '05 #4
Steve McLellan wrote:
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 >.

I assume that these both are equivalent.


--
Ioannis Vranos
Nov 17 '05 #5
Hi,

I don't know whether they're equivalent, but I do know that I've used forms
in console applications. You could look at the command line options that the
IDE gives as a default for a Forms project and see if something else is
different / missing.

Good luck,

Steve

"Ioannis Vranos" <iv*@guesswh.at .grad.com> wrote in message
news:%2******** ********@TK2MSF TNGP11.phx.gbl. ..
Steve McLellan wrote:
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 >.

I assume that these both are equivalent.


--
Ioannis Vranos

Nov 17 '05 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
8617
by: Medi Montaseri | last post by:
Hope this is a right forum, else route me... I'm using map STL in Microsoft Visual C++ 6.0 and am getting warning C4786 which seems to have to do with truncating symbols as VC++ is building a browser file (unix folks think ctags file). Is there anyway to tell this compiler to increase your symbol entry buffer size from 255 to 1000 (or something). The warning message looks like this
3
1121
by: Daniel Lidström | last post by:
Hi, is there an update available for VC 7.1? My version is 7.1.3088. I'd like to have a version that doesn't close some of the source files I have open every 10th (or so) debug session. -- Daniel A: Because it messes up the order in which people normally read text. Q: Why is top-posting such a bad thing?
1
1871
by: Daniel Jenkins | last post by:
I'm currently charged with the task of writing a customized business application. This app will perform order entry, invoicing, accounting, etc. type tasks. Can anyone justify a decision to write this app in VC++.net as opposed to writing it in VB.net? Assumptions: everyone in department knows both languages. we have access to all needed resources.
1
1778
by: John Madsen | last post by:
This bug is easier to just show than to explain I think... namespace M { template <class T> struct A { void f(int a = T::foo()) { } // line 5 }; } namespace N { struct B {
4
3820
by: Daniel Lidström | last post by:
Where do the variables that are in VC++ Directories come from? For example, there is a path $(FrameworkSDKDir) in the Executable files directories. Where can I find out what this variable points to? It is not an environment variable of my system. -- Daniel A: Because it messes up the order in which people normally read text. Q: Why is top-posting such a bad thing? A: Top-posting.
8
1827
by: The unProfessional | last post by:
To the VC .Net'ers out there... I noticed alot of strange behavior in the way VC .Net apps behave in the IDE. It's a bit odd, so maybe people have workarounds. I'm worried to devote my project to the managed/unmanaged heuristic because these early issues make me feel VC .net just isn't mainstream (or complete) enough yet to depend on. Anyway, one of the things is the code formatting. When adding event handlers and such, the code is...
6
5010
by: John Gabriel | last post by:
I have been obtaining the following error in the output window of the IDE: 1>mt.exe:general error c101008d:Failed to write the updated manifest to the resource of file "..\debug\test.exe". The process cannot access the file because it is being used by another process. 1>Project : error PRJ0002 : Error result 31 returned from 'C:\Program Files\Microsoft Visual Studio 8\VC\bin\mt.exe'. 1>Build log was saved at...
27
1764
by: Marc Reinig | last post by:
I have a program written in Visual Studio 2003 Visual Basic. I would like to move it to Visual C++. Is there an automated or relatively automated way of doing that, or do I need to recreate all the windows by hand? Thanks in advance, Marco ------------------------------------------------- Marc Reinig
3
1256
by: kim.ruhl | last post by:
I've been coding in visual C++ but am migrating to linux + gnu. I'm not an expert, but my programs seemed to work fine. When I take all the junk out of the VC++ codes and try to run them on my linux machine, the compiler balks about my operator overloads. Here is a simple example: class myClass{ private: int rows; int cols;
0
9519
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10213
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10163
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10000
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9040
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7538
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6780
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
1
4113
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3722
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.