Visual Studio使用链接器LNK2019获取两个未解析的外部
Visual Studio takes two unresolved externals with the linkers LNK2019
我的代码是这样的
#include <iostream>
#include <SDL2SDL.h>
int main(int argc, char* args[])
{
char tep;
std::cin >> tep;
return 0;
}
Visual Studio现在显示以下错误:
LNK1120 2 unresolved externals
LNK2019 reference to unresolved external symbol "_imp_ printf" function in "_ShowError".
LNK2019 reference to unresolved external symbol "_imp_ _iob_func" in function "_ShowError".
我真的已经搜索了很多关于这个问题的文章,但要么是它说的是真的不仅仅是我的问题,要么是解决方案不起作用。
如果有帮助的话,我一直在制作以下视频:https://www.youtube.com/watch?v=uzwAYyK9ZBY&feature=iv&src_vid=TC0kHYRWX1Y&annotation_id=annotation_1897517141
Thanks in advance
尝试在入口点之前放置#undef。我就遇到过这样的问题。试试吧,然后告诉我效果如何。
由于某种原因SDL定义了"#define main SDL_main"
那么试试这样写:
#undef
int main(int arc, char *args[])
相关文章:
- 如何在C++中从两个单独的for循环中添加两个数组
- 为什么两个不同的未命名名称空间可以共存于一个cpp文件中
- 当在同一名称空间中有两个具有相同签名的函数时,会发生什么
- 如何返回一个类的两个对象相加的结果
- 如何在C++中将一个无符号的 int 转换为两个无符号的短裤?
- 如何将两个不同矢量的同一位置的两个元素组合在一起
- 两个字符串在 c++ 中不相等
- 在两个类中共享相同的函数调用,并在不需要时避免空实例化
- 两个文件使用彼此的功能-如何解决
- 为什么Mat类的两个对象可以在不重载运算符+的情况下添加
- 如何确保在使用基于布尔值的两个方法之一调用方法时避免分支预测错误
- 停止cmake target_link_libraries将插件中静态库的两个对象文件链接到静态库本身
- 将fold表达式与std::一起用于两个元组
- 如何在C++中比较两个char数组
- 给定两个偶数,求出它们之间所有偶数的平方和
- 比较两个大小不等的映射c++
- C++ lnk2005 错误在两个带有外部"C"的文件上,为什么?
- Visual Studio使用链接器LNK2019获取两个未解析的外部
- 我可以在两个OpenGL上下文之间共享外部纹理吗?
- 不明确的引用和命名空间(来自两个外部库的定义冲突)