- 论坛徽章:
- 0
|
在AIX下,编译动态库,由于动态库要使用多线程和序列号,所以用了互斥锁。\r\npthread_mutex_t m_SerialLock; /* Serial锁 */\r\n但是一初始化,程序就直接core了\r\npthread_mutex_init( &m_SerialLock, NULL );\r\n\r\n还有创建线程的时候,也coredump\r\nif ( pthread_create( &tid, NULL, thread_Send, NULL ) != 0 )\r\n printf(\"creat send thread error!!!\\n\"); \r\n\r\n想不明白,请教高人。。。。。\r\n我将此动态库,加上main函数,编译成可执行文件,编译时有如下告警信息:\r\n\r\nld: 0711-224 WARNING: Duplicate symbol: thread_creds_t\r\nld: 0711-224 WARNING: Duplicate symbol: _GLOBAL__F_thread_creds_t\r\nld: 0711-345 Use the -bloadmap or -bnoquiet option to obtain more information.\r\n\r\n貌似定义了两次,但是实际看代码,确确实实就定义了一次。而且可执行文件可以正常运行无错误。。。。。到底是怎么回事呢??\n\n[ 本帖最后由 foolishfox 于 2008-3-21 10:24 编辑 ] |
|