Issues while compiling with windows
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 3/5
- Tiempo estimado
- 1-2 días
- Aptitud para principiantes
- 30/100
- Tipo de issue
- Error
- Claridad
- Necesita aclaración
- Estado de actividad
- Estancado
- Stack tecnológico
- cmake, cpp
Línea de trabajo
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.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
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.
- Lenguaje dominante
- C++
- Estrellas
- 960
- Forks
- 120
- Merge medio
- 10 min
- PR fusionados (30 d)
- 1
Guía de contribución
No hay ninguna guía de contribución indexada para este repositorio
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de RobLoach/raylib-cpp
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 74/100
RobLoach/raylib-cpp#425 ·
-
Dificultad 4/5 3-5 días Aptitud para principiantes 35/100
RobLoach/raylib-cpp#427 ·
-
Code gen Abierto
Dificultad 5/5 Más de una semana Aptitud para principiantes 30/100
RobLoach/raylib-cpp#415 · 1 comentario ·
-
Dificultad 3/5 1-2 días Aptitud para principiantes 45/100
RobLoach/raylib-cpp#370 · 1 comentario ·
-
SDF Font Support Abierto
Dificultad 3/5 1-2 días Aptitud para principiantes 55/100
RobLoach/raylib-cpp#366 · 3 comentarios ·
Todos los issues de RobLoach/raylib-cpp
Issues similares
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 70/100
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 65/100
duckdb/duckdb-wasm#2258 ·
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
objectionary/eo-graphs#75 ·
-
Coarray integration tests carry no LABELS, so run_tests.py silently skips them under every backend Abiertocoarray
Dificultad 2/5 1-3 horas Aptitud para principiantes 70/100
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
FISCO-BCOS/FISCO-BCOS#5642 ·