Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

unresolved external symbol where running lastest version with nightly rust toolchain #12

Closed
jice-nospam opened this issue Nov 7, 2017 · 4 comments

Comments

@jice-nospam
Copy link
Contributor

The project compiles fine, but when trying to run tests or the sphere example, I've got those messages :

= note: sphere-e1f2b5e66f36c57a.sphere11.rcgu.o : error LNK2019: unresolved external symbol _ZN23btDiscreteDynamicsWorld10setGravityERK9btVector3 referenced in function _ZN8bulletrs8dynamics14dynamics_wor
ld13DynamicsWorld11set_gravity17h6dfe9011ff49dbd9E
          sphere-e1f2b5e66f36c57a.sphere7.rcgu.o : error LNK2019: unresolved external symbol _ZN11btRigidBodyC1ERKNS_27btRigidBodyConstructionInfoE referenced in function _ZN12bulletrs_sys25bt_bullet_dynami
cs_common11btRigidBody3new17h73dc4f8ea432745eE
          sphere-e1f2b5e66f36c57a.sphere7.rcgu.o : error LNK2019: unresolved external symbol _ZN11btTransform11getIdentityEv referenced in function _ZN12bulletrs_sys25bt_bullet_dynamics_common11btTransform1
1getIdentity17h19dcbfb13d508ed8E
          sphere-e1f2b5e66f36c57a.sphere7.rcgu.o : error LNK2019: unresolved external symbol _ZN11btTransformC1ERK12btQuaternionRK9btVector3 referenced in function _ZN12bulletrs_sys25bt_bullet_dynamics_comm
on11btTransform4new117h3750f03df7fecd87E
          sphere-e1f2b5e66f36c57a.sphere7.rcgu.o : error LNK2019: unresolved external symbol _ZN18btStaticPlaneShapeC1ERK9btVector3d referenced in function _ZN12bulletrs_sys25bt_bullet_dynamics_common18btSt
aticPlaneShape3new17had7d48954551de4aE
          sphere-e1f2b5e66f36c57a.sphere7.rcgu.o : error LNK2019: unresolved external symbol _ZN20btDefaultMotionStateC1ERK11btTransformS2_ referenced in function _ZN12bulletrs_sys25bt_bullet_dynamics_commo
n20btDefaultMotionState3new17hada6c57be2ab72c8E
          sphere-e1f2b5e66f36c57a.sphere7.rcgu.o : error LNK2019: unresolved external symbol _ZN11btRigidBody27btRigidBodyConstructionInfoC1EdP13btMotionStateP16btCollisionShapeRK9btVector3 referenced in fu
nction _ZN12bulletrs_sys25bt_bullet_dynamics_common39btRigidBody_btRigidBodyConstructionInfo3new17hfe8288feb2624be6E

Might this be an issue with the version of Visual Studio I'm using ? I'm using nightly-x86_64-pc-windows-msvc rust toolchain.

@vitvakatu
Copy link

AFAIK mvsc uses different ABI, so it's probably the reason. I'm not sure though

@not-fl3
Copy link
Owner

not-fl3 commented Nov 7, 2017

@vitvakatu exactly.

According to this: rust-lang/rust-bindgen#849, thiscall calling convention, used by msvc, is not yet implemented in rust.

So bindgen could generate bindings with --target=i686-pc-windows-msvc, but you will need some very nightly rust(not sure that it even exist) to use it. And anyway it will require a lot of work on rust side.

I decided to focus on gcc version and wait for bindgen and rustc improvements.

For now, I see only 2 options for you:

  • fork physics client C-API based version and use it with msvc
  • switch to x86_64-pc-windows-gnu

I really like the new c version, it's so much powerful and controllable, so I am into the second option :)

@jice-nospam
Copy link
Contributor Author

yeah, I really like the new version too. I have a few pull requests in the pipe. You can check them here. Only can't test them right now :) Ok, trying to switch to gnu toolchain

@jice-nospam
Copy link
Contributor Author

yeah, works fine with x86_64-pc-windows-gnu! closing this issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants