Missing .lib ?

115 views
Skip to first unread message

Giosco Pantana

unread,
Aug 30, 2021, 6:40:52 PM8/30/21
to ProjectChrono
Hi, does anyone know what .lib I'm missing? After adding all of them I still get this error

Severity Code Description Project File Line Suppression State
Error LNK2001 unresolved external symbol "__declspec(dllimport) private: virtual class std::shared_ptr<class chrono::collision::ChCollisionModel> __cdecl chrono::ChBody::InstanceCollisionModel(void)" (__imp_?InstanceCollisionModel@ChBody@chrono@@EEAA?AV?$shared_ptr@VChCollisionModel@collision@chrono@@@std@@XZ) Sandbox C:\Users\giopp\Desktop\SandboxProva\main.obj 1

Thanks and sorry if it's a dumb question.

Giovanni

Radu Serban

unread,
Aug 31, 2021, 5:08:21 AM8/31/21
to giopp...@gmail.com, ProjectChrono

Hi Giovanni,

 

This is weird. Probably a mix of old and new libraries.  I removed the function ChBody::InstanceCollisionModel a while ago, while refactoring the Chrono collision systems.  This latest code is in the git ‘develop’ branch and works fine.

 

Could you please let me know:

  1. Do you build Chrono from sources?  If so, do you use the latest code in the ‘develop’ branch (I strongly encourage you to do so)
  2. Do the various demos work for you?
  3. You seem to work in an external project and link to various Chrono libraries.  From what you describe, it looks like you are manually providing all dependencies.  Why not use the sample project we provide in “template_project” and modify the CMakeLists.txt therein appropriately?

 

--Radu

--
You received this message because you are subscribed to the Google Groups "ProjectChrono" group.
To unsubscribe from this group and stop receiving emails from it, send an email to projectchron...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/projectchrono/c3d90273-b30d-4f87-963c-fef1ca32dd70n%40googlegroups.com.

 

Giosco Pantana

unread,
Sep 1, 2021, 3:43:50 PM9/1/21
to ProjectChrono
Thanks for the reply.
I fixed the error and you were right, I mixed the header files from the prebuild project with the build libs and dlls.
Now it's working fine, except that i had to comment all the "#include "chrono/ChVersion.h"" and similar ones (they do not exist, in the folders they are like  "ChVersion.h.in").
is this supposed to happen? i tried using multicore but it dosen't work, probably because of this.

also I can't use the template project because 1) I can't use cmake lol and 2) i needed to include chrono in an existing project, it's like a game.

Thanks a lot for your time 

P.S. do you have any suggestion on how to move a player? i tried moving it by applying forces, but it's too slow and you have nearly no control on the movement. i tried changing the speed and the movement is perfect, but it dosen't respect physics like gravity.

thanks again

Konstantin Korsakov

unread,
Sep 1, 2021, 5:35:25 PM9/1/21
to Giosco Pantana, ProjectChrono
Actually headers are created during the build process. I also tried to use h.in firstly, but this doesn't work. Finally I build Chrono locally as a separate project and use dll,lib,includes from the output directory.

BTW if you're trying to use Chrono in UE, I can give you a module example.


Page

unread,
Nov 14, 2023, 2:37:06 AM11/14/23
to ProjectChrono
Hello, 
Can I get yours module example  use Chrono in UE.   Thank you very much.

Reply all
Reply to author
Forward
0 new messages