tudelft3d / City3D

Large-scale LoD2 Building Reconstruction from Airborne LiDAR Point Clouds
https://github.com/tudelft3d/City3D
GNU General Public License v3.0
237 stars 39 forks source link

[BUG] - put here a short description of the issue #49

Closed study313software closed 3 months ago

study313software commented 3 months ago

Describe the bug Bug: cmd build error with CGAL 5.4.1 When I compile the project with x64 tools for VS2019: there is a cmake error: CMake Error at code/method/CMakeLists.txt:51 (message):CGAL found, but v5.4 or above is required. Please install CGAL v5.4 or above. 2

I check the cmake.txt. In line 51, 3

However, I add the CGAL path to the enviroment. Like This: 4

And the version of CGAL is 5.4.1 which is >=5.4 5

Is there anything wrong with my CGAL? It seemed like the enviroment path don't work

Development/Running environment:

Additional context Add any other context about the problem here.

LiangliangNan commented 3 months ago

It seems your "${CGAL_VERSION}" is empty. Do you also have other versions of CGAL on your machine? After setting the environment variable, you must restart your VS/CMake for the environment variable to take effect. It is also advised to delete all intermediate files and folders to start a new build.

study313software commented 3 months ago

Yes, I have the lower Version CGAL 4.7 in my computer. Is that effect the build of the project? And I don't put the CGAL 4.7 path in the enviroment.

LiangliangNan commented 3 months ago

Please change:

if (CGAL_FOUND)
    message(STATUS "Found CGAL: ${CGAL_VERSION}")

to

if (CGAL_FOUND)
    message(STATUS "Found CGAL v${CGAL_VERSION}: ${CGAL_INCLUDE_DIRS}")

This will print the include path of the found CGAL (making it easier to identify which version was actually found).

study313software commented 3 months ago

Thanks for your suggestion. I changed the message info. And the include path of the found CGAL is V5.4.1. 6

But it seemed like the ${CGAL_VERSION} is missing. If I make sure that CGAL is >=5.4.1 in my computer, can I change the line47 in Cmakelists to "if(CGAL_Found)"?

study313software commented 3 months ago

I changed line 47 in cmake. And now it can configure sucess(although missing lib Gurobi) 10 8 But I don't see any sln or project in release folder? Is there still anything wrong with my build process? 9

LiangliangNan commented 3 months ago

For the empty ${CGAL_VERSION} variable, where did you get the CGAL code? Did you change anything after you download CGAL?

What commands did you use for the configuration process? I guess you can continue to use "nmake" to build City3D. After that the exe file will be generated in the "bin" directory. To generate project files for a specific IDE like Visual Studio. Please refer to CMake manuals.

Best,

Liangliang

study313software commented 3 months ago

Thanks for your suggestion! When I download CGAL, I follow the tutorial in this link: https://www.cnblogs.com/lmst-ytt/p/16690676.html I changed the gmp folder of CGAL. 11

With namke, I get exe in the bin folder. 12

Is the cmake manual means that I could use cmake gui to build the project?

LiangliangNan commented 3 months ago

I meant CMake documentation.

Glad you have successfully built City3D, so I am going to close this issue.

Best,

Liangliang


From: study313software @.> Sent: Wednesday, June 12, 2024 7:46:39 AM To: tudelft3d/City3D @.> Cc: Liangliang Nan @.>; Comment @.> Subject: Re: [tudelft3d/City3D] [BUG] - put here a short description of the issue (Issue #49)

Thanks for your suggestion! When I download CGAL, I follow the tutorial in this link: https://www.cnblogs.com/lmst-ytt/p/16690676.html I changed the gmp folder of CGAL. 11.png (view on web)https://github.com/tudelft3d/City3D/assets/41318959/d8878a52-d162-4c2e-8223-572284fc5cce

With namke, I get exe in the bin folder. 12.png (view on web)https://github.com/tudelft3d/City3D/assets/41318959/b0b40559-3ce3-44f1-a9e3-b88059facf19

What do you mean about CMake manuals?

— Reply to this email directly, view it on GitHubhttps://github.com/tudelft3d/City3D/issues/49#issuecomment-2162153670, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ADWOVCBCAPKY37SHQDK2HFTZG7OD7AVCNFSM6AAAAABJD3EFZWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCNRSGE2TGNRXGA. You are receiving this because you commented.Message ID: @.***>

study313software commented 3 months ago

Thanks for your reply again! I build the project in VS2019 and can debug the code now.Hope you have a great day!