MAC osx上的架构x86_64错误没有找到符号
symbol(s) not found for architecture x86_64 error on mac osx
我目前正在学习c++课程。我在MAC OSX上使用Eclipse Luna。我不确定这个错误信息。错误信息的捕捉什么可能导致编译错误?
代码只是设计了一个果汁自动售货机的支付系统。
谢谢。
#include <iostream>
#include <string>
using namespace std;
void disProduct (string);
int main ()
{
int choice;
string orange, apple, mango, strawberryBanana;
cout << "1 for orange juice n"
<< "2 for apple juice n"
<< "3 for mango juice n"
<< "4 for strawberry-banana juice n"
<< "9 to exit n";
cin >> choice;
switch(choice)
{
case 1:disProduct(orange);
break;
case 2:disProduct(apple);
break;
case 3:disProduct(mango);
break;
case 4:disProduct(strawberryBanana);
break;
}
return 0;
}
void dispProduct (string name)
{
int vend;
cout << "please enter 50 cents";
cin >> vend;
while (vend > 0)
{
if(vend < 50)
{
cout << "Please enter the remaining amount of " << 50- vend;
}
if (vend >= 50)
{
cout << "please take your "<< name <<"juice and change
<< in the amount of " << vend - 50;
}
}
}
声明的函数原型是void disProduct (string);
,但实际定义是void dispProduct (string name)
,并且两者的名称不相同。
和也添加string
头太
相关文章:
- 在C++中使用内联方法时出现未定义的符号错误
- 我收到错误LNK2001:未解析的外部符号(C++代码)
- 错误:隐式转换更改符号:'int'到'unsigned long'
- 错误:当我从"WinDbg"打开可执行文件时,找不到符号文件。默认导出 ntdll 的符号.dll
- 可视抽象类 c++(错误 LNK 2001:未解析的外部符号)
- clang:错误:链接器命令失败,退出代码为 1(使用 -v 查看调用) - 体系结构的未定义符号 x86_64:
- 添加符号 libgtest.so 错误:命令行中缺少 DSO
- 如何摆脱C++中未解析的外部符号"private: static char"错误?
- 当 lib 已添加到其他依赖项时,如何在 VS 中调试未解析的外部符号错误
- 体系结构x86_64的未定义符号:链接器错误
- 错误LNK2019未解析的外部符号"public: __thiscall SLinkList<char>::SLinkList<char>(void)"
- 引入参数化构造函数后显示 LNK 2019 未解析外部符号的代码错误
- 与Qt交叉编译到Raspberry Pi 3B+通讯录(协议缓冲区)-错误符号查找错误
- 链接错误:符号重复
- 架构X86_64静态类成员的错误符号X86_64错误
- 缓冲区中使用 GetWindowText 的错误符号
- OSX:ld:警告:错误符号操作:适用于核心库
- 为什么 Folly 的共享库引用了 Boost 中的错误符号?(OS X 上的 GCC)
- 嵌入lua运行时错误:符号未找到:_luaL_newstate
- C++ 找不到"::"架构的苹果马赫-O链接器错误/符号