Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Linker error] undefined reference to `lws_callback_on_writable' #5

Open
myghuser7 opened this issue Feb 2, 2018 · 3 comments
Open

Comments

@myghuser7
Copy link

Hello, Tried compile binacpp on windows with devc++ but I got this error ?

[Linker error] undefined reference to lws_callback_on_writable' [Linker error] undefined reference to lws_create_context'
[Linker error] undefined reference to lws_canonical_hostname' [Linker error] undefined reference to lws_client_connect_via_info'
[Linker error] undefined reference to lws_service' [Linker error] undefined reference to lws_context_destroy'

I added libwebsockets.a but it did not change.

Thanks.

@GisTom2
Copy link

GisTom2 commented Feb 13, 2018

The similar error under Ubuntu:

/example$ make example

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
/usr/bin/ld: warning: librtmp.so.0, needed by ../lib/libcurl-7.56.0/lib/libcurl.so, not found (try using -rpath or -rpath-link)
/tmp/ccK4F6or.o: In function main': example.cpp:(.text+0x2273): undefined reference to BinaCPP::init(std::__cxx11::basic_string<char, std::char_traits, std::allocator >&, std::__cxx11::basic_string<char, std::char_traits, std::allocator >&)'
../lib/libcurl-7.56.0/lib/libcurl.so: undefined reference to RTMP_Write' ../lib/libcurl-7.56.0/lib/libcurl.so: undefined reference to RTMP_SetBufferMS'
../lib/libcurl-7.56.0/lib/libcurl.so: undefined reference to RTMP_Free' ../lib/libcurl-7.56.0/lib/libcurl.so: undefined reference to RTMP_Read'
../lib/libcurl-7.56.0/lib/libcurl.so: undefined reference to RTMP_Alloc' ../lib/libcurl-7.56.0/lib/libcurl.so: undefined reference to RTMP_Connect1'
../lib/libcurl-7.56.0/lib/libcurl.so: undefined reference to RTMP_Close' ../lib/libcurl-7.56.0/lib/libcurl.so: undefined reference to RTMP_ConnectStream'
../lib/libcurl-7.56.0/lib/libcurl.so: undefined reference to RTMP_SetupURL' ../lib/libcurl-7.56.0/lib/libcurl.so: undefined reference to RTMP_Init'
collect2: error: ld returned 1 exit status
Makefile:25: recipe for target 'example' failed
make: *** [example] Error 1

@mrsahabu
Copy link

@GisTom2 did you solve the error?

@GisTom2
Copy link

GisTom2 commented Dec 31, 2020

@mrsahabu
I do not remember...
There was several different projects last years.
I am sorry.

Try this one https://stackoverflow.com/questions/41652245/error-compiling-mosquitto-1-4-8-with-libwebsockets

bothie pushed a commit to bothie/binacpp that referenced this issue Jul 6, 2021
inclusion of library json in the makefile
bothie pushed a commit to bothie/binacpp that referenced this issue Jul 6, 2021
inclusion of library json in the makefile
bothie pushed a commit to bothie/binacpp that referenced this issue Jul 6, 2021
inclusion of library json in the makefile
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants
@GisTom2 @mrsahabu @myghuser7 and others