C ++ NetBeans:如何将.o文件链接到我的项目? [英] C++ NetBeans: How to link my .o file to my project?
本文介绍了C ++ NetBeans:如何将.o文件链接到我的项目?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我买了一堂课.我有标头(.h
)和目标文件(.o
).
如何在NetBeans IDE中链接.o
文件?
I've bought a class. I have the header (.h
) and an object-file (.o
).
How do I link the .o
file in my NetBeans IDE ?
谢谢!
推荐答案
您需要将.o
文件添加为外部库.我可以通过以下步骤完成此任务:
You need to add your .o
file as an external library. I was able to accomplish this using the following steps:
- 转到项目属性
- 在
Build->Linker
选项下,将库添加到库"部分 - 点击添加库文件"
- 导航到您的
.o
文件,然后选择absolute path
选项 - 重建
- Go to Project Properties
- Under the
Build->Linker
options, add a library to the Libraries section - Click 'Add Library File'
- Navigate to your
.o
file and select theabsolute path
option - Rebuild
希望这对您也有用.
这篇关于C ++ NetBeans:如何将.o文件链接到我的项目?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文