Re: Compiler error creating managed c++ directx app

From: Rich [Microsoft Direct3D MVP] (legalize+jeeves_at_mail.xmission.com)
Date: 04/22/04


Date: Thu, 22 Apr 2004 12:20:44 -0700


[Please do not mail me a copy of your followup]

"Mark Snyder" <snyderm@otc.edu> spake the secret code
<elZDW6IKEHA.3920@TK2MSFTNGP10.phx.gbl> thusly:

>I'm trying to create a simple program using managed C++ and DirectX. I
>can't even get started because I can't get my program to compile, when all
>I'm doing is trying to create a Device object.
>
>Here is the source code I am using:
>System::Void InitializeGraphics()
>{
> PresentParameters* pp = new PresentParameters();
> pp->Windowed = true;
> pp->SwapEffect = SwapEffect::Discard;
> pDevice = new Device(0, DeviceType::Hardware, this,
>CreateFlags::SoftwareVertexProcessing, pp);
>}

I thought in managed C++ you had to say __gcnew and not new?

-- 
"The Direct3D Graphics Pipeline"-- code samples, sample chapter, FAQ:
          <http://www.xmission.com/~legalize/book/>
	    Pilgrimage: Utah's annual demoparty
               <http://pilgrimage.scene.org>


Relevant Pages

  • Re: C++/TCL Need Solution to Compile Error c2784
    ... There's always the "Platform SDK" from MSDN if you need the window.h stuff, ... Since I'm using the Command Prompt rather than the GUI to compile the ... I then tried to compile your source code and I kept getting the same ...
    (comp.lang.tcl)
  • Re: Debugging Newbie Question
    ... The CLR does not understand this source code and so before it ... ASP.NET, however, ASP.NET will compile your page's source code and cache ... the debugger will have IL and x86 created from ... in release mode assemblies. ...
    (microsoft.public.dotnet.faqs)
  • Re: Debugging Newbie Question
    ... The CLR does not understand this source code and so before it ... ASP.NET will compile your page's source code and cache the result ... > does this so that a debugger can attach to the code and allow you to step ... > release mode assemblies. ...
    (microsoft.public.dotnet.faqs)
  • The curse of constant fields
    ... feature in the Java language, and decided to write up about it. ... in a class, compile the changed class, and run the code manually to ... A quick search through the source code shows that there is no other ... This is true even if the usage itself is not ...
    (comp.lang.java.programmer)
  • Re: creaping coupling......
    ... In C++ it would be trivial to break that source code dependency, ... When you compile a .java module, ... In Java and C# it's asserted at compile time. ...
    (comp.object)

Loading