BlenderCN论坛

 找回密码
 立即注册

QQ登录

只需一步,快速开始

扫一扫,访问微社区

查看: 1785|回复: 1

2.63静态成员没有初始化解决办法。

[复制链接]
发表于 2012-4-30 17:35:23 | 显示全部楼层 |阅读模式
本帖最后由 dog 于 2012-4-30 17:36 编辑

昨天拉了一下Blender的trunk,cmake,VS2008编译,满顺利的,最后发现如下连接错误:仔细一看,发现util_boundbox.h中有个静态成员没有初始化,找不到util_boundbox.cpp,所以找了个文件在cyc_render的mesh.cpp中将其实现,再编译,很顺利得就完成了,贴出来和大家共享一下。

代码修改:在Mesh.cpp中加入“struct BoundBox::empty_t BoundBox::empty;”
连接错误:

2>Linking...
2> Creating library C:\WorkSpace\build\Blender\bin\Debug\blender.lib and object C:\WorkSpace\build\Blender\bin\Debug\blender.exp
2>cycles_bvh.lib(bvh_binning.obj) : error LNK2001: unresolved external symbol "public: static struct ccl::BoundBox::empty_t ccl::BoundBox::empty" (?empty@BoundBox@ccl@@2Uempty_t@12@A)
2>cycles_bvh.lib(bvh_split.obj) : error LNK2001: unresolved external symbol "public: static struct ccl::BoundBox::empty_t ccl::BoundBox::empty" (?empty@BoundBox@ccl@@2Uempty_t@12@A)
2>cycles_subd.lib(subd_patch.obj) : error LNK2001: unresolved external symbol "public: static struct ccl::BoundBox::empty_t ccl::BoundBox::empty" (?empty@BoundBox@ccl@@2Uempty_t@12@A)
2>cycles_render.lib(object.obj) : error LNK2001: unresolved external symbol "public: static struct ccl::BoundBox::empty_t ccl::BoundBox::empty" (?empty@BoundBox@ccl@@2Uempty_t@12@A)
2>cycles_render.lib(mesh.obj) : error LNK2001: unresolved external symbol "public: static struct ccl::BoundBox::empty_t ccl::BoundBox::empty" (?empty@BoundBox@ccl@@2Uempty_t@12@A)
2>cycles_bvh.lib(bvh.obj) : error LNK2001: unresolved external symbol "public: static struct ccl::BoundBox::empty_t ccl::BoundBox::empty" (?empty@BoundBox@ccl@@2Uempty_t@12@A)
2>cycles_bvh.lib(bvh_build.obj) : error LNK2001: unresolved external symbol "public: static struct ccl::BoundBox::empty_t ccl::BoundBox::empty" (?empty@BoundBox@ccl@@2Uempty_t@12@A)
2>C:\WorkSpace\build\Blender\bin\Debug\blender.exe : fatal error LNK1120: 1 unresolved externals
2>Build log was saved at "file://c:\WorkSpace\build\Blender\source\creator\blender.dir\Debug\BuildLog.htm"
2>blender - 8 error(s), 0 warning(s)
========== Build: 1 succeeded, 1 failed, 117 up-to-date, 0 skipped ==========





 楼主| 发表于 2012-4-30 17:59:25 | 显示全部楼层
现在还没有bf-commit的帐号,要不然就直接同步了。
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

关闭

站长推荐上一条 /1 下一条

Blender最新中文教学视频|Blender头条|小黑屋|手机版|Archiver|Blender中国 ( 蜀ICP备17002929号 )360网站安全检测平台

GMT+8, 2019-10-15 20:12 , Processed in 0.030210 second(s), 17 queries .

Powered by Discuz! X3.4

© 2001-2017 Comsenz Inc.

快速回复 返回顶部 返回列表