[Solved] Compiling LWJGL3

Started by gudenau, August 19, 2017, 20:33:03

Previous topic - Next topic

gudenau

I am trying to get the base LWJGL3 repo to compile on my Windows 10 Pro computer, but I run into issues when I get to "ant compile-native". It complains that the symbols _dcArgFloat, _dcCallChar, _dcStructSize, _dcArgChar, _dcDefineStruct, _dcArgLongLong, _dcCallLong, _dcStructField, _dcMode, _dcFree, _dcArgLong and _dcCallVoid can not be found. I am using the VS2015 developer command prompt to create the build, what am I missing?

Kai

You are likely not using the correct VS2015 command prompt (i.e. not setting the right architecture for 'vcvarsall').
You need to use the "x64 Native Tools Command Prompt" when you are running ant via a 64-bit JVM.
The problem is that the LWJGL build process uses the same architecture (x86 or amd64/x64) that the JVM running the build process is using and the build process downloads prebuilt object/library files for those native dependencies matching the architecture in order to link the built shared library against them.
If you run vcvarsall with "x86" and are actually building via a 64-bit JVM then the linker will not be able to correctly link in the prebuilt native dependencies.
So make sure to use the right VS2015 command prompt matching your system's/JVM's architecture.

gudenau

Quote from: Kai on August 19, 2017, 21:31:19
You are likely not using the correct VS2015 command prompt (i.e. not setting the right architecture for 'vcvarsall').
You need to use the "x64 Native Tools Command Prompt" when you are running ant via a 64-bit JVM.
The problem is that the LWJGL build process uses the same architecture (x86 or amd64/x64) that the JVM running the build process is using and the build process downloads prebuilt object/library files for those native dependencies matching the architecture in order to link the built shared library against them.
If you run vcvarsall with "x86" and are actually building via a 64-bit JVM then the linker will not be able to correctly link in the prebuilt native dependencies.
So make sure to use the right VS2015 command prompt matching your system's/JVM's architecture.

Thanks, this solved the issue I was having. Now to try and add a binding.

SHC

What library are you trying to create bindings to?