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

Invalid or corrupted .obj file #540

Open
wyj1111kkk opened this issue Jan 6, 2025 · 3 comments
Open

Invalid or corrupted .obj file #540

wyj1111kkk opened this issue Jan 6, 2025 · 3 comments

Comments

@wyj1111kkk
Copy link

Sorry for the interruption. When I try to do the vehicle side of things, the .obj file does not open when the final compilation results in the following situation. But when I link that .obj file, Visual Studio 2022 reports an error showing invalid or damaged parts. What is the reason for this?
Picture

@dariomangoni
Copy link
Member

As you can see the specified path is a relative path so the location when it expects to find the file depends on your current working folder.
Can you please go to your build directory and:

  • check that you do have a bin/data folder?
  • try to run the demo by manually going into bin/Release (or bin/Debug)

If this works then it's just a matter of a wrong working folder: did you manually changed the configuration of demos in Visual Studio?
In VS, try to right-click on your demo, Properties>Configuration Properties>Debugging and make sure that the Working Directory is set to bin/Release (or bin/Debug).

@wyj1111kkk
Copy link
Author

I'm sorry, I'm a newbie. I would like to use the chrono project you developed to simulate the wheel-ground interaction. I used the demo_VEH_SCMTerrain_RigidTire.cpp in the demo in chrono and wrote a CMakeList. But I checked it as you said, and it still didn't solve the problem, and the .exe file generated by visual studio compilation shows that the .obj file can't be opened. Is the obj file to be linked in CMakeList? Below is the corresponding CMakeList.
8f4886bd1e7d7e99c9a8d779eb0ca49
6f3020d50888e40f0b458f2a4bb2be5

@dariomangoni
Copy link
Member

First, you are building in the source folder. Please avoid doing that.
Moreover, I think that you are building the project in the sources of chrono. That's even worse.
Did you compiled chrono before compiling the project?
Can you please check my previous questions and try to run the demo from the Chrono solution and not from your template_project solution?

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

2 participants