如何在 eclipse c++ 中连接库
当我创建新的/c++项目/调试/高级设置时,接下来我该怎么办?在包含选项卡中,我包含了库的路径?为什么是“启动失败。找不到二进制文件”和“ 对‘WinMain@16’的未定义引用,第 0 行,外部位置:”
When I create new/c++ project/debug/advanced setting, what do I do next? In the include tab, I have include the path to the libraries? why is "Launch failed. binary not found" and "
undefined reference to `WinMain@16' ex line 0, external location:"
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
听起来您需要将正确的库路径添加到您的项目中。右键单击您的项目并选择属性。这将打开属性编辑器。在 C/C++ Build|Settings 下,您可以使用 Linker 部分来设置库。我有一个关于单元测试的截屏视频,但您可以跳过前两分钟的大部分时间,大约 1:50 在我演示添加包含路径的过程中,大约 2:50 在我演示添加库路径中。因此,如果您有几分钟时间,可以观看以下视频。
http://www.youtube.com/watch?v=LnAuAJfMRy8
Sounds like you need to add the proper library paths to your project. Right-click your project and select Properties. This will bring up the property editor. Under the C/C++ Build|Settings you use the Linker section to set up libraries. I have a screencast on unit testing but you cans skip most of the first two minutes, around 1:50 in I demonstrate the process of adding include paths, around 2:50 in I show adding library paths. So if you have a few minutes you can watch the following video.
http://www.youtube.com/watch?v=LnAuAJfMRy8