If I try to install the "glmnet" package, I get the following error:
Error in .shlib_internal(args) :
C++14 standard requested but CXX14 is not defined
I have tried adding the following line to my Makevars.win file:
CXX14 = g++ -std=c++1y -Wno-unused-variable -Wno-unused-function -fPIC
However, after doing this the error remains. Does anyone know what could be the problem?
Related
I am running the command
gcc -o openmptest -fopenmp openmptest.c
however am getting the error:
clang: error: unsupported option '-fopenmp'
I am running this on Mac Mojave. In addition I am using VS code which is telling me
cannot open source file "omp.h"
for my include statement.
I think it could work if you install libomp by
brew install libomp
and then,
clang -Xpreprocessor -fopenmp -I/usr/local/include -L/usr/local/lib -lomp openmptest.c -o main
This should work, I was having the same issue and and managed to compile my code by using the above.
I am using g++ version 4.8.5. I am trying to compile my project using it. It compiles without a problem, when compiling directly from the terminal. But, when using a make file, it gives me following error, even though I am using the same option.
cc1plus: error: unrecognized command line option "-std=c++11"
What am I doing wrong here ?
Edit:
as requested, here's my makefile line:
main: main.cc
#g++ -std=c++11 main.cpp -o run
Try using g++'s absolute path:
main: main.cc
#/usr/bin/g++-4.8 -std=c++11 main.cpp -o run
I am trying to compile a Python PCL module which builds some C++ source. I am getting this error:
$ python setup.py install
running install
running build
running build_py
running build_ext
skipping 'pcl/_pcl.cpp' Cython extension (up-to-date)
building 'pcl._pcl' extension
/usr/bin/clang -fno-strict-aliasing -fno-common -dynamic -g -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I/Library/Python/2.7/site-packages/numpy/core/include -I/usr/local/Cellar/pcl/HEAD/include/pcl-1.8 -I/usr/local/Cellar/eigen/3.2.3/include/eigen3 -I/usr/local/Cellar/pcl/HEAD/include/pcl-1.8 -I/usr/local/Cellar/flann/1.8.4/include -I/usr/local/Cellar/pcl/HEAD/include/pcl-1.8 -I/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c pcl/_pcl.cpp -o build/temp.macosx-10.6-intel-2.7/pcl/_pcl.o
pcl/_pcl.cpp:244:10: fatal error: 'boost/smart_ptr/shared_ptr.hpp' file not
found
#include "boost/smart_ptr/shared_ptr.hpp"
^
1 error generated.
error: command '/usr/bin/clang'
For whatever reason clang isn't looking in /usr/local/include where it most definitely would find the boost headers. As you can see it is linking all the other dependencies fine. What can I add that so clang will find boost?
On OSX 10.10, nothing fancy happening anywhere. Boost was probably installed by homebrew, but the files are all in /usr/local/include/boost as I'd expect.
Check the output of /usr/bin/clang++ -v some_test_file.cpp but chances are /usr/local/include isn't in the standard search path of the compiler.
You'll need to add -I/usr/local/include to CXXFLAGS or CPPFLAGS or whatever appropriate place in your build script or environment. It seems the python build script is failing to properly detect Boost.
If the above is not true (and /usr/local/include does show up in the output), make sure /usr/local/include/boost/smart_ptr/shared_ptr.hpp exists.
I am trying to install ffmpeg and ffmpeg-php and am getting an error when I try to use make. I've tried to get to the bottom of it but it has me stumped. I tried finding which file has references to swscale.h but didn't have any luck. Has anyone encountered this error before?
root#vps [/usr/local/src/ffmpeg-php-0.6.0]# make
/bin/sh /usr/local/src/ffmpeg-php-0.6.0/libtool --mode=compile gcc -I. -
I/usr/local/src/ffmpeg-php-0.6.0 -DPHP_ATOM_INC -I/usr/local/src/ffmpeg-
I/usr/local/src/ffmpeg-php-0.6.0 -DPHP_ATOM_INC -I/usr/local/src/ffmpeg-
php-0.6.0/include -I/usr/local/src/ffmpeg-php-0.6.0/main -
I/usr/local/src/ffmpeg-php-0.6.0 -I/usr/local/include/php -
I/usr/local/include/php/main -I/usr/local/include/php/TSRM -
I/usr/local/include/php/Zend -I/usr/local/include/php/ext -
I/usr/local/include/php/ext/date/lib -I/usr/local/include/libavcodec/ -
I/usr/local/include/libavformat/ -I/usr/local/include/libavutil/ -
I/usr/local/include/libswscale/ -I/usr/local/include/libavfilter/ -
I/usr/local/include/libavdevice/ -I/usr/local/include/php -DHAVE_CONFIG_H
-g -O2 -Wall -fno-strict-aliasing -c /usr/local/src/ffmpeg-php-
0.6.0/ffmpeg-php.c -o ffmpeg-php.lo
gcc -I. -I/usr/local/src/ffmpeg-php-0.6.0 -DPHP_ATOM_INC -
I/usr/local/src/ffmpeg-php-0.6.0/include -I/usr/local/src/ffmpeg-php-
0.6.0/main -I/usr/local/src/ffmpeg-php-0.6.0 -I/usr/local/include/php -
I/usr/local/include/php/main -I/usr/local/include/php/TSRM -
I/usr/local/include/php/Zend -I/usr/local/include/php/ext -
I/usr/local/include/php/ext/date/lib -I/usr/local/include/libavcodec/ -
I/usr/local/include/libavformat/ -I/usr/local/include/libavutil/ -
I/usr/local/include/libswscale/ -I/usr/local/include/libavfilter/ -
I/usr/local/include/libavdevice/ -I/usr/local/include/php -DHAVE_CONFIG_H -g
-O2 -Wall -fno-strict-aliasing -c /usr/local/src/ffmpeg-php-0.6.0/ffmpeg-
php.c -fPIC -DPIC -o .libs/ffmpeg-php.o
/usr/local/src/ffmpeg-php-0.6.0/ffmpeg-php.c:46:21: error: swscale.h: No
such file or directory
/usr/local/src/ffmpeg-php-0.6.0/ffmpeg-php.c: In function 'zm_info_ffmpeg':
/usr/local/src/ffmpeg-php-0.6.0/ffmpeg-php.c:156: error: 'LIBSWSCALE_IDENT'
undeclared (first use in this function)
/usr/local/src/ffmpeg-php-0.6.0/ffmpeg-php.c:156: error: (Each undeclared
identifier is reported only once
/usr/local/src/ffmpeg-php-0.6.0/ffmpeg-php.c:156: error: for each function
it appears in.)
make: *** [ffmpeg-php.lo] Error 1
Installing libswscale-dev helped me on Debian Squeeze
It looks like it can't find swscale.h. You should check to see if that file was included with your FFmpeg install, and, if so, that ffmpeg-php has the correct set of paths specified with -I/path/to/includes to find it. If it doesn't, you can add the correct directory with something like:
CFLAGS=-I/path/to/ffmpeg/includes ./configure
make
If you can't find swscale.h, it could be that there's some version mismatch between FFmpeg and ffmpeg-php. The former is pretty actively developed, and pieces that ffmpeg-php expects to find might no longer be present. Check the docs for ffmpeg-php to see if it's tied to a particular version.
I've been looking forward to using the wiiuse library on my Mac.
When trying to install the library, when compiling with make I was told this :
>make wiiuse
gcc -Wall -pipe -fPIC -funroll-loops -O2 -I. -c classic.c -o release-x86_64-apple-darwin15.4.0/classic.o
In file included from classic.c:43:
./wiiuse_internal.h:49:11: fatal error: 'bluetooth/bluetooth.h' file not found
#include <bluetooth/bluetooth.h>
^
1 error generated.
make[1]: *** [release-x86_64-apple-darwin15.4.0/classic.o] Error 1
make: *** [wiiuse] Error 2
My friend on Ubuntu solved it with sudo apt-get install libbluetooth-dev but I can't find anything on Mac.
If you have any idea about how to install wiiuse or libbluetooth-dev on mac, thanks in advance for your help
I've just been looking for the same thing, came across this site saying it's not available on OSX, not sure how official it is though: http://rosindex.github.io/d/libbluetooth-dev/