Linker does complain about undefined reference to Wt::Ssl::x509ToWSslCertificate(x509_st*)
This is the output:
/usr/local/lib/libwthttp.a(Request.o): In function `http::server::Request::sslInfo() const':
/usr/src/wt-3.3.3/src/http/Request.C:249: undefined reference to `Wt::Ssl::x509ToWSslCertificate(x509_st*)'
/usr/src/wt-3.3.3/src/http/Request.C:258: undefined reference to `Wt::Ssl::x509ToWSslCertificate(x509_st*)'
/usr/src/wt-3.3.3/src/http/Request.C:276: undefined reference to `Wt::WSslInfo::WSslInfo(Wt::WSslCertificate const&, std::vector<Wt::WSslCertificate, std::allocatorWt::WSslCertificate > const&, Wt::WValidator::Result)'
collect2: error: ld returned 1 exit status
make: * [compile] Error 1
I am trying to do a static build of the ChartsApplication Example like this:
g ChartsApplication.C ChartConfig.C ChartsExample.C CsvUtil.C PanelList.C -std=c++11 \
What is wrong here? ld ---verbose shows that it has /usr/lib/x86_64-linux-gnu/ in its search dir and libssl.a resides there happily.
/proc/version is: Linux version 3.2.0-4-amd64 (firstname.lastname@example.org) (gcc version 4.6.3 (Debian 4.6.3-14) ) #1 SMP Debian 3.2.60-1+deb7u3
Someone has an idea?
Updated by Wim Dumon about 9 years ago
- Status changed from New to Feedback
Looking back at the errors, it rather looks to me as if Wt itself was not properly compiled with SSL support and thus my response to #1745 was probably wrong. Can you check WConfig.h in your install directory and check if 'WT_WITH_SSL' is defined?
Currently it looks to me as if your build is a weird combination of some files that think that SSL is enabled in the Wt build, and other think it's not enabled. I can't immediately see what could have caused this. Could you try a clean rebuild of Wt? Any idea of what could have gone wrong?
Updated by Sebastian Freitag about 9 years ago
Found the error. I thought that lwt depends on symbols defined in either lwthttp or lwtfcgi so I had -lwt before -lwthttp. But as it turns out it is the other way around.
This should be one correct order for linking all the stuff (it works for me now):
-lboost_signals -lwthttp -lwt -lboost_program_options -lhpdf -lssl -lboost_filesystem -lboost_regex -lboost_random -lboost_date_time -lpng12 -lcrypto -lboost_thread -ldl -lz -lrt -lboost_system -lpthread
Thanks for your comment Wim, it brought me on the right track.