Hi Dario, Thanks a lot. Yes the Problem was I did not set the CHRONO_DATA_DIR variable. After adding line "set(CHRONO_DATA_DIR D:/chrono/chrono/data)" and including Vehicle component in find_package(). I am able to build my project successfully.
I hope I am using the latest branch of chrono. because git branch command outputs main*. Now that my project is built successfully but when I run the exe file I am getting the following error and the UI crashes. Any Idea with this? On Monday 26 February 2024 at 12:36:29 UTC [email protected] wrote: > Hi Prabas, > there might be a couple of issues: > > - it seems that you didn't call *SetChronoDataPath(CHRONO_DATA_DIR)*; > - if the issue persists it might be due to a wrong linking to > VisualStudio runtime libraries (but that's assumes that you are on > Windows, > with VisualStudio and you are compiling in Debug mode). > if so, please make sure to have the most recent version of Chrono: I > indeed pushed a fix to a very similar issue with commit e9050235 on > February 13th > If you have a clone of Chrono older than this date, you might see that > right-clicking on your project target, in *Properties>C/C++>Code > Generation*, for the *Configuration: Debug*, you may see that the > runtime library is wrongly set to *Multi-threaded DLL (/MD)* instead > of *Multi-threaded Debug DLL (/MDd)* > > If this doesn't solve your problem you may want to share your CMakeCache > and the log of the CMake run of your project. > > Dario > > > Il giorno lunedì 26 febbraio 2024 alle 12:25:00 UTC+1 [email protected] > ha scritto: > >> Hi all, >> >> I am trying to create my very simple first project in chrono where a I >> just wanted to replace the gator vehicle in the demo_VEH_Gator.cpp with a >> MAN 5t truck. While building the project I am getting around 56 error >> LNK2019. I have attached my code and error in the text file below. Any help >> is highly appreciated. >> >> my_example.obj : error LNK2019: unresolved external symbol >> "__declspec(dllimport) class std::basic_string<char,struct >> std::char_traits<char>,class std::allocator<char> > __cdecl >> chrono::vehicle::GetDataFile(c >> lass std::basic_string<char,struct std::char_traits<char>,class >> std::allocator<char> > const &)" >> (__imp_?GetDataFile@vehicle@chrono@@YA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@AEBV34@@Z >> ) referenced in function main [D:\chrono\chrono\man\build\my_demo.vcxproj] >> >> -- 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 [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/projectchrono/b71dd089-3600-42eb-b2ba-c405af8572f9n%40googlegroups.com.
