Skip to content

Commit

Permalink
Link dynamic linker explicitly
Browse files Browse the repository at this point in the history
It builds just fine on newer systems, but less so on older Ubuntu.
  • Loading branch information
vkoskiv committed Oct 29, 2023
1 parent c52ce7d commit 598e60d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ add_executable(c-ray ${SOURCES})
target_include_directories(c-ray PRIVATE ${c-ray_SOURCE_DIR}/src)
target_include_directories(c-ray PRIVATE ${c-ray_SOURCE_DIR}/tests)
if (NOT MSVC)
target_link_libraries(c-ray PRIVATE -lpthread -lm)
target_link_libraries(c-ray PRIVATE -lpthread -lm -ldl)
endif ()

include(CheckIPOSupported)
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
CC=cc
CFLAGS=-Wall -Wextra -Wno-missing-field-initializers -std=c99 -D_GNU_SOURCE -O2 -ftree-vectorize -DCRAY_TESTING
LDFLAGS=-lpthread -lm
LDFLAGS=-lpthread -lm -ldl
BIN=bin/c-ray
OBJDIR=bin/obj
SRCS=$(shell find . -name '*.c' -not -path './CMakeFiles/*' )
Expand Down

0 comments on commit 598e60d

Please sign in to comment.