469,327 Members | 1,280 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,327 developers. It's quick & easy.

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 9994
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 suresh191 | last post: by
reply views Thread by Purva khokhar | last post: by
reply views Thread by haryvincent176 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.