编译 libpng 并将其与 netbeans 和 mingw 一起使用

发布于 2024-09-24 20:18:50 字数 281 浏览 0 评论 0原文

我以前只使用 Visual Studio 来开发 C++,但我刚刚转向 NetBeans,并且遇到了一些问题。

我安装了 mingw,以便我的项目可以编译,但我不知道如何向其中添加外部库。我想使用静态库,而不是 dll。

我特别关注的库是 libpng

我希望这不是太 IDE具体来说,我也想知道如何准备图书馆。

Windows 操作系统。

I have only previously used visual studio for developing c++ but I've just moved to netbeans and am having some issues.

I got mingw installed so that my projects will compile but I dont know how to add external libraries to that. I want to use a static library, not a dll.

The library I specifically am looking at is libpng

I hope this isn't too IDE specific, I'm also looking to know how to prepare the library.

Windows OS.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

幽梦紫曦~ 2024-10-01 20:18:50

我或多或少明白了。我使用了 cmake gui,为 msys make 和 mingw g++ 配置gcc,在 zlib 源目录中,然后在输出目录中运行 msys makemake install。之后我对 libpng 做了同样的事情,但我必须添加一些变量以指向 cmake 中的 zlib include 和库目录。

然后在 netbeans 中,我右键单击项目上的“属性”,并为两个库中的每一个添加了 include 和 lib 位置。我也可以将这些文件复制到我的 mingw 目录中。

现在我只是陷入这个问题。

I figured it out more or less. I used the cmake gui, configured for msys make and mingw g++ and gcc, on the zlib source directory and then ran msys make and make install on the output directory. After that I did the same on libpng, but I had to add some variables to point to the zlib include and library directories within cmake.

Then in netbeans, I right clicked>>properties on my project and added include and lib location for each of the two libraries. I also could have copied the files into my mingw directories.

Now I'm just stuck with this issue.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文