jpcima / faustpp

A post-processor for faust, which allows to generate with more flexibility
Boost Software License 1.0
23 stars 3 forks source link

Issue during make #3

Closed lucasParis closed 4 years ago

lucasParis commented 4 years ago

I'm getting an error when trying to compile this:

[ 92%] Building CXX object CMakeFiles/faustpp.dir/call_faust.cpp.o
/Users/lucas/Downloads/faustpp/call_faust.cpp:187:28: error: implicit instantiation of undefined template
      'std::__1::basic_istringstream<char, std::__1::char_traits<char>, std::__1::allocator<char> >'
        std::istringstream in(cppsource);
                           ^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/iosfwd:120:32: note: 
      template is declared here
    class _LIBCPP_TEMPLATE_VIS basic_istringstream;
                               ^
/Users/lucas/Downloads/faustpp/call_faust.cpp:250:28: error: implicit instantiation of undefined template
      'std::__1::basic_istringstream<char, std::__1::char_traits<char>, std::__1::allocator<char> >'
        std::istringstream in(cppsource);
                           ^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/iosfwd:120:32: note: 
      template is declared here
    class _LIBCPP_TEMPLATE_VIS basic_istringstream;
                               ^
/Users/lucas/Downloads/faustpp/call_faust.cpp:306:53: error: use of undeclared identifier 'environ'
    if (posix_spawnp(&pid, argv[0], &fa, &sa, argv, environ) == -1)
                                                    ^
3 errors generated.
make[2]: *** [CMakeFiles/faustpp.dir/call_faust.cpp.o] Error 1
make[1]: *** [CMakeFiles/faustpp.dir/all] Error 2
make: *** [all] Error 2

I added this to call_faust.h, which seems to fix the problem:

#include <string>
#include <sstream>
#include <iostream>

but now I'm getting this error, the environ variable seems to not exist?

[ 88%] Building CXX object CMakeFiles/faustpp.dir/call_faust.cpp.o
/Users/lucas/Downloads/faustpp/call_faust.cpp:306:53: error: use of undeclared identifier 'environ'
    if (posix_spawnp(&pid, argv[0], &fa, &sa, argv, environ) == -1)
                                                    ^
1 error generated.
make[2]: *** [CMakeFiles/faustpp.dir/call_faust.cpp.o] Error 1
make[1]: *** [CMakeFiles/faustpp.dir/all] Error 2
make: *** [all] Error 2
jpcima commented 4 years ago

Hello, there is an attempt to fix it in the last commits. Can you check it?

lucasParis commented 4 years ago

Yes it worked! thanks a lot