libgdx / gdx-jnigen

jnigen is a small library that can be used with or without libGDX which allows C/C++ code to be written inline with Java source code.
Apache License 2.0
60 stars 25 forks source link

Jnigen does not have compiler suffix, and resets it every build #16

Closed Dunnysoft closed 3 years ago

Dunnysoft commented 3 years ago

Reposting in correct repo-

When using a fresh download of the latest build of Jnigen (with and without the template), it gives the following error on the Windows build:

Property "env.PATH" has not been set

It then searched the global path for this: [available] Unable to find x86_64-w64-mingw32-g++

If you manually add '.exe' to the compiler-suffix in the XML files, it removes it every build and is then unable to actually run the compiler (which exists and is in the path).

Which then leads to the following string of errors:

Property "compiler-found" has not been set
create-build-dir:
Skipped because property 'has-compiler' not set.

compile:
Skipped because property 'has-compiler' not set.

link:
Skipped because property 'has-compiler' not set.

strip:
Skipped because property 'should-strip' not set.

And then ant cannot run.

Please select the affected platforms

PokeMMO commented 3 years ago

You should now be able to override compilerSuffix from gradle like:

jnigen {
    ...
    add(Windows, x32) {
        compilerSuffix = ".exe"
    }
    add(Windows, x64) {
        compilerSuffix = ".exe"
    }
}
Dunnysoft commented 3 years ago

Thanks, I'll test it when I get home tomorrow

Dunnysoft commented 3 years ago

It has successfully created .DLL files now! Thank you