Comments (3)
.Net可以通过DllImport调用C++库中的C函数,你说操作失败具体是在哪个环节?我这个例子是在MacOS或是Ubuntu下使用CLion编译C++库,使用.Net Core调用的。Windows平台应该也可以,我们公司现在做的产品就是在Windows平台下使用WinForm调用跨平台C++库的。再就是例子中DllImport中写死C++库类型是dylib,这个是MacOS下的动态库扩展名,Linux是so,Windows是dll。
from dotnetcoredllimporttest.
下载你的demo测试System.BadImageFormatException:“试图加载格式不正确的程序。 (Exception from HRESULT: 0x8007000B)”
from dotnetcoredllimporttest.
@qcjxberin 这个版本是通过.Net Core调用C++库,编译平台是MacOS,不一定适合你,我又写了一个Windows平台的通过WinForm调用C++库的测试代码,你看看这个能不能帮助到你。
from dotnetcoredllimporttest.
Related Issues (1)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from dotnetcoredllimporttest.