utopia-rise / godot-kotlin-native

Kotlin bindings for Godot Engine
MIT License
290 stars 16 forks source link

Sample link error on OSX, symbols are prefixed #195

Open piiertho opened 4 years ago

piiertho commented 4 years ago

Version: Godot 3.2.2

OS/device including version: OSX 10.15.5

Issue description: Link error is encountered for OSX x64.

  "_godot_color_set_r", referenced from:
      _godot_gdnative_godot_color_set_r_wrapper3 in libgodot-library-cinterop-gdnative-cache.a(result.o)
     (maybe you meant: knifunptr_godot_gdnative3_godot_color_set_r, _godot_gdnative_godot_color_set_r_wrapper3 )
  "_godot_string_to_int64", referenced from:
      _godot_gdnative_godot_string_to_int64_wrapper691 in libgodot-library-cinterop-gdnative-cache.a(result.o)
     (maybe you meant: knifunptr_godot_gdnative691_godot_string_to_int64, _godot_gdnative_godot_string_to_int64_wrapper691 )
  "_godot_string_char_uppercase", referenced from:
      _godot_gdnative_godot_string_char_uppercase_wrapper708 in libgodot-library-cinterop-gdnative-cache.a(result.o)
     (maybe you meant: knifunptr_godot_gdnative708_godot_string_char_uppercase, _godot_gdnative_godot_string_char_uppercase_wrapper708 )
  "_godot_pool_string_array_invert", referenced from:
      _godot_gdnative_godot_pool_string_array_invert_wrapper232 in libgodot-library-cinterop-gdnative-cache.a(result.o)
     (maybe you meant: knifunptr_godot_gdnative232_godot_pool_string_array_invert, _godot_gdnative_godot_pool_string_array_invert_wrapper232 )
  "_godot_quat_new_with_euler", referenced from:
      _godot_gdnative_godot_quat_new_with_euler_wrapper73 in libgodot-library-cinterop-gdnative-cache.a(result.o)
     (maybe you meant: knifunptr_godot_gdnative73_godot_quat_new_with_euler, _godot_gdnative_godot_quat_new_with_euler_wrapper73 )
ld: symbol(s) not found for architecture x86_64

This error does not happen on the linux link, even on macbook.

Steps to reproduce: Build bindings locally from master-merge. Try to build sample project. On my side it fails on OSX link.

Minimal reproduction project: Sample project.

chippmann commented 4 years ago

@piiertho Is this still relevant? If i read the discussions on discord correctly, with a fix in a PR from @raniejade it's working now?

raniejade commented 4 years ago

@chippmann probably, I'll try building on my mac tomorrow.

raniejade commented 4 years ago

I just tested it out, apparently this a problem KN's adding kotlin.native.cacheKind=none to the sample's gradle.properties file.