Comments (9)
看不出什么有效信息 代码git hash是多少?
from zltoolkit.
ZLToolKit-master.zip
上面这个版本
from zltoolkit.
采用Visual studio 2015,将ZLToolKit编译为动态库,进行调用动态库时出现上图异常。
注,采用静态库时,与项目的其他代码存在冲突,编译报错
from zltoolkit.
这个异常是否与我的使用方法有关。我的使用方法:我在动态库sampled.dll中调用了静态库ZLToolKit,然后进程sampled.exe中调用了sampled.dll
我看到CMakeLists.txt中禁止将ZLToolKit编译为WIndows下的DLL,是什么原因呢?有无解决措施?
from zltoolkit.
把zltoolkit编译成dll 建议还是c封装下比较好 因为c++的abi是不兼容的。
从你debug信息看 是ZLToolkit的socket被系统回收了或者被同进程代码关闭了 不得而知。
from zltoolkit.
把zltoolkit编译成dll 建议还是c封装下比较好 因为c++的abi是不兼容的。
从你debug信息看 是ZLToolkit的socket被系统回收了或者被同进程代码关闭了 不得而知。
from zltoolkit.
from zltoolkit.
from zltoolkit.
我尝试将test_tcpClient.cpp中的main函数改名并已C接口导出,运行正常,进程销毁时也存在异常。我分享下问题复现方式:
ZLToolKitDLL.zip
① 将附件压缩包解药至ZLToolKit-master目录
② ZLToolKit-master/CMakeLists.txt中尾部增加以下内容,将test_tcpClient示例功能封装为动态库ZLToolKitDLL.dll的接口ZLToolKitDLL_test,并在测试程序ZLToolKitDLL_test.cpp调用
# ZLToolKit动态库编译及调用
set(LIBRARY_OUTPUT_PATH ${CMAKE_BINARY_DIR}/bin)
add_library(ZLToolKitDLL SHARED ${CMAKE_CURRENT_SOURCE_DIR}/ZLToolKitDLL/ZLToolKitDLL.cpp ${CMAKE_CURRENT_SOURCE_DIR}/ZLToolKitDLL/ZLToolKitDLL.h)
if(ANDROID OR IOS OR WIN32)
target_link_libraries(ZLToolKitDLL ${PROJECT_NAME}_static ${LINK_LIB_LIST})
else()
target_link_libraries(ZLToolKitDLL ${PROJECT_NAME}_static ${LINK_LIB_LIST} pthread)
endif()
add_executable(ZLToolKitDLL_test ${CMAKE_CURRENT_SOURCE_DIR}/ZLToolKitDLL/ZLToolKitDLL_test.cpp )
target_link_libraries(ZLToolKitDLL_test ZLToolKitDLL)
③ 构建Visual Studio 2015 64位工程,编译测试程序ZLToolKitDLL_test,程序运行后,按‘esc’或'q'键退出,退出过程中就会报异常
from zltoolkit.
Related Issues (20)
- 多个线程打印同一个日志时,由于日志优化会导致写的日志不对 HOT 1
- ssl 支持多线程 问题求助 HOT 2
- Threadpool的cpu负载统计好像有问题 HOT 1
- udp数据可能被误读 HOT 1
- QQ群没有找到
- error C2988: 不可识别的模板声明/定义 HOT 1
- Poller和Timer 问题
- 请问:ubuntu16.04编译不通过,什么原因? HOT 1
- 关于poller线程的讨论
- 关于TcpServer主动退出的问题 HOT 1
- zltookkit使用
- 技术咨询:modifyEvent提示Invalid argument HOT 12
- Windows下使用,创建TcpServer时抛出了异常"addEvent | select() can not watch fd bigger than 1024" HOT 2
- test_tcpEchoServer.cpp例子中Buffer的使用是否正确? HOT 9
- 可以加上websocket和http支持吗 HOT 1
- SSL_Box的_read_bio和_write_bio没有BIO_free释放内存是否泄漏? HOT 2
- 关于Socket::enableRecv在epoll 边沿模式下使用的bug HOT 9
- Send函数多线程出现死锁问题 HOT 1
- test_pingpong 性能测试,千兆网卡带宽,带宽的80%下,为什么测试会频繁出现socket send timeout HOT 4
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 zltoolkit.