lpereira / lwan

Experimental, scalable, high performance HTTP server
https://lwan.ws
GNU General Public License v2.0
5.94k stars 548 forks source link

linking the hello_world example against liblwan.so fails #223

Closed diviaki closed 6 years ago

diviaki commented 6 years ago
gcc -o hello hello.c -I lwan/src/lib/ -Llwan/build/src/lib/ -llwan

/tmp/cc4jC9OA.o: In function `hello_world':
hello.c:(.text+0x6d): undefined reference to `strbuf_set_static'
collect2: error: ld returned 1 exit status
diviaki commented 6 years ago

looks like it isn't exposed:

$ readelf -s lwan/build/src/lib/liblwan.so|grep strbuf_set_static
$
lpereira commented 6 years ago

That's true: any symbols that do not begin with lwan_ are not being exported any longer. The strbuf_ symbols need to be renamed to lwan_strbuf_. Rationale: #217.

diviaki commented 6 years ago

need a hand with that?

lpereira commented 6 years ago

Sure, help is always appreciated.

lpereira commented 6 years ago

I ended up renaming it already. The wiki and web page have been updated.

diviaki commented 6 years ago

That's great. Note that I still see an occurrence of strbuf_set_static on lwan.ws though.

diviaki commented 6 years ago

Linking works fine now, closing.