idealvin / coost

A tiny boost library in C++11.
Other
3.97k stars 561 forks source link

about multiple definitions #355

Open xuquan316 opened 7 months ago

xuquan316 commented 7 months ago

A program that will fork a bunch of child processes, the main program will use the coost library, and the child processes will also use the coost library, currently using version 3.0.0, which will report an error at startup: multiple definitions of flag: hook_log, from /home/coost-3.0.0/src/co/hook.cc and /home/coost-3.0.0/src/co/hook.cc

add 'static' no invalid. image

How do you solve this problem?

xuquan316 commented 7 months ago

use static library