C++ Native代码还是C++/CLI的?
C++/CLI支持动态编译,C++ Native不支持的。

解决方案 »

  1.   


    小弟不怎么明白什么意思  C++ Native 是什么??
      

  2.   

    所谓的vb.net、c#的emit,不是什么动态编译,而是动态生成源代码(并且编译)。
      

  3.   

    C++ Native就是标准的C++。
    所谓“动态编译”,其实就是把代码翻译成.NET中间语言
      

  4.   

    调用C++编译器,比如cl.exe命令行编译、连接。
      

  5.   

    本帖最后由 lxcnn 于 2010-08-09 23:15:27 编辑
      

  6.   

    cl a.cpp -o a.exe
      

  7.   

    谢谢各位的定力相助   string exe = @"E:\NOJ_Open_Source_V2_full\AcmJudge\bin\gcc\bin\g++.exe";  //编译器完整路径
                System.Diagnostics.Process p = new System.Diagnostics.Process();   //新建进程
                p.StartInfo.FileName = exe;
                p.StartInfo.UseShellExecute = false;
                p.StartInfo.RedirectStandardInput = true;
                p.StartInfo.RedirectStandardOutput = true;
                p.StartInfo.RedirectStandardError = true;
                p.StartInfo.CreateNoWindow = true;
                p.Start();      //启动进程
                p.WaitForExit();
               
                if (p.HasExited)
                    MessageBox.Show("success");
                p.Close();