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
59 stars 26 forks source link

Add new CPU architecture #49

Closed wangchenguang123 closed 7 months ago

wangchenguang123 commented 7 months ago

When I want to add a new form of CPU architecture to this project, how can I test its success

SimonIT commented 7 months ago

If you run ./gradlew build (or just ./gradlew test) on a computer with the new architecture, it will do all the jnigen magic and run it afterwords. If it is successful, something like this:

boolean: true
byte: 1
char: �
short: 3
int: 4
long: %
float: 6.000000
double: 0
byteBuffer: 8
bool[0]: false
char[0]:
short[0]: 10
int[0]: 11
long[0]: %
float[0]: 13.000000
double[0]: 14.000000
string: Hurray fuck this nuts

will appear in the log

wangchenguang123 commented 7 months ago

If you run ./gradlew build (or just ./gradlew test) on a computer with the new architecture, it will do all the jnigen magic and run it afterwords. If it is successful, something like this:

boolean: true
byte: 1
char: �
short: 3
int: 4
long: %
float: 6.000000
double: 0
byteBuffer: 8
bool[0]: false
char[0]:
short[0]: 10
int[0]: 11
long[0]: %
float[0]: 13.000000
double[0]: 14.000000
string: Hurray fuck this nuts

will appear in the log

ok thank you for your reply when i try to change some for new arch LoongArch like this。but i faifed do ./gradlew test i will continue try to find error about this 图片 图片

SimonIT commented 7 months ago

You can find a more detailed exception in gdx-jnigen/build/reports/tests/test/classes/com.badlogic.gdx.jnigen.JniGenTest.html. Probably there are some tools missing

Berstanio commented 7 months ago

https://github.com/libgdx/gdx-jnigen/pull/54 has been merged