Open inhahe opened 3 years ago
I'm trying it on my other computer now, and I got Boost to install, but when I get to the instruction "Additional Include Directories", the directory "C:\Program Files (x86)\Microsoft Visual Studio\Shared\Python37_64\include" doesn't exist on my computer. The Python installation file I used was python-3.7.9-amd64.exe.
I copied C:\Program Files (x86)\Microsoft Visual Studio\Shared\Python37_64\include over from my other computer and tried compiling the project, and I got 160 warnings and 6 errors just like on the other computer.
I found that ERROR C2872 can be solved by editing RenderEngine.h
before:
#include <array>
#include <iomanip>
#include <sstream>
#include <string>
#include "Maximilian/maximilian.h"
#include "Maximilian/libs/maxiFFT.h"
#include "Maximilian/libs/maxiMFCC.h"
#include "../JuceLibraryCode/JuceHeader.h"
#include <boost/python.hpp>
after:
#include <random>
#include <array>
#include <iomanip>
#include <sstream>
#include <string>
#include "Maximilian/maximilian.h"
#include "Maximilian/libs/maxiFFT.h"
#include "Maximilian/libs/maxiMFCC.h"
#include <boost/python.hpp>
#include "../JuceLibraryCode/JuceHeader.h"
It is because using namespace juce;
will change the definition for ssize_t
, and then boost::python
will find 2 defs for ssize_t
.
ERROR C1189 can be solved by adding -DBOOST_PYTHON_STATIC_LIB
@Centauria Forgive my n00bness, but can you tell me where exactly I'd put -DBOOST_PYTHON_STATIC_LIB
? Thanks.
I got the same 6 erros and 160 warnings of @inhahe . You can see in this printscreen below:
Please, how can I fix it?
@inhahe @Centauria any ideas?
My System:
@inhahe the syntax of the -DBOOST_PYTHON_STATIC_LIB
option seems to be an option for a different compiler.
To solve Error C1189
for RenderMan in Visual Studio, it can be specified from Project > Properties > C/C++ > Preprocessor
and adding BOOST_PYTHON_STATIC_LIB
(without the -D
suffix) to the Preprocessor Definitions
list.
When you apply the changes, the command line options are auto-populated in the Project > Properties > C/C++ > Command Line
where you can see that the /D "BOOST_PYTHON_STATIC_LIB"
option has been added
@nyckmaia, to solve the Error C2872 'ssize_t'
follow the instructions that @Centauria provided: Swap the order of line 22 and 23 in RenderEngine.h so that they look like this:
#include <boost/python.hpp>
#include "../JuceLibraryCode/JuceHeader.h"
Side note: I needed to build boost with the following options for all of the boost dependencies to build successfully:
.\b2 --toolset=msvc-14.0 --build-type=complete address-model=64 --prefix=C:\Boost install -j%NUMBER_OF_PROCESSORS%
Thanks for the help, but I'm still running into problems.
I get 1>LINK : fatal error LNK1104: cannot open file 'libboost_python37-vc140-mt-sgd-x64-1_79.lib'
I see that libboost_python311-vc140-mt-sgd-x64-1_79.lib exists in boost\lib, so boost is obviously using the latest installation of Python by default. So, I looked up how to override that, and I found bootstrap --with-python
and bootstrap --with-python-version
. I tried bootstrap vc143 --with-python=c:\python37
and re-ran b2, and it seemed to have no effect. It still creates libboost_python311.lib. So I tried bootstrap vc143 --with-python-version=3.7
and it also had no effect.
So I found out about bootstrap --with-python-root and did bootstrap vc143 --with-python-root=c:\python37
and it still makes libboost_python311. Then I tried editing D:\boost_1_79_0\tools\build\example\user-config.jam and added the line using python : 3.7 : c:\python37 : c:\python37\include : c:\python37\libs ;
and copied user-config.jam to d:\boost_1_79_0 and ran bootstrap and b2 again. Still makes libboost_python311*. This is frustrating.
Okay, I solved that problem. No idea why the command-line parameters didn't work, but the user-config.jam worked when I set BOOST_BUILD_PATH=d:\boost_1_79_0\tools\build and put user-config.jam there and changed the \'s in the 'using' line to \\'s.
@Centauria @nyckmaia In case you're reading this, I've stumbled across another problem here: https://github.com/fedden/RenderMan/issues/30 Thx for any help.
I already had c:\Boost, so I renamed it to c:\boost.2 and attempted to follow the instructions for building Boost. When running bootstrap.bat, I get an error:
The contents of bootstrap.log are:
So, I checked to see if the Boost I already had in c:\boost.2 was version 1.74, and it was, so I just renamed it to c:\Boost
Then I followed the rest of the instructions I got 160 warnings and 6 errors. The 6 errors are:
The full output with the warnings too is here: renderman errors.txt
One thing that may be important is that the first time I tried running bootstrap.bat, it started working, but I aborted it because it said it couldn't find some tools, so I figured I should install visual studio 14 and then run its vcvarsall.bat and then run bootstrap.bat again. I never got it to work again though. I even deleted the whole c:\boost_1_74_0 and extracted it again and tried again, still wouldn't work.