gpt4 book ai didi

c++ - 如何将nana编译成静态库

转载 作者:太空宇宙 更新时间:2023-11-04 13:46:29 29 4
gpt4 key购买 nike

我下载了 nana c++ gui 库。我正在尝试在 Windows 下编译这个库。

我正在使用本教程: nanapro.org - Installing nana

Step Two: Create a static linkage library solution within a IDE which you use, and add all the files which are placed in "NanaPath/source" and in its all sub directiories to the solution. Then compile the solution and you will get a static linkage file NanaStatic in the path "NanaPath/build/bin/IDEName".

但我的输出是:

"/usr/bin/make" -f nbproject/Makefile-Debug.mk QMAKE= SUBPROJECTS= .clean-conf
make[1]: Entering directory '/cygdrive/c/Users/user/Documents/NetBeansProjects/CppStaticLibrary_1'
rm -f -r build/Debug
rm -f dist/Debug/Cygwin-Windows/libcppstaticlibrary_1.a
make[1]: Leaving directory '/cygdrive/c/Users/user/Documents/NetBeansProjects/CppStaticLibrary_1'


CLEAN SUCCESSFUL (total time: 2s)

"/usr/bin/make" -f nbproject/Makefile-Debug.mk QMAKE= SUBPROJECTS= .build-conf
make[1]: Entering directory '/cygdrive/c/Users/user/Documents/NetBeansProjects/CppStaticLibrary_1'
"/usr/bin/make" -f nbproject/Makefile-Debug.mk dist/Debug/Cygwin-Windows/libcppstaticlibrary_1.a
make[2]: Entering directory '/cygdrive/c/Users/user/Documents/NetBeansProjects/CppStaticLibrary_1'
mkdir -p build/Debug/Cygwin-Windows/_ext/2108599812
rm -f build/Debug/Cygwin-Windows/_ext/2108599812/any.o.d
g++ -c -g -I../../nana/include -std=c++11 -MMD -MP -MF build/Debug/Cygwin-Windows/_ext/2108599812/any.o.d -o build/Debug/Cygwin-Windows/_ext/2108599812/any.o ../../nana/source/any.cpp
nbproject/Makefile-Debug.mk:75: recipe for target 'build/Debug/Cygwin-Windows/_ext/2108599812/any.o' failed
make[2]: *** [build/Debug/Cygwin-Windows/_ext/2108599812/any.o] Error 1
make[2]: Leaving directory '/cygdrive/c/Users/user/Documents/NetBeansProjects/CppStaticLibrary_1'
nbproject/Makefile-Debug.mk:66: recipe for target '.build-conf' failed
make[1]: *** [.build-conf] Error 2
make[1]: Leaving directory '/cygdrive/c/Users/user/Documents/NetBeansProjects/CppStaticLibrary_1'
nbproject/Makefile-impl.mk:39: recipe for target '.build-impl' failed
make: *** [.build-impl] Error 2


BUILD FAILED (exit value 2, total time: 1s)

最佳答案

娜娜的进化速度非常快。目前只能用 C++11 编译。我建议您在以下位置下载发行版:

Nana - A modern C++ GUI library / Sourceforge

或者更好,最后修复在 GitHub :

Nana Hotfixes

安装非常简单。基本上你复制 nana 的源代码(很小:0.5 MB 的 zip)并告诉你的构建系统它在哪里。点击链接获取详细信息。

关于c++ - 如何将nana编译成静态库,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/25675690/

29 4 0
文章推荐: html - 具有共享宽度的多个 html 对象
文章推荐: jquery - 遍历文本并用 span 替换 *
文章推荐: java - 按钮中的图像模糊,按钮忽略 setSize
文章推荐: jquery - 如何使用 jQuery 选择
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com