How to compile my work?

33 views
Skip to first unread message

yihsh...@gmail.com

unread,
Jul 13, 2014, 11:02:53 AM7/13/14
to onio...@coralbits.com
Hi everyone, I've just started using the onion library.
After finishing coding a simple test program similar(almost the same, actually) to the userver example, I faced a really basic problem:
"How to compile it?"
At first, I add the static library flag "-lonion_handlers_static -lonion_static", referenced from the CMakeLists.txt in the userver example folder.
But it failed, of course, spawning some pthread error. It seemed that it missed the pthread library so I add the "-lpthread" flag. But It didn't work, either.

I think some basic tutorials or hints of the building process mentioned above should be added to the wiki.

(Sorry for my poor English)

Basile Starynkevitch

unread,
Jul 13, 2014, 1:05:47 PM7/13/14
to yihsh...@gmail.com, onio...@coralbits.com
On Sun, 2014-07-13 at 08:02 -0700, yihsh...@gmail.com wrote:
> Hi everyone, I've just started using the onion library.
> After finishing coding a simple test program similar(almost the same,
> actually) to the userver example, I faced a really basic problem:
> "How to compile it?"


In what order are you giving the libraries?

You need:

-lonion_handlers -lonion -lpthread -lm -ldl


Show exactly your code and the compilation command.

--
Basile STARYNKEVITCH http://starynkevitch.net/Basile/
email: basile<at>starynkevitch<dot>net mobile: +33 6 8501 2359
8, rue de la Faiencerie, 92340 Bourg La Reine, France
*** opinions {are only mine, sont seulement les miennes} ***


yihsh...@gmail.com

unread,
Jul 14, 2014, 1:23:18 AM7/14/14
to onio...@coralbits.com, yihsh...@gmail.com


Basile Starynkevitch於 2014年7月14日星期一UTC+8上午1時05分47秒寫道:
Thanks! It works! 
Reply all
Reply to author
Forward
0 new messages