Closed petrasvestartas closed 2 years ago
Do you experience the same problem if you use the latest master?
Could you provide a minimal example that reproduces this problem? I could poke it when there's time.
I am not very familiar with ExternalProject_Add
but I think this is something I would like to work :)
@artem-ogre
This is a very minimal example. I removed all my code to illustrate the most simple example. I really spend full days from morning till evening to search for the problem, and it really boils down to "CDT.h" file in the precompiled header "stdafx.h". If you cannot solve this issue with precompiled header, please show me an example within my code structure, how CDT can be CMake configured as a library and then included in the precompiled header.
Unzip then use these commands: cdt_test.zip
cd ..\cdt_test
cmake --fresh -DGET_LIBS=ON -DBUILD_MY_PROJECTS=OFF -DCMAKE_BUILD_TYPE="Release" -G "Visual Studio 17 2022" -A x64 .. && cmake --build . --config Release
cmake --fresh -DGET_LIBS=OFF -DBUILD_MY_PROJECTS=ON -DCMAKE_BUILD_TYPE="Release" -G "Visual Studio 17 2022" -A x64 .. && cmake --build . --config Release
Release\cdt_test
main.obj : error LNK2005: "class std::vector<unsigned short,class std::allocator
> __cdecl CDT:: CalculateTriangleDepths<...> already defined in cmake_pch.obj
I believe the issue is solved on master
in 4fa94abe01a18be97e690f248f8e049ade674009
Since this commit was made in 2021.
Why this does not work on the current version? I use ExternalProject_Add to download the latest release:
URL https://github.com/artem-ogre/CDT/archive/refs/tags/1.1.2.zip
Would you have time to check the CMakeLists and the code itself?
The commit was done after the last release :) The last release is old and master moved a long way since.
Works perfectly, by cloning the repo itself. Thank you. Would it be possible to add the current version to the release?
After two days of check all possible things, I finally feel that this is over:
I've done a new release from the current master
: https://github.com/artem-ogre/CDT/releases/tag/1.2.0
I still recommend avoiding releases and leaving on the main branch if latest and greatest is required.
Thank you very much;)
Hi,
Maybe this is amateur question. But why in "\CDT\include" there are files with the same names e.g. CDT.h and CDT.hpp ? Wont they be conflicting while linking?
I really have problem that I cannot solve for days. If I
#include <CDT.h>
to precompiled headers it always produces the error below:I download CDT with cmake in the build folder like this: