Giter Club home page Giter Club logo

Comments (3)

ConorPai avatar ConorPai commented on July 29, 2024

.Net可以通过DllImport调用C++库中的C函数,你说操作失败具体是在哪个环节?我这个例子是在MacOS或是Ubuntu下使用CLion编译C++库,使用.Net Core调用的。Windows平台应该也可以,我们公司现在做的产品就是在Windows平台下使用WinForm调用跨平台C++库的。再就是例子中DllImport中写死C++库类型是dylib,这个是MacOS下的动态库扩展名,Linux是so,Windows是dll。

from dotnetcoredllimporttest.

qcjxberin avatar qcjxberin commented on July 29, 2024

下载你的demo测试System.BadImageFormatException:“试图加载格式不正确的程序。 (Exception from HRESULT: 0x8007000B)”

from dotnetcoredllimporttest.

ConorPai avatar ConorPai commented on July 29, 2024

@qcjxberin 这个版本是通过.Net Core调用C++库,编译平台是MacOS,不一定适合你,我又写了一个Windows平台的通过WinForm调用C++库的测试代码,你看看这个能不能帮助到你。

from dotnetcoredllimporttest.

Related Issues (1)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.