Forceflow / trimesh2

C++ library and set of utilities for input, output, and basic manipulation of 3D triangle meshes
GNU General Public License v2.0
307 stars 72 forks source link

error LNK2038 when trying to use this lib #19

Closed francescobrischetto closed 2 years ago

francescobrischetto commented 2 years ago

Hello, I'm having some linker issues in using this library. Any suggest on how to fix it? Sorry if I am not in the right place to ask.

errors

Forceflow commented 2 years ago

My Italian is not great, but I think you're trying to dynamically link the library, while you should statically link it?

francescobrischetto commented 2 years ago

I finally fixed it. It was my fault on compiling the library with the wrong linker options. Thanks and sorry, you can just remove this thread

Forceflow commented 2 years ago

No problem. Is there any way I can improve the documentation to prevent this in the future?

francescobrischetto commented 2 years ago

Well, my problem was that I tried to insert the library in an environment that was not setupped by me (but from my teacher) and so I didn't know actually what exactly was going on. Moreover, when tried to compile the library myself, with the Visual Studio build solutions that you provided, it was automatically set the flag /MD instead of the flag /MT that I'm using in my project (and I didn't know the difference here reported: https://docs.microsoft.com/en-us/cpp/build/reference/md-mt-ld-use-run-time-library?view=msvc-170 ). Maybe my was only a really specific case