Page 1 of 1

Linker error vs2017

Posted: Wed Nov 28, 2018 4:04 pm
by Daneldio
Hey, so this is what i get when i compile my program:

error LNK2001: unresolved external symbol "void __cdecl btAlignedFreeInternal(void *)" (?btAlignedFreeInternal@@YAXPEAX@Z)
error LNK2001: unresolved external symbol "void * __cdecl btAlignedAllocInternal(unsigned __int64,int)" (?btAlignedAllocInternal@@YAPEAX_KH@Z)

This is what i have done:
I built bullet with cmake, i checked the USE_MSVC_RUNTIME_LIBRARY_DLL.
I opened the project and started to build bullet in debug and release mode.

I only needed the collision, softbody, dynamics and linearmath so i went in to the lib folder that
got created for me after the build. I took the libs and put them inside my personal project lib folder.
I took the src folder that is inside of bullet and put that in my include folder.
These folders are already set up in my project properties because i have other includes and libraries that im using, so the only thing i did was to add the libs to my linker input.

I read somewhere that the order matters ( Dont know if it still does ) and i added them in this order:
BulletSoftBody.lib
BulletCollision.lib
BulletDynamics.lib
LinearMath.lib.

Why is this happening and what are the solution to fix this problem?

Re: Linker error vs2017

Posted: Wed Jan 02, 2019 7:22 am
by anthrax11
Daneldio wrote: LinearMath.lib.
Is there a dot after "LinearMath.lib" in the Additional Dependencies list?

btAlignedFreeInternal should be defined in LinearMath.lib.

Re: Linker error vs2017

Posted: Tue Mar 26, 2019 7:17 pm
by Daneldio
No there is not. Sorry for the delay :)