C ++ / CLI和本机编程 [英] C++/CLI and native programming

查看:130
本文介绍了C ++ / CLI和本机编程的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在vc ++中开发了两个模块。 1.第一个模块包括使用主互操作程序集使用c ++ / clr建议在microsoft offie中实现另存为方法。 2.第二个模块由使用MSXML sdk的xsl转换组成。



当我在单个vc ++项目中编译两个.cpp文件时,它编译正常并生成二进制.exe,但主要问题是xsl转换方法不起作用..但是当我将两个模块作为单独的项目时,它工作正常。



可能知道什么是问题?? c ++ / clr编译器将编译本机代码?? ...我们可以将本机代码添加到c ++ \ cli项目中吗?

i have developed two modules in in vc++. 1. first module consists of implementing save as method in microsoft offie using c++/clr recommendations using primary interop assemblies. 2.second module consists of xsl transformation using MSXML sdk.

when i compile two .cpp files in single vc++ project, its compiling fine and its generating binary .exe, but the main problem is xsl transformation method is not working..but when i make two module as seperate project, it is working fine.

may is know what is problem??..c++/clr compiler will compile the native code??...can we add native code to c++\cli project??

推荐答案

http: //msdn.microsoft.com/en-us/magazine/dd315414.aspx



讨论Microsoft Office中本机代码和托管代码的互操作性。



我的猜测是c ++ / cli代码被编译成MSIL(Microsoft中间语言),而XML转换的本机代码被编译成本机汇编代码。可能将本机代码包装在c ++ / cli中会有所帮助,然后它们都会编译成MSIL。听起来好像你需要某种类型的互操作策略来处理不同的语言。
http://msdn.microsoft.com/en-us/magazine/dd315414.aspx

Discuss Interoperability of native and managed code in Microsoft Office.

My guess is that the c++/cli code is being compiled into MSIL (Microsoft intermediate language) while the native code of the XML transformation is being compiled into native assembly code. Probably wrapping the native code in c++/cli would help then they would both be compiled into MSIL. It sounds as though you need some type of interop strategy for dealing with the different languages.


这篇关于C ++ / CLI和本机编程的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆