Trouble linking HTTP server test (HTTPMessage::setContentType)

A general discussion forum.
Fetrovsky
Posts: 1
Joined: 17 Feb 2017, 08:29

Trouble linking HTTP server test (HTTPMessage::setContentType)

Postby Fetrovsky » 17 Feb 2017, 08:39

Hello,

I'm sure you all have seen this multiple times. I wrote a little test to try out the HTTP server, and now I'm trying to build. I've looked at all of the references and documentations, and I can't seem to figure out what went wrong. The linker can't resolve HTTPMessage::setContentType:

Code: Select all

:!clang++39 -v -lc++ -lPocoNet -lPocoFoundation -L/usr/local/lib main.o -o test
clang version 3.9.1 (tags/RELEASE_391/final)
Target: x86_64-unknown-freebsd11.0
Thread model: posix
InstalledDir: /usr/local/llvm39/bin
 "/usr/bin/ld" --eh-frame-hdr -dynamic-linker /libexec/ld-elf.so.1 --hash-style=both --enable-new-dtags -o test /usr/lib/crt1.o /usr/lib/crti.o /usr/lib/crtbegin.o -L/usr/local/lib -L/usr/lib -lc++ -lPocoNet -lPocoFoundation main.o -lc++ -lm -lgcc --as-needed -lgcc_s --no-as-needed -lc -lgcc --as-needed -lgcc_s --no-as-needed /usr/lib/crtend.o /usr/lib/crtn.o
main.o: In function `RequestHandlerFactory::RequestHandler::handleRequest(Poco::Net::HTTPServerRequest&, Poco::Net::HTTPServerResponse&)':
main.cpp:(.text._ZN21RequestHandlerFactory14RequestHandler13handleRequestERN4Poco3Net17HTTPServerRequestERNS2_18HTTPServerResponseE[_ZN21RequestHandlerFactory14RequestHandler13handleRequestERN4Poco3Net17HTTPServerRequestERNS2_18HTTPServerResponseE]+0x86): undefined reference to `Poco::Net::HTTPMessage::setContentType(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&)'
clang-3.9: error: linker command failed with exit code 1 (use -v to see invocation)

shell returned 1


Any pointer helps!

Thanks,


- Daniel

Return to “General Discussion”

Who is online

Users browsing this forum: No registered users and 2 guests

cron