LNK2005 Error in Microsoft Visual Studio 2022 using CGAL_LINKED_WITH_3MF #7462
Unanswered
henriqueramalho1
asked this question in
Q&A
Replies: 2 comments 3 replies
-
|
Note that function Before upgrading, can you tell me if it is worth it? That is, how successful is this data format? |
Beta Was this translation helpful? Give feedback.
1 reply
-
|
I guess there is too much code that has nothing to do with CGAL. Did you git clone CGAL? In Surface/mesh/test/Surface_mesh/ you have one testcase that uses write_3MF and that links against the library. Maybe try to compile that first. |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment



Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello, I'm having some trouble to compile my code to open 3mf models using CGAL. I've already set up Lib3MF and all the includes, but when I try to compile, I get LNK2005 error. The functions that the error reports are in "write_3mf.h" and "read_3mf.h". As they are defined in headers, I thought that this could be the cause, but looking in other functions in CGAL, there are more functions defined in headers and they are not causing LNK2005.
I tried to add "inline" in all these functions, then it worked, but I want to know how to fix this problem without editing library headers.
My code is like that:
(MeshBuilder.h)
(main.cpp)
Beta Was this translation helpful? Give feedback.
All reactions