我可以将 DLL 项目编译为 ARM 的共享对象 (.so) 文件吗? [英] Can I compile a DLL Project to a Shared Object (.so) File for ARM?

查看:33
本文介绍了我可以将 DLL 项目编译为 ARM 的共享对象 (.so) 文件吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个配置类型为 .dll 的 Microsoft Visual C++ 项目.而且我希望这个库也能在我的 linux 系统中运行,那么我如何将源代码编译为 .so 文件???

I have a Microsoft Visual C++ Project with configuration type .dll. And I want this library to work in my linux system as well,, so how can I compile source code to a .so file???

推荐答案

使用适用于 Visual Studio 的 C++ for Linux 加载项,此 MSDN 博客文章中对此进行了描述:用于 Linux 开发的 Visual C++

Use the C++ for Linux add-in for Visual Studio, which is described in this MSDN blog post: Visual C++ for Linux Development

那么:

  1. 创建一个新的 Linux 项目(Visual C++/Cross Platform/Linux/Empty Project)
  2. 更改General 选项卡中的项目设置,使Configuration TypeDynamic Library (.so)
  3. 将您的源添加到项目中.您可以在项目之间链接源文件,从而拥有一个通用的代码库.
  4. 删除/替换和 Windows 依赖项
  5. 构建
  1. Create a new Linux project (Visual C++ / Cross Platform / Linux / Empty Project)
  2. Change the project settings in the General tab so that Configuration Type is Dynamic Library (.so)
  3. Add your source to the project. You can link the source files between projects so you have a common code base.
  4. Remove / replace and Windows dependencies
  5. Build

这篇关于我可以将 DLL 项目编译为 ARM 的共享对象 (.so) 文件吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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