简体   繁体   English

构建C ++库时出现mno-cygwin无法识别的命令行选项错误

[英]mno-cygwin unrecognized command line option error when building c++ library

i'm new to c++ and implementing a java application that invoking c++ library methods using java native interface. 我是C ++的新手,并实现了一个使用Java本机接口调用c ++库方法的Java应用程序。 i'm using Cygwin64. 我正在使用Cygwin64。

os: windows 8 64 bit JDK: 1.7 64 bit gcc 4.8.2 操作系统:Windows 8 64位JDK:1.7 64位gcc 4.8.2


but when i try to build my project i'm getting this error 但是当我尝试构建我的项目时,出现此错误


"/usr/bin/make" -f nbproject/Makefile-Debug.mk QMAKE= SUBPROJECTS= .build-conf make[1]: Entering directory '/cygdrive/c/Users/User/Documents/NetBeansProjects/LibraryTest'
cd ../DataProcessor && /usr/bin/make  -f Makefile CONF=Debug
make[2]: Entering directory '/cygdrive/c/Users/User/Documents/NetBeansProjects/DataProcessor'
"/usr/bin/make" -f nbproject/Makefile-Debug.mk QMAKE= SUBPROJECTS= .build-conf
make[3]: Entering directory '/cygdrive/c/Users/User/Documents/NetBeansProjects/DataProcessor'
"/usr/bin/make"  -f nbproject/Makefile-Debug.mk dist/LocationDataProcessor.dll
make[4]: Entering directory '/cygdrive/c/Users/User/Documents/NetBeansProjects/DataProcessor'
mkdir -p build/Debug/Cygwin_4.x-Windows
rm -f build/Debug/Cygwin_4.x-Windows/CppConnector.o.d


gcc -mno-cygwin -Wl,--add-stdcall-alias -shared -m32   -c -g  -MMD -MP -MF build/Debug/Cygwin_4.x-Windows/CppConnector.o.d -o build/Debug/Cygwin_4.x-Windows/CppConnector.o CppConnector.c
gcc: error: unrecognized command line option ‘-mno-cygwin’


nbproject/Makefile-Debug.mk:69: recipe for target 'build/Debug/Cygwin_4.x-Windows/CppConnector.o' failed
make[4]: *** [build/Debug/Cygwin_4.x-Windows/CppConnector.o] Error 1
make[4]: Leaving directory '/cygdrive/c/Users/User/Documents/NetBeansProjects/DataProcessor'
nbproject/Makefile-Debug.mk:60: recipe for target '.build-conf' failed
make[3]: *** [.build-conf] Error 2
make[3]: Leaving directory '/cygdrive/c/Users/User/Documents/NetBeansProjects/DataProcessor'
nbproject/Makefile-impl.mk:39: recipe for target '.build-impl' failed
make[2]: *** [.build-impl] Error 2
make[2]: Leaving directory '/cygdrive/c/Users/User/Documents/NetBeansProjects/DataProcessor'
nbproject/Makefile-Debug.mk:74: recipe for target '.build-subprojects' failed
make[1]: *** [.build-subprojects] Error 2
make[1]: Leaving directory '/cygdrive/c/Users/User/Documents/NetBeansProjects/LibraryTest'
nbproject/Makefile-impl.mk:39: recipe for target '.build-impl' failed
make: *** [.build-impl] Error 2

i'm stacked with this java c++ integration thing for 4 days. 我被这个Java c ++集成的东西堆积了4天。 need some help to solve this. 需要一些帮助来解决这个问题。 thanks in advance 提前致谢

Cygwin and gcc has remove the support of -mno-cygwin flag. Cygwin和gcc删除了对-mno-cygwin标志的支持。 Thus, you have to built the source after removing flag. 因此,您必须在删除标志后构建源。

Another thing due to removal of flag you must have cygwin1.dll available along with your binaries. 另一件事是由于删除了标记,您必须具有cygwin1.dll及其二进制文件。

If you doesn't want to attach cygwin1.dll then download Mingw compiler and compile through it. 如果您不想附加cygwin1.dll,请下载Mingw编译器并通过它进行编译。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 C ++错误:无法识别的命令行选项“ -msse3” - c++ error:unrecognized command line option '-msse3' c++:错误:无法识别的命令行选项“-target” - c++: error: unrecognized command-line option ‘-target’ c++:错误:无法识别的命令行选项“-std=c++17” - c++: error: unrecognized command line option ‘-std=c++17’ C++:错误:无法识别的命令行选项“-std=gnu++14” - c++: error: unrecognized command line option ‘-std=gnu++14’ g++:错误无法识别的命令行选项 -municode 使用 Cygwin - g++: error unrecognized command-line option -municode using Cygwin 在cygwin上为android编译boost时无法识别的命令行选项 - unrecognized command line option while compiling boost for android on cygwin 安装以C ++编写的Python软件包(左)时出错:g ++无法识别的命令行选项--output-lib - Error installing Python package (leven) written in C++: g++ unrecognized command line option --output-lib 错误:在构建 Mesos 中无法识别命令行选项“-Wno-invalid-source-encoding”[-Werror] - Error: unrecognized command line option ‘-Wno-invalid-source-encoding’ [-Werror] within building Mesos MinGW:错误:无法识别的命令行选项“ -V” - MinGW: error: unrecognized command line option '-V' 为arm交叉编译opencv:C++:错误:无法识别的命令行选项'-mthumb'; 你的意思是“-mtbm”? - cross-compile opencv for arm : c++: error: unrecognized command line option ‘-mthumb’; did you mean ‘-mtbm’?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM