hollasch / ray4

Ray4 is a 4D raytracer original developed for my 1991 master's thesis in computer science
http://hollasch.github.io/ray4
MIT License
54 stars 3 forks source link

linking fails (missing `-lm`) #16

Open claudeha opened 7 months ago

claudeha commented 7 months ago

As a CMake neophyte I'm not sure this is the best solution but it works for me:

diff --git a/ray4/CMakeLists.txt b/ray4/CMakeLists.txt
index 79cf8c9..a05d896 100644
--- a/ray4/CMakeLists.txt
+++ b/ray4/CMakeLists.txt
@@ -21,3 +21,4 @@ set ( sources_ray4
 )

 add_executable (ray4 ${sources_ray4})
+target_link_libraries(ray4 -lm)
hollasch commented 1 month ago

What platform are you building on? What toolset?

claudeha commented 1 month ago

On 28/07/2024 23:31, Steve Hollasch wrote:

What platform are you building on? What toolset?

Was a while since I tested, but probably Debian amd64/x86_64 with gcc.