Visual Studio 2010 编译Qt 4.6.3
well,在上一篇网志中我编译了Qt 4.7 beta 2用Visual Studio 2010,但是beta版本的似乎我遇到了几个bug,由此先换到稳定的版本看看.
还是和以前一样,轻车熟路,configure接着nmake,以为就是这么轻松的,但是接着一段时间过后.
爆出编译错误.
又是一个没有严格遵循C++规范而被Visual Studio 2010认为是错误代码的事件!Visual Studio 2010对于代码检查更加严格了,我在之前编译CEGUI的时候也同样遇到了这样的问题.
修正方法:
在src3rdpartyjavascriptcoreJavaScriptCoreruntime和src3rdpartywebkitjavascriptcoreruntime目录下分别找到这个档案:StructureTransitionTable.h
将代码143行开始的:
if (!specificValue) {
TransitionTable::iterator find = table()->find(key);
if (find == table()->end())
table()->add(key, Transition(structure, 0));
else
find->second.first = structure;
} else {
// If we're adding a transition to a specific value, then there cannot be
// an existing transition
ASSERT(!table()->contains(key));
table()->add(key, Transition(0, structure));
}
将里面加粗的两个零都改成nullptr,也就是像这样:
if (!specificValue) {
TransitionTable::iterator find = table()->find(key);
if (find == table()->end())
table()->add(key, Transition(structure, nullptr));
else
find->second.first = structure;
} else {
// If we're adding a transition to a specific value, then there cannot be
// an existing transition
ASSERT(!table()->contains(key));
table()->add(key, Transition(nullptr, structure));
}
两个文件都要修改,然后再次执行configure和nmake指令,就可以了.

纠结 最近麻烦不不断 头脑都要炸了
DEMO本来还顺利,可是某天编译一个错误后,就一切不顺利了(现在是编译成功,结果运行不了)我倒回到以前,还是有错误,反正编译没问题 可结果怎么也与运行不了(最初修改的版本那是可以运行的)我不知道碰到改动了什么 难道系统?
现在纠结……
日志看了 也不是明显的错误,cg的什么错误,7:InternalErrorException): Unable to compile Cg program Ogre/ParticleGS/GenerateVS 这种好像以前也有,不过可以忽略,为了验证,我又把你的release DEMO下载下来 可以运行,但是照样也有这种错误,我不知道我的怎么搞得……OMG 头疼
@AM, 哈?啊啊啊~~只能祝你好运了…….啊啊啊~~~~~