草庐IT

m_Symbols

全部标签

c++ - OpenMP Mac OSX Lion c++ 链接器错误 Undefined symbols for architecture x86_64 : "_omp_get_thread_num"

我在互联网上的任何地方都找不到这个问题。所以我的链接器错误是:Undefinedsymbolsforarchitecturex86_64:"_omp_get_thread_num()"这是我的代码:intnthreads;inttid;#pragmaompparallelprivate(tid){tid=omp_get_thread_num();if(tid==0){nthreads=omp_get_num_threads();printf("numberofthreads:%d\n",nthreads);}} 最佳答案 看起来你忘

c++ - Unresolved inclusion : Eclipse Not Showing "Includes" tab under "Paths and Symbols":

我正在尝试解决Eclipse中的一些包含问题。通常我单击项目属性,然后单击“C/C++General”,然后单击“路径和符号”,然后开始添加包含目录,如下所示:但是今天,出于某种奇怪的原因,Eclipse(Juno)没有显示包含选项卡!如何恢复“包含”选项卡以便解析项目中的符号? 最佳答案 默认情况下该选项卡是隐藏的,您可以通过输入再次启用它:Windows>首选项>C/C++>属性页设置>显示“包含文件”...您可能需要重新启动Eclipse才能显示。 关于c++-Unresolved

c++ - Qi Symbols 性能慢?

我想提出一个让我陷入困境的主题,并提出了一个关于齐::符号。这一切都始于我查看新的野兽图书馆并阅读atutorialexample它以一个从http路径猜测mime类型的函数开始扩展。我开始仔细观察,看到了这个:autoconstext=[&path]{autoconstpos=path.rfind(".");if(pos==boost::beast::string_view::npos)returnboost::beast::string_view{};returnpath.substr(pos);}();我花了一段时间才弄清楚这是一个IIFE在C++风格中,用于初始化ext,同时声

C++:使用 "Undefined symbols for architecture x86_64"时出现 "std"错误

我是一名新的C++程序员,我正在尝试运行一个简单的我已经创建了一个文件“test.cpp”,我正在使用gcc在命令行上对其进行编译。命令是“gcctest.cpp-otest”。然后我运行“./test”。(是的,这个过程听起来很基本。)文件如下:#includeintmain(){printf("HelloWorld!");std::cout当我包含包含std的行时,gcc返回以下长错误:Undefinedsymbolsforarchitecturex86_64:"std::__1::locale::use_facet(std::__1::locale::id&)const",ref

c++ - Visual C++ 2010 - fatal error LNK1169 : one or more multiply defined symbols found

这是一个程序:#includeusingnamespacestd;intmain(){cout>i;try{if(i==0)throw0;if(i==2)throw"error";}catch(inti){cout在编译时(Windows7上的MicrosoftvisualC++2010express),我收到错误消息:fatalerrorLNK1169:oneormoremultiplydefinedsymbolsfound 最佳答案 其实这段代码没有错误。源文件的数量可能是问题所在。在同一个编译器中将此代码作为一个新项目尝试,或

c++ - 为什么我得到 "Undefined symbols ... typeinfo ... vtable"与虚拟和具体类?

我正在重新学习C++(意思是:对我温柔一点!:)。我有一个父类(superclass)(Node),它有一个必须在子类(TestNode)中实现的抽象方法(step())。它编译没有错误,也没有任何警告,但链接它会导致:bash-3.2$g++-Wall-o./bin/t1src/t1.cppUndefinedsymbolsforarchitecturex86_64:"typeinfofortest::Node",referencedfrom:typeinfofortest::TestNodeint1-9f6e93.o"vtablefortest::Node",referencedfr

c++ - 模板构建错误 : Undefined symbols for architecture x86_64:

我正在尝试使用一个模板类,当我在LWS中将它编译到一个文件中时,它起作用了:(链接失效)~http://liveworkspace.org/code/a9c412a7e683439dfa35a9363749369d~但是当我尝试编译它由3个文件组成时,stack.h第4到21行stack.cpp第24到48行main.cpp第49行到结束当我尝试编译这3个文件时,我得到了Undefinedsymbolsforarchitecturex86_64:"Stack2,std::allocator>>::push(Node**,std::basic_string,std::allocator>

C++/boost : Undefined Symbols in example?

我正在尝试编译的示例来自:http://www.boost.org/doc/libs/1_46_1/doc/html/boost_asio/examples.html(聊天示例)这是我用来制作它的:>>>g++chat_client.cppchat_message.hpp>>>g++chat_server.cppchat_message.hpp这是终端输出的内容:%g++chat_client.cppchat_message.hppInfileincludedfromchat_client.cpp:17:chat_message.hpp:Inmemberfunction‘voidcha

C++ 链接错误 : Undefined symbols using a templated class

我在编写的类中遇到了一些非常奇怪的链接错误。我完全找不到任何可以描述正在发生的事情的东西。VisualStudio(WindowsXP)players.obj:errorLNK2019:unresolvedexternalsymbol"public:__thiscallTreeNode::TreeNode(void)"(??0?$TreeNode@VPlayer@@@@QAE@XZ)referencedinfunction"public:__thiscallPlayerList::PlayerList(void)"(??0PlayerList@@QAE@XZ)Xcode(OSX10.5

c++ - .mm 转换导致 Undefined symbols for architecture i386 错误

我最近将一个c++文件导入到我想使用的obj项目中。在我想使用它的类中,我将文件名从MyClass.m更改为MyClass.mm。这样做会给我20个左右的错误。这些错误到底是什么意思,我如何将MyClass更改为objective-c++类以促进我想使用的新c++类,而不会出现这些错误?Undefinedsymbolsforarchitecturei386:"setAudioInputIsStereo(audiosourceobj*,bool)",referencedfrom:-[EngineextractMp3Audio:withChannelId:withPadId:]inEngi