- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我正在尝试从 this article 获取代码启动并运行,但是,我遇到了我的宿敌 LNK2019 和 LNK2001。这是一个直接链接到download the project zip file .在有人问我之前我已经阅读了 the unresolved external symbol question .它帮助我弄清楚了一些事情,但我仍然无法弄清楚这个问题。
问题与链接到 TBB library 有关.项目代码似乎是在 2009 年的某个时候编写的,当时 TBB 的版本是 2.X。最新的稳定版本(我正在尝试使用的版本)是 4.2。我找不到用于项目测试的版本,所以我无法确认。我也更愿意使用最新版本的库。
谁能帮我确定这些链接器错误是由于项目代码和 TBB 之间的 api 不匹配造成的,还是我没有正确设置我的环境变量/属性页?我正在使用 MSVS2010 Express。
错误如下:
1>------ Build started: Project: VorteGrid, Configuration: Debug Win32 ------
1>inteSiVis.obj : error LNK2019: unresolved external symbol "public: void __thiscall tbb::task_scheduler_init::initialize(int,unsigned int)" (?initialize@task_scheduler_init@tbb@@QAEXHI@Z) referenced in function "public: __thiscall tbb::task_scheduler_init::task_scheduler_init(int,unsigned int)" (??0task_scheduler_init@tbb@@QAE@HI@Z)
1>inteSiVis.obj : error LNK2019: unresolved external symbol "void __cdecl tbb::assertion_failure(char const *,int,char const *,char const *)" (?assertion_failure@tbb@@YAXPBDH00@Z) referenced in function "public: __thiscall tbb::task_scheduler_init::task_scheduler_init(int,unsigned int)" (??0task_scheduler_init@tbb@@QAE@HI@Z)
1>vortonSim.obj : error LNK2001: unresolved external symbol "void __cdecl tbb::assertion_failure(char const *,int,char const *,char const *)" (?assertion_failure@tbb@@YAXPBDH00@Z)
1>particleRenderer.obj : error LNK2001: unresolved external symbol "void __cdecl tbb::assertion_failure(char const *,int,char const *,char const *)" (?assertion_failure@tbb@@YAXPBDH00@Z)
1>inteSiVis.obj : error LNK2019: unresolved external symbol "public: void __thiscall tbb::task_scheduler_init::terminate(void)" (?terminate@task_scheduler_init@tbb@@QAEXXZ) referenced in function "public: __thiscall tbb::task_scheduler_init::~task_scheduler_init(void)" (??1task_scheduler_init@tbb@@QAE@XZ)
1>vortonSim.obj : error LNK2019: unresolved external symbol "public: __thiscall tbb::task_group_context::~task_group_context(void)" (??1task_group_context@tbb@@QAE@XZ) referenced in function "public: static void __cdecl tbb::interface6::internal::start_for<class tbb::blocked_range<unsigned int>,class VortonSim_ComputeVelocityGrid_TBB,class tbb::auto_partitioner const >::run(class tbb::blocked_range<unsigned int> const &,class VortonSim_ComputeVelocityGrid_TBB const &,class tbb::auto_partitioner const &)" (?run@?$start_for@V?$blocked_range@I@tbb@@VVortonSim_ComputeVelocityGrid_TBB@@$$CBVauto_partitioner@2@@internal@interface6@tbb@@SAXABV?$blocked_range@I@4@ABVVortonSim_ComputeVelocityGrid_TBB@@ABVauto_partitioner@4@@Z)
1>particleRenderer.obj : error LNK2001: unresolved external symbol "public: __thiscall tbb::task_group_context::~task_group_context(void)" (??1task_group_context@tbb@@QAE@XZ)
1>vortonSim.obj : error LNK2019: unresolved external symbol "protected: void __thiscall tbb::task_group_context::init(void)" (?init@task_group_context@tbb@@IAEXXZ) referenced in function "public: __thiscall tbb::task_group_context::task_group_context(enum tbb::task_group_context::kind_type,unsigned int)" (??0task_group_context@tbb@@QAE@W4kind_type@01@I@Z)
1>particleRenderer.obj : error LNK2001: unresolved external symbol "protected: void __thiscall tbb::task_group_context::init(void)" (?init@task_group_context@tbb@@IAEXXZ)
1>vortonSim.obj : error LNK2019: unresolved external symbol "public: class tbb::task & __thiscall tbb::internal::allocate_root_with_context_proxy::allocate(unsigned int)const " (?allocate@allocate_root_with_context_proxy@internal@tbb@@QBEAAVtask@3@I@Z) referenced in function "void * __cdecl operator new(unsigned int,class tbb::internal::allocate_root_with_context_proxy const &)" (??2@YAPAXIABVallocate_root_with_context_proxy@internal@tbb@@@Z)
1>particleRenderer.obj : error LNK2001: unresolved external symbol "public: class tbb::task & __thiscall tbb::internal::allocate_root_with_context_proxy::allocate(unsigned int)const " (?allocate@allocate_root_with_context_proxy@internal@tbb@@QBEAAVtask@3@I@Z)
1>vortonSim.obj : error LNK2019: unresolved external symbol "public: void __thiscall tbb::internal::allocate_root_with_context_proxy::free(class tbb::task &)const " (?free@allocate_root_with_context_proxy@internal@tbb@@QBEXAAVtask@3@@Z) referenced in function "void __cdecl operator delete(void *,class tbb::internal::allocate_root_with_context_proxy const &)" (??3@YAXPAXABVallocate_root_with_context_proxy@internal@tbb@@@Z)
1>particleRenderer.obj : error LNK2001: unresolved external symbol "public: void __thiscall tbb::internal::allocate_root_with_context_proxy::free(class tbb::task &)const " (?free@allocate_root_with_context_proxy@internal@tbb@@QBEXAAVtask@3@@Z)
1>vortonSim.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall tbb::task::note_affinity(unsigned short)" (?note_affinity@task@tbb@@UAEXG@Z)
1>particleRenderer.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall tbb::task::note_affinity(unsigned short)" (?note_affinity@task@tbb@@UAEXG@Z)
1>vortonSim.obj : error LNK2019: unresolved external symbol "unsigned int __cdecl tbb::internal::get_initial_auto_partitioner_divisor(void)" (?get_initial_auto_partitioner_divisor@internal@tbb@@YAIXZ) referenced in function "public: __thiscall tbb::interface6::internal::auto_partition_type_base<class tbb::interface6::internal::auto_partition_type>::auto_partition_type_base<class tbb::interface6::internal::auto_partition_type>(void)" (??0?$auto_partition_type_base@Vauto_partition_type@internal@interface6@tbb@@@internal@interface6@tbb@@QAE@XZ)
1>particleRenderer.obj : error LNK2001: unresolved external symbol "unsigned int __cdecl tbb::internal::get_initial_auto_partitioner_divisor(void)" (?get_initial_auto_partitioner_divisor@internal@tbb@@YAIXZ)
1>vortonSim.obj : error LNK2019: unresolved external symbol "private: void __thiscall tbb::task::internal_set_ref_count(int)" (?internal_set_ref_count@task@tbb@@AAEXH@Z) referenced in function "public: void __thiscall tbb::task::set_ref_count(int)" (?set_ref_count@task@tbb@@QAEXH@Z)
1>particleRenderer.obj : error LNK2001: unresolved external symbol "private: void __thiscall tbb::task::internal_set_ref_count(int)" (?internal_set_ref_count@task@tbb@@AAEXH@Z)
1>vortonSim.obj : error LNK2019: unresolved external symbol "public: bool __thiscall tbb::task_group_context::is_group_execution_cancelled(void)const " (?is_group_execution_cancelled@task_group_context@tbb@@QBE_NXZ) referenced in function "public: bool __thiscall tbb::task::is_cancelled(void)const " (?is_cancelled@task@tbb@@QBE_NXZ)
1>particleRenderer.obj : error LNK2001: unresolved external symbol "public: bool __thiscall tbb::task_group_context::is_group_execution_cancelled(void)const " (?is_group_execution_cancelled@task_group_context@tbb@@QBE_NXZ)
1>vortonSim.obj : error LNK2019: unresolved external symbol "public: class tbb::task & __thiscall tbb::internal::allocate_child_proxy::allocate(unsigned int)const " (?allocate@allocate_child_proxy@internal@tbb@@QBEAAVtask@3@I@Z) referenced in function "void * __cdecl operator new(unsigned int,class tbb::internal::allocate_child_proxy const &)" (??2@YAPAXIABVallocate_child_proxy@internal@tbb@@@Z)
1>particleRenderer.obj : error LNK2001: unresolved external symbol "public: class tbb::task & __thiscall tbb::internal::allocate_child_proxy::allocate(unsigned int)const " (?allocate@allocate_child_proxy@internal@tbb@@QBEAAVtask@3@I@Z)
1>vortonSim.obj : error LNK2019: unresolved external symbol "public: void __thiscall tbb::internal::allocate_child_proxy::free(class tbb::task &)const " (?free@allocate_child_proxy@internal@tbb@@QBEXAAVtask@3@@Z) referenced in function "void __cdecl operator delete(void *,class tbb::internal::allocate_child_proxy const &)" (??3@YAXPAXABVallocate_child_proxy@internal@tbb@@@Z)
1>particleRenderer.obj : error LNK2001: unresolved external symbol "public: void __thiscall tbb::internal::allocate_child_proxy::free(class tbb::task &)const " (?free@allocate_child_proxy@internal@tbb@@QBEXAAVtask@3@@Z)
1>vortonSim.obj : error LNK2019: unresolved external symbol "public: class tbb::task & __thiscall tbb::internal::allocate_continuation_proxy::allocate(unsigned int)const " (?allocate@allocate_continuation_proxy@internal@tbb@@QBEAAVtask@3@I@Z) referenced in function "void * __cdecl operator new(unsigned int,class tbb::internal::allocate_continuation_proxy const &)" (??2@YAPAXIABVallocate_continuation_proxy@internal@tbb@@@Z)
1>particleRenderer.obj : error LNK2001: unresolved external symbol "public: class tbb::task & __thiscall tbb::internal::allocate_continuation_proxy::allocate(unsigned int)const " (?allocate@allocate_continuation_proxy@internal@tbb@@QBEAAVtask@3@I@Z)
1>vortonSim.obj : error LNK2019: unresolved external symbol "public: void __thiscall tbb::internal::allocate_continuation_proxy::free(class tbb::task &)const " (?free@allocate_continuation_proxy@internal@tbb@@QBEXAAVtask@3@@Z) referenced in function "void __cdecl operator delete(void *,class tbb::internal::allocate_continuation_proxy const &)" (??3@YAXPAXABVallocate_continuation_proxy@internal@tbb@@@Z)
1>particleRenderer.obj : error LNK2001: unresolved external symbol "public: void __thiscall tbb::internal::allocate_continuation_proxy::free(class tbb::task &)const " (?free@allocate_continuation_proxy@internal@tbb@@QBEXAAVtask@3@@Z)
1>VorteGrid\Debug\VorteGrid.exe : fatal error LNK1120: 15 unresolved externals
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
更新
我设法启动并运行了 CFD 代码!耶 :) 问题是我在 64 位机器上,但我使用的是 32 位版本的 MSVS2010 express。我没有意识到这一点,我正在尝试使用 intel64 库(即 ...\tbb\lib\intel64\vc10)。这个问题不知何故表现为链接器错误,这实际上没有意义。无论如何,切换到 ia32 解决了这个问题,并且项目将会构建。
下一个障碍是应用程序提示一些非描述性错误,例如“程序([注册码])有错误。”所以我最终尝试运行 TBB 示例。这些示例在运行时给出了更清晰的错误,提示“您的计算机中缺少 tbb.dll 文件。请尝试重新安装该程序”。经过更多谷歌搜索后,我找到了一个简单的解决方案:将它提示的 dll 文件移动到应用程序目录中。
然后,应用程序终于成功了。视觉效果非常值得。我等不及要开始玩这个了。
最佳答案
这些错误是由某些环境/配置问题引起的。
通常,较新的 TBB 版本与旧版本兼容(在源代码和二进制级别上)。显示的错误中提到的特定符号用于核心 TBB 功能;它们暂时没有改变,并且肯定存在于 4.2 版二进制文件中。
关于c++ - TBB 链接器错误如何判断我是否缺少包含或代码是否已过时,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19299505/
判断置顶文章 is_sticky() 函数用来判断一篇文章是否为置顶文章。 用法 ?
判断结构要求程序员指定一个或多个要评估或测试的条件,以及条件为真时要执行的语句(必需的)和条件为假时要执行的语句(可选的)。 下面是大多数编程语言中典型的判断结构的一般形式: 判断语句 C
我经常这样写: (if (nil? a-value) another-value a-value) 是否有更简单的功能可用,例如: (if-nil? a-value another-value) 最佳
MySQL IF 语句允许您根据表达式的某个条件或值结果来执行一组 SQL 语句。 要在 MySQL 中形成一个表达式,可以结合文字,变量,运算符,甚至函数来组合。表达式可以返回 TRUE,FA
也就是说,是否有一种工具可以自动显示给定语法的完整语言,包括突出歧义(如果有)? 最佳答案 BNF 风格的文法可能有一些特殊性,但总的来说,确定给定的上下文无关文法(例如 BNF)是否有歧义是不可能的
有没有办法确定像下面这样的 Axios 请求是否收到了答案并完成了? axios.get('/api') .then(response => this.data = response.data); 最
我想请大家禁用 Firebug 。如何确定自己安装了firebug?所以它是一个跨浏览器,并在 Chrome、Mozilla 和 IE8 + 中确定 最佳答案 两步: 如果 window.consol
我有一个看起来像这样的对象: var searchFilter = {_id: XXX, approved: true} 用于驱动 Meteor 集合搜索过滤器。然后,我有一对文本框,允许用户输入一系
我正在循环并向我的数据库中插入几百万条记录。性能是第一要务。 我想利用无状态 session ,但您可能知道它们不支持在更复杂的实体上级联对象。 是否有一种通用方法可以确定实体是否具有级联记录?如果是
我正在使用 pdfminer 解析一些 PDF 文件。图书馆。 我需要知道文档是否是扫描文档,扫描机将扫描图像放在顶部,将 OCR 提取的文本放在背景中。 有没有办法识别文本是否可见,因为 OCR 机
我正在寻找一种方法来找出当前为浏览器游戏 TribalWars 编写的脚本打开的页面。 URL 的设置非常相似,对于知道自己在做什么的人来说这应该很容易(我显然不知道)。 URL 如下所示: http
我在 C# 中使用包装的 C 库,需要将图像从该库转换为位图并返回,但没有复制像素缓冲区。 转换为位图很简单: Bitmap WrapAsBitmap(CImage image) { retu
有没有办法检查调用方法的Controller是否来自Area内的Controller? 例如,我有一个继承自 AuthorizeAttribute 的类,例如 public class CustomA
是否可以找到MySQL View 中某列所属的表名? 如果 View 构造为 CREATE VIEW alpha_view AS SELECT alpha.col1, alpha.col2,
如何判断 .Net 应用程序是作为桌面应用程序运行还是作为服务运行? 我们正在尝试使用 Fitnesse 测试我们的应用程序,它将应用程序作为服务加载,然后调用它。但是当一个模式错误框被按下时,它就会
关闭。这个问题不符合Stack Overflow guidelines .它目前不接受答案。 要求提供代码的问题必须表现出对所解决问题的最低限度理解。包括尝试过的解决方案、为什么它们不起作用,以及
我试图计算出 iframe 内容的大小,以便调整 iframe 元素的大小以包含其内容。 如何确定 iFrame 是否已加载以及我是否可以可靠地测量它的内容尺寸。 注意:onload 事件不会执行,因
这个问题在这里已经有了答案: How to write portable code in c++? (12 个答案) 关闭 9 年前。 我正在尝试编写可以用任何现代版本的 g++ 编译的代码,但遇到
这个问题在这里已经有了答案: distinguish shared objects from position independent executables (2 个答案) 关闭 4 年前。 我有
我的目标是如果 dte 与当前时间相差不到 1 小时,则停止循环。是否有“ ruby 方式”来做到这一点? #THIS IS AN INFINITE LOOP, DONT RUN THIS dte=D
我是一名优秀的程序员,十分优秀!