I want to use this lib DuckX. I followed tutorial,
git clone https://github.com/amiremohamadi/DuckX.git
cd DuckX
mkdir build
cd build
cmake ..
cmake --build .
It went on without any error. However, when I entered sample directory and execute g++ sample1.cpp -lduckx, it got the following error message,
sample1.cpp:1:10: fatal error: duckx.hpp: No such file or directory
#include "duckx.hpp"
^~~~~~~~~~~
compilation terminated.
I wonder how I can successfully use this lib. Could you please tell me what I can do to make the program use this lib. Thanks.
Related
I am working on windows 10 computer, in VSCode with a GCC compiler. I am using cmake to create make files and I compile the make files using make. I have to do cmake .. -G "Unix Makefiles" in order to do make after. When I make I get this error This is the image of the error
Can someone give me a simple explanation and an easy solution?
I'm coming from Python and new to C++ and am trying to test a program which retrieves data via websockets.
I copied this github repository with
git clone https://github.com/tensaix2j/binacpp
I'm trying to run the example so I filled in the api key and secret in:
/binacpp/example/example.cpp
Now from /binacpp/example folder I'm trying
make example
and I'm getting this error:
Making example
g++ -I../lib/libcurl-7.56.0/include -I../lib/jsoncpp-1.8.3/include -I../lib/libwebsockets-2.4.0/include -I../lib/libbinacpp/include \
example.cpp \
-L../lib/libcurl-7.56.0/lib \
-L../lib/libwebsockets-2.4.0/lib \
-L../lib/libbinacpp/lib \
-lcurl -ljsoncpp -lcrypto -lwebsockets -lbinacpp -o example
In file included from ../lib/libbinacpp/include/binacpp_websocket.h:16:0,
from example.cpp:8:
../lib/libwebsockets-2.4.0/include/libwebsockets.h:214:10: fatal error: openssl/ssl.h: No such file or directory
#include <openssl/ssl.h>
^~~~~~~~~~~~~~~
compilation terminated.
Makefile:25: recipe for target 'example' failed
make: *** [example] Error 1
user#ip:/opt/binacpp/example$ ^C
user#ip:/opt/binacpp/example$ ./example.run.sh
./example: error while loading shared libraries: librtmp.so.0: cannot open shared object file: No such file or directory
I'm trying to figure out why I'm getting this error and what to do with it?
1) It says on the readme that the dependencies are
jsoncpp-1.8.3
libcurl-7.56.0
libwebsockets-2.4.0
However these are included in the repository
2) if maybe it is assumed that openssl normally is already installed, how do I know which version to install? And how do I install this, because with Python you can just use pip and everything will be placed in the correct directories for including it in your program.
It looks like that the development package for openssl is not installed:
https://stackoverflow.com/a/3016986/5147260
I have successfully installed vmmlib 1.7 using the following steps:
Downloaded the files from https://github.com/VMML/vmmlib/tree/1.7
and followed the steps below:
mkdir vmmlib/build
cd vmmlib/build
cmake ..
make
Now, I'm trying to run a program in the test folder "t3_hosvd_test.cpp" , but I'm not able to run it.
I tried to run the Makefile but got the following error:
svd_test.cpp:13:0:
../include/vmmlib/vmmlib.hpp:33:30: fatal error: vmmlib/version.hpp: No such file or directory
compilation terminated.
: recipe for target 'svd_test.o' failed
make: *** [svd_test.o] Error 1
I also tried to run by giving the following command in the terminal:
g++ t3_hosvd_test.cpp -lapack -lvmmlib
but got an error:
t3_hosvd_test.cpp:2:31: fatal error: vmmlib/t3_hosvd.hpp: No such file or directory
compilation terminated.
Can someone help me compile and run this program on Ubuntu 16.04?
When compiling directly, you need to provide the include path via the -I option.
g++ t3_hosvd_test.cpp -I/usr/local/vmmlib17/include -lapack -lvmmlib
Also ensure that your include path is set to vmmlib/include and not vmmlib/include/vmmlib
What's the error as "CMAKE_BOOTSTRAP_BINARY_DIR". How can I build cmake from the source.
Environment:
System: Kubuntu-15.04
CMake source: https://github.com/Kitware/CMake
Reproduction:
git clone git#github.com:Kitware/CMake.git
cd CMake
git checkout v3.2.2
./bootstrap
Error ( at ./bootstrap ):
---------------------------------------------
g++ -I/home/usagi/repos/CMake/Bootstrap.cmk -I/home/usagi/repos/CMake/Source -I/home/usagi/repos/CMake/Bootstrap.cmk -c /home/usagi/repos/CMake/Source/cmSystemTools.cxx -o cmSystemTools.o
/home/usagi/repos/CMake/Source/cmSystemTools.cxx: In static member function ‘static void cmSystemTools::FindCMakeResources(const char*)’:
/home/usagi/repos/CMake/Source/cmSystemTools.cxx:2195:13: error: ‘CMAKE_BOOTSTRAP_BINARY_DIR’ was not declared in this scope
exe_dir = CMAKE_BOOTSTRAP_BINARY_DIR "/bin";
^
/home/usagi/repos/CMake/Source/cmSystemTools.cxx:2249:28: error: ‘CMAKE_BOOTSTRAP_SOURCE_DIR’ was not declared in this scope
cmSystemToolsCMakeRoot = CMAKE_BOOTSTRAP_SOURCE_DIR;
^
Makefile:88: recipe for target 'cmSystemTools.o' failed
make: *** [cmSystemTools.o] Error 1
---------------------------------------------
Error when bootstrapping CMake:
Problem while running make
Note:
"/home/usagi/repos" is a repository pool directory in my account.( "usagi" is my user name in this system.)
I got the solution at try on the after a lunch time.
The solution:
rm *
git checkout -f
./configure # In the environment, it is not require "./bootstrap".
make
"./bootstrap" is not needed in this environment.
I had the same problem in mac and spending a lot of time,
it was the best download cmake dmg from:
https://cmake.org/download/
(and only added cmake to the path)
and it runs great.
There is some extra information that I found about the bugs in cmake
https://cmake.org/pipermail/cmake-commits/2014-June/019853.html
best,
I.
I have downloaded the Sip module for python 2.7, created a makefile and tried the make command on the directory with the makefile, but I get this error:
Makefile:3: recipe for target 'all' failed
mingw32-make[10]: *** [all] Error 2
mingw32-make[10]: Leaving directory 'D:/Users/myLogin/Downloads/python/sip-4.14.5'
I get this error with both Gnuwin and mingw32. So I'm at a loss at what to do now. Any idea?
If you use python configure.py, the generated Makefiles are actually nmake makefiles. nmake is Microsoft's equivalent to make. You can run it by invoking nmake in a Visual Studio command prompt, if you have that installed.
For building with mingw, you have to indicate that you want to use that particular platform when creating the makefiles, as follows:
python configure.py --platform win32-g++
After that, invoking make works fine.
A few details about what happens to you when running make on the nmake makefile. The generated nmake file starts with the following lines:
all:
cd sipgen
$(MAKE)
#cd ..
cd siplib
$(MAKE)
#cd ..
Because each command on each line is executed in a new shell, the result of cd sipgen is actually void. Then, make is invoked again, in the current directory -- this results in an infinite recursive loop of make invocations. The [10] in your error message indicates that it was at the 10th level of recursion. I guess that was the moment that you pressed Ctrl-C :-)