本文介绍了Visual Studio 2015头文件可以编译成dll并在VS2013中使用吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

背景:我想在Windows中使用mlpack进行办公工作,但是由于某些支持的原因,办公环境被Visual Studio 2013困扰。为了使用mlpack,我需要使用VS2015。所以,我使用VS2015在我的个人机器上编译了mlpack(遵循这个 - keon.io/mlpack/mlpack-on-windows/)我把这些库包含在VS2013中 - 它没有工作。它给出错误说,我包含的某些头文件与VS2013不兼容。



问题:我可以从VS2015的头文件创建.dll文件,并使用这些dll而不是在VS2013中包含头文件吗?我不知道该怎么做有人可以指导我吗?

解决方案

通常兼容性问题在静态库中升高,而不是dll(共享)。是的,您可以在任何编译器中编译dll,并将其与任何其他编译器一起使用。即使从MinGW到VS.唯一重要的是32/64位二进制兼容性。



当然,回答这个问题的更合理的方法是古老而老旧的秘密方法说: 尝试 !如果您在那里遇到问题,那么Stackoverflow中的人可以帮助您描述一个非常具体的问题。


Background: I want to use mlpack in windows for office work, but for some support reasons, office environment is stuck with Visual Studio 2013. In order to use mlpack, I need to use VS2015. So, I compiled mlpack using VS2015 on my personal machine (Followed this - keon.io/mlpack/mlpack-on-windows/) I included those libraries in VS2013 as per this - https://github.com/mlpack/mlpack/wiki/WindowsBuild It didn't work. It gave errors saying certain header files I included are incompatible with VS2013.

Question: Can I create .dll files from headers files in VS2015, and use those dlls instead of including the header files in VS2013? I am not sure how to do this. Can someone guide me on this?

解决方案

Usually compatibility problems rise in static libraries, not dlls (shared). Yes, you can compile dlls in any compiler and use them with any other compiler. Even from MinGW to VS. The only thing that matters there is 32/64 bit binary compatibility.

And of course, the more reasonable way to answer this question is the very ancient and old secret methodology that says: Try it! If you face problems there, then people on Stackoverflow can help after you describe a very specific problem.

这篇关于Visual Studio 2015头文件可以编译成dll并在VS2013中使用吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-20 05:08