Comments (3)
40%] Building CXX object libco/CMakeFiles/example_cond.dir/example_cond.cpp.o
[ 43%] Linking CXX executable example_cond
/opt/rh/devtoolset-9/root/usr/libexec/gcc/x86_64-redhat-linux/9/ld: libcolib.a(co_hook_sys_call.cpp.o): in functionco_gethostbyname_r(char const*, hostent*, char*, unsigned long, hostent**, int*)': co_hook_sys_call.cpp:(.text+0x1e39): undefined reference to
clsCoMutex::clsCoMutex()'
/opt/rh/devtoolset-9/root/usr/libexec/gcc/x86_64-redhat-linux/9/ld: libcolib.a(co_hook_sys_call.cpp.o): in functionclsSmartLock::clsSmartLock(clsCoMutex*)': co_hook_sys_call.cpp:(.text._ZN12clsSmartLockC2EP10clsCoMutex[_ZN12clsSmartLockC5EP10clsCoMutex]+0x26): undefined reference to
clsCoMutex::CoLock()'
/opt/rh/devtoolset-9/root/usr/libexec/gcc/x86_64-redhat-linux/9/ld: libcolib.a(co_hook_sys_call.cpp.o): in functionclsSmartLock::~clsSmartLock()': co_hook_sys_call.cpp:(.text._ZN12clsSmartLockD2Ev[_ZN12clsSmartLockD5Ev]+0x17): undefined reference to
clsCoMutex::CoUnLock()'
collect2: error: ld returned 1 exit status
make[2]: *** [libco/CMakeFiles/example_cond.dir/build.make:105: libco/example_cond] Error 1
make[1]: *** [CMakeFiles/Makefile2:244: libco/CMakeFiles/example_cond.dir/all] Error 2
make: *** [Makefile:115: all] Error 2
CMakeLists文件漏了一个源文件co_comm.cpp
set(SOURCE_FILES
co_comm.cpp
co_epoll.cpp
co_hook_sys_call.cpp
co_routine.cpp
coctx.cpp
coctx_swap.S)
添加了就能编译过了
from libco.
楼上正解,这字面意思就是找不到函数签名的引用(定义,实现), 一般可能是编译时没有链接到对应的模块(库或者源文件, 在c++中一般是cpp文件),这里明显是库中的函数找不到链接,那就在库里找下函数的定义在哪里,CMake配置文件加上就可以了
from libco.
from libco.
Related Issues (20)
- 在windows平台上使用msvc编译失败. HOT 2
- 请教用cpprestsdk与协程配合堵塞的问题 HOT 5
- 【BUG Report】__i386__场景下协程共享栈有问题 HOT 2
- undefined reference to `dlsym' HOT 1
- 是否可以在libco的协程内使用fork后exec?
- CMakeList 缺少文件导致编译错误
- libco性能咋样?有人测过吗
- -
- non-x86 arch support HOT 1
- 跨平台协程库 HOT 4
- CMakeLists.txt有误 HOT 2
- 如果应用本身已经使用了epoll,会和libco冲突吗?
- 在example_echosvr示例中多进程共享的栈g_readwrite为什么不需要加进程锁
- coctx_make 是否存在无效代码 HOT 1
- Makefile dependency errors
- if a variable defined by CO_ROUTINE_SPECIFIC is referenced in multiple cpps, multiple instances of the variable will be generated under release build HOT 1
- 期望支持一下跨平台,比如Windows
- 协程栈切换时未保存浮点/SIMD寄存器
- 龙芯2f小本在gentoo下编译higan时libco报错 HOT 1
- libcolib.so动态库存在内存泄漏问题 HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from libco.