Issues while compiling with windows
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 30/100
- Issue type
- Bug
- Clarity
- Needs clarification
- Activity status
- Stale
- Tech stack
- cmake, cpp
- Domain
- build-system, operating-systems
Research direction
Start by reproducing the Windows CMake build for src/Command/Commands/Game_info/Create_game/Create_game.cpp and inspect how raylib.h is included alongside the Windows SDK headers. Compare the Linux and Windows build configuration and include setup. Done means the project compiles on Windows without the reported raylib.h and Windows header conflicts.
Written by the indexing model from the issue text.
Description
Hello I have a project where i need to compile the raylib-cpp with cmake under linux and windows, no error on linux but windows it's different. I use Cmake to compile the project.
C:\Users\Hugo\Documents\GitHub\B-CPP-500-MLH-5-1-rtype-hugo.bardet\build\windows\vcpkg_installed\x64-windows\include\raylib.h(
249,3): error C2365: 'Rectangle': redefinition; previous definition was 'function' [C:\Users\Hugo\Documents\GitHub\B-CPP-500-M
LH-5-1-rtype-hugo.bardet\build\windows\src\Command\r-type-cmd.vcxproj]
(compiling source file '../../../../src/Command/Commands/Game_info/Create_game/Create_game.cpp')
C:\Program Files (x86)\Windows Kits\10\Include\10.0.22621.0\um\wingdi.h(4561,24):
see declaration of 'Rectangle'
C:\Users\Hugo\Documents\GitHub\B-CPP-500-MLH-5-1-rtype-hugo.bardet\build\windows\vcpkg_installed\x64-windows\include\raylib.h(
287,15): error C3646: 'source': unknown override specifier [C:\Users\Hugo\Documents\GitHub\B-CPP-500-MLH-5-1-rtype-hugo.bardet
\build\windows\src\Command\r-type-cmd.vcxproj]
(compiling source file '../../../../src/Command/Commands/Game_info/Create_game/Create_game.cpp')
C:\Users\Hugo\Documents\GitHub\B-CPP-500-MLH-5-1-rtype-hugo.bardet\build\windows\vcpkg_installed\x64-windows\include\raylib.h(
310,15): error C2143: syntax error: missing ';' before '*' [C:\Users\Hugo\Documents\GitHub\B-CPP-500-MLH-5-1-rtype-hugo.bardet
\build\windows\src\Command\r-type-cmd.vcxproj]
(compiling source file '../../../../src/Command/Commands/Game_info/Create_game/Create_game.cpp')
C:\Users\Hugo\Documents\GitHub\B-CPP-500-MLH-5-1-rtype-hugo.bardet\build\windows\vcpkg_installed\x64-windows\include\raylib.h(
310,20): error C2238: unexpected token(s) preceding ';' [C:\Users\Hugo\Documents\GitHub\B-CPP-500-MLH-5-1-rtype-hugo.bardet\bu
ild\windows\src\Command\r-type-cmd.vcxproj]
(compiling source file '../../../../src/Command/Commands/Game_info/Create_game/Create_game.cpp')
C:\Users\Hugo\Documents\GitHub\B-CPP-500-MLH-5-1-rtype-hugo.bardet\build\windows\vcpkg_installed\x64-windows\include\raylib.h(
955,12): error C2733: 'CloseWindow': you cannot overload a function with 'extern "C"' linkage [C:\Users\Hugo\Documents\GitHub\
B-CPP-500-MLH-5-1-rtype-hugo.bardet\build\windows\src\Command\r-type-cmd.vcxproj]
(compiling source file '../../../../src/Command/Commands/Game_info/Create_game/Create_game.cpp')
C:\Program Files (x86)\Windows Kits\10\Include\10.0.22621.0\um\winuser.h(4710,1):
see declaration of 'CloseWindow'
C:\Users\Hugo\Documents\GitHub\B-CPP-500-MLH-5-1-rtype-hugo.bardet\build\windows\vcpkg_installed\x64-windows\include\raylib.h(
1004,12): error C2733: 'ShowCursor': you cannot overload a function with 'extern "C"' linkage [C:\Users\Hugo\Documents\GitHub\
B-CPP-500-MLH-5-1-rtype-hugo.bardet\build\windows\src\Command\r-type-cmd.vcxproj]
(compiling source file '../../../../src/Command/Commands/Game_info/Create_game/Create_game.cpp')
C:\Program Files (x86)\Windows Kits\10\Include\10.0.22621.0\um\winuser.h(9328,1):
see declaration of 'ShowCursor'
C:\Users\Hugo\Documents\GitHub\B-CPP-500-MLH-5-1-rtype-hugo.bardet\build\windows\vcpkg_installed\x64-windows\include\raylib.h(
1218,48): error C2061: syntax error: identifier 'Rectangle' [C:\Users\Hugo\Documents\GitHub\B-CPP-500-MLH-5-1-rtype-hugo.barde
t\build\windows\src\Command\r-type-cmd.vcxproj]
(compiling source file '../../../../src/Command/Commands/Game_info/Create_game/Create_game.cpp')
C:\Users\Hugo\Documents\GitHub\B-CPP-500-MLH-5-1-rtype-hugo.bardet\build\windows\vcpkg_installed\x64-windows\include\raylib.h(
1241,12): error C2182: 'DrawRectangleRec': this use of 'void' is not valid [C:\Users\Hugo\Documents\GitHub\B-CPP-500-MLH-5-1-r
type-hugo.bardet\build\windows\src\Command\r-type-cmd.vcxproj]
(compiling source file '../../../../src/Command/Commands/Game_info/Create_game/Create_game.cpp')
C:\Users\Hugo\Documents\GitHub\B-CPP-500-MLH-5-1-rtype-hugo.bardet\build\windows\vcpkg_installed\x64-windows\include\raylib.h(
1241,12): error C2491: 'DrawRectangleRec': definition of dllimport data not allowed [C:\Users\Hugo\Documents\GitHub\B-CPP-500-
MLH-5-1-rtype-hugo.bardet\build\windows\src\Command\r-type-cmd.vcxproj]
(compiling source file '../../../../src/Command/Commands/Game_info/Create_game/Create_game.cpp')
C:\Users\Hugo\Documents\GitHub\B-CPP-500-MLH-5-1-rtype-hugo.bardet\build\windows\vcpkg_installed\x64-windows\include\raylib.h(
1241,39): error C2146: syntax error: missing ')' before identifier 'rec' [C:\Users\Hugo\Documents\GitHub\B-CPP-500-MLH-5-1-rty
pe-hugo.bardet\build\windows\src\Command\r-type-cmd.vcxproj]
(compiling source file '../../../../src/Command/Commands/Game_info/Create_game/Create_game.cpp')
C:\Users\Hugo\Documents\GitHub\B-CPP-500-MLH-5-1-rtype-hugo.bardet\build\windows\vcpkg_installed\x64-windows\include\raylib.h(
1242,12): error C2182: 'DrawRectanglePro': this use of 'void' is not valid [C:\Users\Hugo\Documents\GitHub\B-CPP-500-MLH-5-1-r
type-hugo.bardet\build\windows\src\Command\r-type-cmd.vcxproj]
(compiling source file '../../../../src/Command/Commands/Game_info/Create_game/Create_game.cpp')
C:\Users\Hugo\Documents\GitHub\B-CPP-500-MLH-5-1-rtype-hugo.bardet\build\windows\vcpkg_installed\x64-windows\include\raylib.h(
1242,12): error C2491: 'DrawRectanglePro': definition of dllimport data not allowed [C:\Users\Hugo\Documents\GitHub\B-CPP-500-
MLH-5-1-rtype-hugo.bardet\build\windows\src\Command\r-type-cmd.vcxproj]
(compiling source file '../../../../src/Command/Commands/Game_info/Create_game/Create_game.cpp')
C:\Users\Hugo\Documents\GitHub\B-CPP-500-MLH-5-1-rtype-hugo.bardet\build\windows\vcpkg_installed\x64-windows\include\raylib.h(
1242,39): error C2146: syntax error: missing ')' before identifier 'rec' [C:\Users\Hugo\Documents\GitHub\B-CPP-500-MLH-5-1-rty
pe-hugo.bardet\build\windows\src\Command\r-type-cmd.vcxproj]
(compiling source file '../../../../src/Command/Commands/Game_info/Create_game/Create_game.cpp')
C:\Users\Hugo\Documents\GitHub\B-CPP-500-MLH-5-1-rtype-hugo.bardet\build\windows\vcpkg_installed\x64-windows\include\raylib.h(
1245,12): error C2182: 'DrawRectangleGradientEx': this use of 'void' is not valid [C:\Users\Hugo\Documents\GitHub\B-CPP-500-ML
H-5-1-rtype-hugo.bardet\build\windows\src\Command\r-type-cmd.vcxproj]
(compiling source file '../../../../src/Command/Commands/Game_info/Create_game/Create_game.cpp')
C:\Users\Hugo\Documents\GitHub\B-CPP-500-MLH-5-1-rtype-hugo.bardet\build\windows\vcpkg_installed\x64-windows\include\raylib.h(
1245,12): error C2491: 'DrawRectangleGradientEx': definition of dllimport data not allowed [C:\Users\Hugo\Documents\GitHub\B-C
PP-500-MLH-5-1-rtype-hugo.bardet\build\windows\src\Command\r-type-cmd.vcxproj]
(compiling source file '../../../../src/Command/Commands/Game_info/Create_game/Create_game.cpp')
C:\Users\Hugo\Documents\GitHub\B-CPP-500-MLH-5-1-rtype-hugo.bardet\build\windows\vcpkg_installed\x64-windows\include\raylib.h(
1245,46): error C2146: syntax error: missing ')' before identifier 'rec' [C:\Users\Hugo\Documents\GitHub\B-CPP-500-MLH-5-1-rty
pe-hugo.bardet\build\windows\src\Command\r-type-cmd.vcxproj]
(compiling source file '../../../../src/Command/Commands/Game_info/Create_game/Create_game.cpp')
C:\Users\Hugo\Documents\GitHub\B-CPP-500-MLH-5-1-rtype-hugo.bardet\build\windows\vcpkg_installed\x64-windows\include\raylib.h(
1247,12): error C2182: 'DrawRectangleLinesEx': this use of 'void' is not valid [C:\Users\Hugo\Documents\GitHub\B-CPP-500-MLH-5
-1-rtype-hugo.bardet\build\windows\src\Command\r-type-cmd.vcxproj]
(compiling source file '../../../../src/Command/Commands/Game_info/Create_game/Create_game.cpp')
C:\Users\Hugo\Documents\GitHub\B-CPP-500-MLH-5-1-rtype-hugo.bardet\build\windows\vcpkg_installed\x64-windows\include\raylib.h(
1247,12): error C2491: 'DrawRectangleLinesEx': definition of dllimport data not allowed [C:\Users\Hugo\Documents\GitHub\B-CPP-
500-MLH-5-1-rtype-hugo.bardet\build\windows\src\Command\r-type-cmd.vcxproj]
(compiling source file '../../../../src/Command/Commands/Game_info/Create_game/Create_game.cpp')
C:\Users\Hugo\Documents\GitHub\B-CPP-500-MLH-5-1-rtype-hugo.bardet\build\windows\vcpkg_installed\x64-windows\include\raylib.h(
1247,43): error C2146: syntax error: missing ')' before identifier 'rec' [C:\Users\Hugo\Documents\GitHub\B-CPP-500-MLH-5-1-rty
pe-hugo.bardet\build\windows\src\Command\r-type-cmd.vcxproj]
(compiling source file '../../../../src/Command/Commands/Game_info/Create_game/Create_game.cpp')
C:\Users\Hugo\Documents\GitHub\B-CPP-500-MLH-5-1-rtype-hugo.bardet\build\windows\vcpkg_installed\x64-windows\include\raylib.h(
1248,12): error C2182: 'DrawRectangleRounded': this use of 'void' is not valid [C:\Users\Hugo\Documents\GitHub\B-CPP-500-MLH-5
-1-rtype-hugo.bardet\build\windows\src\Command\r-type-cmd.vcxproj]
(compiling source file '../../../../src/Command/Commands/Game_info/Create_game/Create_game.cpp')
C:\Users\Hugo\Documents\GitHub\B-CPP-500-MLH-5-1-rtype-hugo.bardet\build\windows\vcpkg_installed\x64-windows\include\raylib.h(
1248,12): error C2491: 'DrawRectangleRounded': definition of dllimport data not allowed [C:\Users\Hugo\Documents\GitHub\B-CPP-
500-MLH-5-1-rtype-hugo.bardet\build\windows\src\Command\r-type-cmd.vcxproj]
(compiling source file '../../../../src/Command/Commands/Game_info/Create_game/Create_game.cpp')
C:\Users\Hugo\Documents\GitHub\B-CPP-500-MLH-5-1-rtype-hugo.bardet\build\windows\vcpkg_installed\x64-windows\include\raylib.h(
1248,43): error C2146: syntax error: missing ')' before identifier 'rec' [C:\Users\Hugo\Documents\GitHub\B-CPP-500-MLH-5-1-rty
pe-hugo.bardet\build\windows\src\Command\r-type-cmd.vcxproj]
(compiling source file '../../../../src/Command/Commands/Game_info/Create_game/Create_game.cpp')
C:\Users\Hugo\Documents\GitHub\B-CPP-500-MLH-5-1-rtype-hugo.bardet\build\windows\vcpkg_installed\x64-windows\include\raylib.h(
1249,12): error C2182: 'DrawRectangleRoundedLines': this use of 'void' is not valid [C:\Users\Hugo\Documents\GitHub\B-CPP-500-
MLH-5-1-rtype-hugo.bardet\build\windows\src\Command\r-type-cmd.vcxproj]
(compiling source file '../../../../src/Command/Commands/Game_info/Create_game/Create_game.cpp')
C:\Users\Hugo\Documents\GitHub\B-CPP-500-MLH-5-1-rtype-hugo.bardet\build\windows\vcpkg_installed\x64-windows\include\raylib.h(
1249,12): error C2491: 'DrawRectangleRoundedLines': definition of dllimport data not allowed [C:\Users\Hugo\Documents\GitHub\B
-CPP-500-MLH-5-1-rtype-hugo.bardet\build\windows\src\Command\r-type-cmd.vcxproj]
(compiling source file '../../../../src/Command/Commands/Game_info/Create_game/Create_game.cpp')
C:\Users\Hugo\Documents\GitHub\B-CPP-500-MLH-5-1-rtype-hugo.bardet\build\windows\vcpkg_installed\x64-windows\include\raylib.h(
1249,48): error C2146: syntax error: missing ')' before identifier 'rec' [C:\Users\Hugo\Documents\GitHub\B-CPP-500-MLH-5-1-rty
pe-hugo.bardet\build\windows\src\Command\r-type-cmd.vcxproj]
(compiling source file '../../../../src/Command/Commands/Game_info/Create_game/Create_game.cpp')
C:\Users\Hugo\Documents\GitHub\B-CPP-500-MLH-5-1-rtype-hugo.bardet\build\windows\vcpkg_installed\x64-windows\include\raylib.h(
1278,12): error C2491: 'CheckCollisionRecs': definition of dllimport data not allowed [C:\Users\Hugo\Documents\GitHub\B-CPP-50
0-MLH-5-1-rtype-hugo.bardet\build\windows\src\Command\r-type-cmd.vcxproj]
(compiling source file '../../../../src/Command/Commands/Game_info/Create_game/Create_game.cpp')
C:\Users\Hugo\Documents\GitHub\B-CPP-500-MLH-5-1-rtype-hugo.bardet\build\windows\vcpkg_installed\x64-windows\include\raylib.h(
1278,41): error C2146: syntax error: missing ')' before identifier 'rec1' [C:\Users\Hugo\Documents\GitHub\B-CPP-500-MLH-5-1-rt
ype-hugo.bardet\build\windows\src\Command\r-type-cmd.vcxproj]
(compiling source file '../../../../src/Command/Commands/Game_info/Create_game/Create_game.cpp')
C:\Users\Hugo\Documents\GitHub\B-CPP-500-MLH-5-1-rtype-hugo.bardet\build\windows\vcpkg_installed\x64-windows\include\raylib.h(
1280,66): error C2061: syntax error: identifier 'Rectangle' [C:\Users\Hugo\Documents\GitHub\B-CPP-500-MLH-5-1-rtype-hugo.barde
t\build\windows\src\Command\r-type-cmd.vcxproj]
(compiling source file '../../../../src/Command/Commands/Game_info/Create_game/Create_game.cpp')
C:\Users\Hugo\Documents\GitHub\B-CPP-500-MLH-5-1-rtype-hugo.bardet\build\windows\vcpkg_installed\x64-windows\include\raylib.h(
1281,50): error C2061: syntax error: identifier 'Rectangle' [C:\Users\Hugo\Documents\GitHub\B-CPP-500-MLH-5-1-rtype-hugo.barde
t\build\windows\src\Command\r-type-cmd.vcxproj]
(compiling source file '../../../../src/Command/Commands/Game_info/Create_game/Create_game.cpp')
C:\Users\Hugo\Documents\GitHub\B-CPP-500-MLH-5-1-rtype-hugo.bardet\build\windows\vcpkg_installed\x64-windows\include\raylib.h(
1287,7): error C2365: 'Rectangle': redefinition; previous definition was 'function' [C:\Users\Hugo\Documents\GitHub\B-CPP-500-
MLH-5-1-rtype-hugo.bardet\build\windows\src\Command\r-type-cmd.vcxproj]
(compiling source file '../../../../src/Command/Commands/Game_info/Create_game/Create_game.cpp')
C:\Program Files (x86)\Windows Kits\10\Include\10.0.22621.0\um\wingdi.h(4561,24):
see declaration of 'Rectangle'
C:\Users\Hugo\Documents\GitHub\B-CPP-500-MLH-5-1-rtype-hugo.bardet\build\windows\vcpkg_installed\x64-windows\include\raylib.h(
1287,17): error C2146: syntax error: missing ';' before identifier 'GetCollisionRec' [C:\Users\Hugo\Documents\GitHub\B-CPP-500
-MLH-5-1-rtype-hugo.bardet\build\windows\src\Command\r-type-cmd.vcxproj]
(compiling source file '../../../../src/Command/Commands/Game_info/Create_game/Create_game.cpp')
C:\Users\Hugo\Documents\GitHub\B-CPP-500-MLH-5-1-rtype-hugo.bardet\build\windows\vcpkg_installed\x64-windows\include\raylib.h(
1287,43): error C2146: syntax error: missing ')' before identifier 'rec1' [C:\Users\Hugo\Documents\GitHub\B-CPP-500-MLH-5-1-rt
ype-hugo.bardet\build\windows\src\Command\r-type-cmd.vcxproj]
(compiling source file '../../../../src/Command/Commands/Game_info/Create_game/Create_game.cpp')
C:\Users\Hugo\Documents\GitHub\B-CPP-500-MLH-5-1-rtype-hugo.bardet\build\windows\vcpkg_installed\x64-windows\include\raylib.h(
1295,13): error C2733: 'LoadImageA': you cannot overload a function with 'extern "C"' linkage [C:\Users\Hugo\Documents\GitHub\
B-CPP-500-MLH-5-1-rtype-hugo.bardet\build\windows\src\Command\r-type-cmd.vcxproj]
(compiling source file '../../../../src/Command/Commands/Game_info/Create_game/Create_game.cpp')
C:\Program Files (x86)\Windows Kits\10\Include\10.0.22621.0\um\winuser.h(10848,1):
see declaration of 'LoadImageA'
it's an extract from the error, I have many more.
If you need more things tell me and I will give you.
- Dominant language
- C++
- Stars
- 960
- Forks
- 120
- Avg merge
- 10m
- Merged PRs (30d)
- 1
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from RobLoach/raylib-cpp
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
RobLoach/raylib-cpp#425 ·
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
RobLoach/raylib-cpp#427 ·
-
Code gen Open
Difficulty 5/5 Over a week Newbie friendliness 30/100
RobLoach/raylib-cpp#415 · 1 comment ·
-
Difficulty 3/5 1-2 days Newbie friendliness 45/100
RobLoach/raylib-cpp#370 · 1 comment ·
-
SDF Font Support Open
Difficulty 3/5 1-2 days Newbie friendliness 55/100
RobLoach/raylib-cpp#366 · 3 comments ·
All issues in RobLoach/raylib-cpp
Similar issues
-
ai_reviewed
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
ydb-platform/ydb#53869 · 3 comments ·
-
bug cert blocker needs triage
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
project-chip/connectedhomeip#74373 ·
-
upstream update
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
conan-io/conan-center-index#31035 ·
-
Bug
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
documentation
Difficulty 1/5 Under an hour Newbie friendliness 85/100
vllm-project/vllm-ascend#17329 ·