Boost Python, Visual studio does not create DLL

Boost Python, Visual studio does not create DLL

本文关键字:not create DLL does studio Python Visual Boost      更新时间:2023-10-16

所以我终于设法在Visual Studio中构建了我的boost::p ython项目,没有任何错误,只是为了发现Visual Studio没有为我创建DLL。我使用这个例子,它可以在大多数教程中找到(以某种形式):

#include <boost/python/module.hpp>
#include <boost/python/def.hpp>

char const* greet()
{
    return "hello, world";
}
BOOST_PYTHON_MODULE(myFirstModule)
{
    using namespace boost::python;
    def("greet", greet);
}

Visual Studio 的输出如下:

1>  Finished generating code
1>  test.vcxproj -> P:blubx64Releasetest.dll
1>  test.vcxproj -> P:blubx64Releasetest.pdb (Full PDB)
========== Build: 1 succeeded, 0 failed, 0 up-to-date, 0 skipped ==========

所以它看起来不错,但提到的文件夹中没有 DLL。

查看您提供的Visual Studio输出窗口日志,似乎Visual Studio完成了它的工作(至少说它做到了)。

我猜,从P:blubx64Releasetest.dll驱动器号P:开头的路径,目标文件夹位于网络共享上。

您可能没有权限:

  • 修改此文件夹
  • test.dll
  • 或两者兼而有之

尝试在"项目设置"中将目标路径修改到您确定可以写入的文件夹,看看是否可以解决您的问题。

如果必须使用网络共享,请阅读此内容