VS2008下的工程,怎么到2010里编译运行后就“程序初始化失败了” 本帖最后由 xf_21 于 2011-04-26 22:46:51 编辑 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 我重建了2010工程,把代码挪过去,设置好编译选项,编译通过,能调试,但执行处某处时出现“内存读写错误”的提示。很郁闷,出错函数及语句如下:int thread_joins(){ monitor_clean_node *curnode; while(1) { pthread_mutex_lock( &cq_Monitor.control.mutex ); while( cq_Monitor.clean.head == NULL ) { //执行完这条语句就出问题 pthread_cond_wait(&cq_Monitor.control.cond, &cq_Monitor.control.mutex); } curnode = (monitor_clean_node*) queue_get( &cq_Monitor.clean); pthread_mutex_unlock( &cq_Monitor.control.mutex ); pthread_join(curnode->tid, NULL); free(curnode); curnode = NULL; } pthread_mutex_destroy(&cq_Monitor.control.mutex); pthread_cond_destroy( &cq_Monitor.control.cond ); return 0;}求大神解释! 项目用的是pthreads-w32-2-7-0,会不会这个库是依赖于2008的运行时的,而整个项目是依赖于2010的,使得这个库不能发挥作用了? 我知道了,原来是由于ICE版本不支持VS2010的原因。结贴了!那位要分,随便回复一下就结了! 好像你发过一篇这样的帖子了毕竟论坛里关注ICE的人很少 请教内存位图的无法输出问题 关于serialization里面的class tag的问题 vc2005 操作 word2003 ? ace程序编译连接出错 Edit control的奇怪问题—— 请教一个列表视图的风格设置问题 如何改变AfxMessageBox的title? .wdl文件用什么工具打得开? 那位朋友给个用socket写的客户端程序,只要求实现与服务器的通信! 关于平台可移植性 高手教我。。提取html文件中的汉字,然后输出到txt文件中 ICE程序在VS2008中没问题,在VS2010能编译执行出错的问题。
int thread_joins()
{
monitor_clean_node *curnode; while(1)
{
pthread_mutex_lock( &cq_Monitor.control.mutex );
while( cq_Monitor.clean.head == NULL )
{
//执行完这条语句就出问题
pthread_cond_wait(&cq_Monitor.control.cond, &cq_Monitor.control.mutex);
} curnode = (monitor_clean_node*) queue_get( &cq_Monitor.clean);
pthread_mutex_unlock( &cq_Monitor.control.mutex ); pthread_join(curnode->tid, NULL); free(curnode);
curnode = NULL;
} pthread_mutex_destroy(&cq_Monitor.control.mutex);
pthread_cond_destroy( &cq_Monitor.control.cond ); return 0;
}
求大神解释!
结贴了!那位要分,随便回复一下就结了!