简体   繁体   中英

Boost Python, Visual studio does not create DLL

So I finally managed to build my boost::python project without any errors in Visual Studio, just to find out that Visual Studio doesn't create a DLL for me. I use this example which is found in most of the tutorials (in some form):

#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);
}

The output of Visual Studio reads:

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

So it looks fine, but no DLL in the folders mentioned.

Looking at the Visual Studio Output Window log you provided, it seems that Visual Studio did its part of the job (at least says it did).

I guess, from the path P:\\blub\\x64\\Release\\test.dll starting with drive letter P:\\ , that the destination folder is located on a network share.

You probably don't have the permission :

  • to modify this folder
  • to write test.dll
  • or both

Try to modify the destination path, to a folder you are sure you can write into, in the Project Settings and see if that solves your problem.

If you have to use a network share, read this

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM