(12-07-2020, 06:36 PM)megamarc Wrote: Hi!
What version of the OS and JDK are you using? I use Windows 10 x64 2004 and OpenJDK 1.8.22.
I've tried the commands I put on github, and they still work for me. Just a minor warning on a function because I forgot to put a type cast, but it doesn't stop compilation. I've tried gcc and tcc compilers, and both produce the resulting TilengineJNI.dll library.
You must not use the "-c" switch, because it tells gcc/tcc to just compile, but not try to link the final library. The errors you're getting are from the linker, not the compiler. That way you avoid the linker errors, but also don't get the library. You cannot import the dll if it has not been built, that's why Java complains when importing it: the library still doesn't exist.
Please attach here OS, JDK versions, the line you're using to build, and the exact output you get. Just copy and paste.
OS : Windows 10 2004
JDK : 1.8.0_181 (Official Java sdk)
Command used for building : gcc -shared -I"%JAVA_HOME%\include" -I"%JAVA_HOME%\include\win32" -I"../Tilengine.dll" TilengineJNI.c -o ../TilengineJNI.dll
output : Link to the Pastebin I only changed the user name and computer name for privacy reasons.
IDE in case of need : IntelliJ IDEA 2019.2.3