1

i'm new to c++ and implementing a java application that invoking c++ library methods using java native interface. i'm using Cygwin64.

os: windows 8 64 bit JDK: 1.7 64 bit 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. need some help to solve this. thanks in advance

1

1 Answer 1

1

Cygwin and gcc has remove the support of -mno-cygwin flag. 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.

If you doesn't want to attach cygwin1.dll then download Mingw compiler and compile through it.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.