472,119 Members | 2,053 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,119 software developers and data experts.

Problem with reference to System.Drawing

Although I have added a reference to System.Drawing, the following
declaration produces a compile error:

System::Drawing::Bitmap* b; // error C2039: 'Drawing' is not a member of
'System'

This way I can get things working:

#using <System.Drawing.dll>

System::Drawing::Bitmap* b; // OK

Is it a misconcept that setting up a reference versus #using the appropriate
dll are equivalent?

Thanks for any help,

Károly

Nov 16 '05 #1
3 10110
They should be equivalent.

Can you look at the generated command line for the compile in the build log?
Adding the reference should have added the assembly by the way of the /FU
(which stands for Force Using) switch.

Ronald Laeremans
Visual C++ team

"Ladvánszky Károly" <lk@digicart.hu> wrote in message
news:O8**************@TK2MSFTNGP12.phx.gbl...
Although I have added a reference to System.Drawing, the following
declaration produces a compile error:

System::Drawing::Bitmap* b; // error C2039: 'Drawing' is not a member of 'System'

This way I can get things working:

#using <System.Drawing.dll>

System::Drawing::Bitmap* b; // OK

Is it a misconcept that setting up a reference versus #using the appropriate dll are equivalent?

Thanks for any help,

Károly

Nov 16 '05 #2
Here is the command line:

/Od /AI "C:\Documents and Settings\lk\Dokumentumok\Visual Studio
Projects\TiffTest\Debug" /D "WIN32" /D "_DEBUG" /D "_WINDLL" /D "_MBCS" /FD
/EHsc /MTd /GS /Yu"stdafx.h" /Fp"Debug/TiffTest.pch" /Fo"Debug/"
/Fd"Debug/vc70.pdb" /W3 /nologo /c /Zi /clr /TP /FU
"C:\WINNT\Microsoft.NET\Framework\v1.1.4322\System .dll" /FU
"C:\WINNT\Microsoft.NET\Framework\v1.1.4322\System .Drawing.dll"
"Ronald Laeremans [MSFT]" <ro*****@online.microsoft.com> az alábbiakat írta
a következő hírüzenetben: O1**************@TK2MSFTNGP09.phx.gbl...
They should be equivalent.

Can you look at the generated command line for the compile in the build log? Adding the reference should have added the assembly by the way of the /FU
(which stands for Force Using) switch.

Ronald Laeremans
Visual C++ team

"Ladvánszky Károly" <lk@digicart.hu> wrote in message
news:O8**************@TK2MSFTNGP12.phx.gbl...
Although I have added a reference to System.Drawing, the following
declaration produces a compile error:

System::Drawing::Bitmap* b; // error C2039: 'Drawing' is not a
member of
'System'

This way I can get things working:

#using <System.Drawing.dll>

System::Drawing::Bitmap* b; // OK

Is it a misconcept that setting up a reference versus #using the

appropriate
dll are equivalent?

Thanks for any help,

Károly


Nov 16 '05 #3
I've just tried it within a new project and it works fine. My guess is it's
the attached legacy library (libtiff) that disturbs the compilation.Thanks
for your response.

Károly

"Ronald Laeremans [MSFT]" <ro*****@online.microsoft.com> az alábbiakat írta
a következő hírüzenetben: O1**************@TK2MSFTNGP09.phx.gbl...
They should be equivalent.

Can you look at the generated command line for the compile in the build log? Adding the reference should have added the assembly by the way of the /FU
(which stands for Force Using) switch.

Ronald Laeremans
Visual C++ team

"Ladvánszky Károly" <lk@digicart.hu> wrote in message
news:O8**************@TK2MSFTNGP12.phx.gbl...
Although I have added a reference to System.Drawing, the following
declaration produces a compile error:

System::Drawing::Bitmap* b; // error C2039: 'Drawing' is not a
member of
'System'

This way I can get things working:

#using <System.Drawing.dll>

System::Drawing::Bitmap* b; // OK

Is it a misconcept that setting up a reference versus #using the

appropriate
dll are equivalent?

Thanks for any help,

Károly


Nov 16 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

7 posts views Thread by Toby Mathews | last post: by
2 posts views Thread by James Coburn's Grey Helmet Hair | last post: by
2 posts views Thread by Rlrcstr | last post: by
reply views Thread by leo001 | last post: by

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.