You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
RayLib clashing with Windows libraries, the following errors:
More Than one instance of overloaded function "CloseWIndow" has 'C' Linkage
More Than one instance of overloaded function "ShowCursor" has 'C' Linkage
'CloseWindow': you cannot overload a function with 'extern "C" linkage'
'ShowCursor': you cannot overload a function with 'extern "C" linkage'
I tried using the following workaround #1217, which did not help only caused more issues.
Anyone have a similar issue or any ideas on how to fix this problem?
Environment:
CMake, Ninja with Visual Studio
OS: Windows
I've tried adding RayLib using the following methods:
I've tried using VcPKG as a dependency manager, this gave me the error.
Adding RayLib to the CMakeFile via the following:
`# Set this to the minimal version you want to support
find_package(raylib 3.0 QUIET) # Let CMake search for a raylib-config.cmake
You could change the QUIET above to REQUIRED and remove this if() clause
This part downloads raylib and builds it if it's not installed on your system
if (NOT raylib_FOUND) # If there's none, fetch and build raylib
include(FetchContent)
This is a duplicate issue and a workaround was already provided and it works for many users. I'm afraid there is no plans to change raylib because of that
Issue:
RayLib clashing with Windows libraries, the following errors:
More Than one instance of overloaded function "CloseWIndow" has 'C' Linkage
More Than one instance of overloaded function "ShowCursor" has 'C' Linkage
'CloseWindow': you cannot overload a function with 'extern "C" linkage'
'ShowCursor': you cannot overload a function with 'extern "C" linkage'
I tried using the following workaround #1217, which did not help only caused more issues.
Anyone have a similar issue or any ideas on how to fix this problem?
Environment:
CMake, Ninja with Visual Studio
OS: Windows
I've tried adding RayLib using the following methods:
I've tried using VcPKG as a dependency manager, this gave me the error.
Adding RayLib to the CMakeFile via the following:
`# Set this to the minimal version you want to support
find_package(raylib 3.0 QUIET) # Let CMake search for a raylib-config.cmake
You could change the QUIET above to REQUIRED and remove this if() clause
This part downloads raylib and builds it if it's not installed on your system
if (NOT raylib_FOUND) # If there's none, fetch and build raylib
include(FetchContent)
FetchContent_Declare(
raylib
URL https://github.com/raysan5/raylib/archive/master.tar.gz
)
FetchContent_GetProperties(raylib)
if (NOT raylib_POPULATED) # Have we downloaded raylib yet?
set(FETCHCONTENT_QUIET NO)
FetchContent_Populate(raylib)
endif()
endif()
target_link_libraries(${PROJECT_NAME} raylib)
`
The text was updated successfully, but these errors were encountered: