This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 267624 - IDE doesn't generate C JNI projects
Summary: IDE doesn't generate C JNI projects
Status: RESOLVED FIXED
Alias: None
Product: cnd
Classification: Unclassified
Component: Mixed Development (show other bugs)
Version: 8.2
Hardware: PC Solaris
: P3 normal (vote)
Assignee: Alexander Simon
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-08-17 15:40 UTC by soldatov
Modified: 2016-08-20 02:16 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description soldatov 2016-08-17 15:40:12 UTC
In my case C++ JNI projects works in simplest cases only. I can't use std::cout. On my Solaris 11.3 I can't mix Java 8 and GCC.

Exception in thread "main" java.lang.UnsatisfiedLinkError: .../GNU-Solaris-x86/libCppJNILibrary_1.so: ld.so.1: java: fatal: relocation error: R_AMD64_32S: file .../CppJNILibrary_1/dist/Debug/GNU-Solaris-x86/libCppJNILibrary_1.so: symbol ___Argv: value 0xffff80ffbf5e7948 does not fit
	at java.lang.ClassLoader$NativeLibrary.load(Native Method)
	at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1941)
	at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1857)
	at java.lang.Runtime.loadLibrary0(Runtime.java:870)
	at java.lang.System.loadLibrary(System.java:1122)
	at JavaApplication1.main(JavaApplication1.java:5)

C will make IDE more compiler and platform independent. Currently In order to "fix" project I need to rename source file (*.cpp to *.c) and copy&paste Build|C++ Compiler|Include Directories property.
Comment 1 petrk 2016-08-17 16:37:16 UTC
It seems we need to do the following:
1) Instead of .cpp file generate .c file
2) When generating JNI library configure C compiler in the same way we configure C++ compiler
Comment 2 Alexander Simon 2016-08-18 12:42:16 UTC
fixed, change set:
http://hg.netbeans.org/cnd-main/rev/921775cba7bb
Comment 3 Quality Engineering 2016-08-20 02:16:15 UTC
Integrated into 'main-silver', will be available in build *201608200002* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/921775cba7bb
User: Alexander Simon <alexvsimon@netbeans.org>
Log: fixed Bug #267624 IDE doesn't generate C JNI projects