C ++:如何在Netbeans中添加库(DarkGDK + DirectX SDK) [英] C++: How to add a library in Netbeans (DarkGDK + DirectX SDK)
问题描述
我正在尝试学习如何使用DarkGDK制作游戏。但我必须在Visual Studio中编写。
我不喜欢Visual Studio。它的建议( Ctrl-Space
for Completion)很糟糕(在我看来)并且编译器坏了(参见我之前的问题)。
I'm trying to learn how to make games with DarkGDK. But I have to write in Visual Studio.
I don't like Visual Studio. Its suggestions (Ctrl-Space
for Completion) are bad (in my opinion) and the compiler is broken (See my previous questions).
所以我想通过MSys和MinGW迁移到Netbeans。但是我无法在Netbeans中使用DarkGDK
库。我添加了两个包括文件夹:
So I want to migrate to Netbeans, with MSys and MinGW. But I'm not able to use the DarkGDK library in Netbeans. I added two include folders:
- C:\Program Files\The游戏Creators\Dark GDK\Include
- C:\Program Files\Microsoft的DirectX SDK(2007年8月)\Include
后加入这包括目录,我可以 #include< DarkGDK.h>
。
但他显示警告:有未解决的内部包括与LT; DarkGDK.h>
After adding this include directories, I can #include <DarkGDK.h>
.
But he shows a warning: "There are unresolved includes inside <DarkGDK.h>
"
当我试图编译: main.cpp中:9 :21:警告:DarkGDK.h:没有这样的文件或目录
在Visual Studio中是包含文件
和库文件
。在Netbeans中,当我转到工具 - >选项 - > C / C ++ - >代码帮助时,只有包含目录
。
In Visual Studio are Include files
and Library files
. And in Netbeans, there is only Include Directories
when I go to Tools -> Options -> C/C++ -> Code Assistance.
所以,我的问题是:如何在Netbeans中添加库文件?
或者任何一个人都这样做了,并且知道如何做到这一点。
So, my question is: "How can I add the Library files in Netbeans"?
Or does any-one did this yet and knows how to do this.
推荐答案
我个人发现工具 - >选项中的包含目录不起作用。您需要右键单击您的项目并转到属性 - > C ++编译器并添加您的包含目录。然后从属性 - >链接器添加您的库目录和库。
Personally I found the include directories in Tools -> Options don't work. You need to right click on your project and go to properties -> C++ Compiler and add your include directories. Then from properties -> Linker to add your library directories and libraries.
这篇关于C ++:如何在Netbeans中添加库(DarkGDK + DirectX SDK)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!