vendredi 3 avril 2015

The following program does not compile



#include <boost/any.hpp>
#include <boost/python.hpp>
int main() {
return 0;
}


With clang++ on OS X, the compiler emits more than 20 errors, including



In file included from /Users/strin/OneDrive/Research/Deep Generative Models/code/cibp-net/main.cpp:1:
In file included from /Users/strin/OneDrive/Research/Deep Generative Models/code/cibp-net/inc/npnet.h:5:
In file included from /opt/local/include/boost/python.hpp:11:
In file included from /opt/local/include/boost/python/args.hpp:10:
In file included from /opt/local/include/boost/python/args_fwd.hpp:10:
In file included from /opt/local/include/boost/python/handle.hpp:11:
In file included from /opt/local/include/boost/python/errors.hpp:13:
In file included from /opt/local/include/boost/function/function0.hpp:11:
In file included from /opt/local/include/boost/function/detail/maybe_include.hpp:13:
In file included from /opt/local/include/boost/function/function_template.hpp:13:
In file included from /opt/local/include/boost/function/detail/prologue.hpp:17:
In file included from /opt/local/include/boost/function/function_base.hpp:20:
In file included from /opt/local/include/boost/assert.hpp:84:
In file included from /Applications/http://ift.tt/1CoLm4I:
In file included from /Applications/http://ift.tt/1rE7FEj:
/Applications/http://ift.tt/1CoLnWq: error: C++ requires a type specifier for all declarations
char_type toupper(char_type __c) const
^~~~~~~~~~~~~~~~~~~~~~
/System/Library/Frameworks/Python.framework/Headers/pyport.h:731:29: note: expanded from macro 'toupper'
#define toupper(c) towupper(btowc(c))


However, if I switch the order and use



#include <boost/any.hpp>
#include <boost/python.hpp>
int main() {
return 0;
}


It passes compilation.


Aucun commentaire:

Enregistrer un commentaire