I want to use the https://github.com/tensaix2j/binacpp (a Binance c++ library) and I'm getting the same error again and again. I changed the MakeFile in the library to the correct paths but yeah... Here is my MakeFile:
libcurl_dir=../lib/libcurl-7.56.0
libcurl_include=${libcurl_dir}/include
libcurl_lib=${libcurl_dir}/lib
jsoncpp_dir=../lib/jsoncpp-1.8.3
jsoncpp_include=${jsoncpp_dir}/include
jsoncpp_src=${jsoncpp_dir}/src
libwebsockets_dir=../lib/libwebsockets-2.4.0
libwebsockets_include=${libwebsockets_dir}/include
libwebsockets_lib=${libwebsockets_dir}/lib
libbinacpp_dir=../lib/libbinacpp
libbinacpp_include=${libbinacpp_dir}/include
libbinacpp_lib=${libbinacpp_dir}/lib
build_dir=../lib/libbinacpp/lib
objects=$(build_dir)/jsoncpp.o $(build_dir)/binacpp_utils.o
$(build_dir)/binacpp_logger.o $(build_dir)/binacpp.o $(build_dir)/binacpp_websocket.o
build_include=../lib/libbinacpp/include
$(build_dir)/libbinacpp.so: $(objects)
g++ -I$(libcurl_include) -I$(jsoncpp_include) I$(libwebsockets_include) \
-L$(libcurl_lib) \
-L$(libwebsockets_lib) \
$(objects) \
-shared \
-lcurl -lcrypto -lwebsockets -fPIC -o $@
# Make a new copy of the header too
cp *.h $(build_include)
$(build_dir)/binacpp.o: binacpp.cpp binacpp.h
g++ -I$(libcurl_include) -I$(jsoncpp_include) -c binacpp.cpp -fPIC -o $(build_dir)/binacpp.o
$(build_dir)/binacpp_websocket.o: binacpp_websocket.cpp binacpp_websocket.h
g++ -I$(libwebsockets_include) -I$(jsoncpp_include) -c binacpp_websocket.cpp -fPIC -o $(build_dir)/binacpp_websocket.o
$(build_dir)/binacpp_logger.o: binacpp_logger.cpp binacpp_logger.h
g++ -c binacpp_logger.cpp -fPIC -o $(build_dir)/binacpp_logger.o
$(build_dir)/binacpp_utils.o: binacpp_utils.cpp binacpp_utils.h
g++ -c binacpp_utils.cpp -fPIC -o $(build_dir)/binacpp_utils.o
$(build_dir)/jsoncpp.o: $(jsoncpp_src)/jsoncpp.cpp
g++ -I$(jsoncpp_include) -c $(jsoncpp_src)/jsoncpp.cpp -fPIC -o $(build_dir)/jsoncpp.o
clean:
rm $(build_dir)/*.o
rm $(build_dir)/*.so
If I'm inserting the paths like:
#include "../../libcurl-7.56.0/include/curl/curl.h"
instead of:
#include <curl/curl.h>
then it works but I cant change it for all includes.
Here's the Tree:
binacpp
-example
-lib
--jsoncpp-1.8.3
--libbinacpp
---include
----binacpp.h (File with include issue)
----binacpp_logger.h
----binacpp_websocket.h
----binacpp_utils.h
---lib
--libcurl-7.56.0
--(here's some other not important stuff)
-src
--MakeFile
--(here's some other not important stuff)