compiler error
p4yl0ad3livery opened this issue · comments
tried different ways to compile ... same error
also include -I/usr/lib/jvm/java-11-openjdk-amd64/include
error:
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/10/../../../x86_64-linux-gnu/Scrt1.o: in function `_start': (.text+0x20): undefined reference to `main' collect2: error: ld returned 1 exit status
any hint on this?
Sorry, i forgot
Here is the command to compile it
gcc -fPIC -I"$JAVA_HOME/include" -I"$JAVA_HOME/include/linux" -shared -o libhello.so HelloJNI.c
work like Charm - so far... best POC