archit120 / archit120/3D-Graph
Compiling errors when using make
- Dominant language
- C++
- Stars
- 5
- Forks
- 11
- PR merge metrics
- No merged PRs in 30d
Description
Hi dear experts
I'm building 3D-Graph these days and following the steps here:
$mkdir build
$cd build
$cmake ..
$make
but the errors occurred here:
```
pwang@pwang-OptiPlex-7060:~/tools/VR/27/3D-Graph/build$ ls
CMakeCache.txt CMakeFiles cmake_install.cmake Makefile
pwang@pwang-OptiPlex-7060:~/tools/VR/27/3D-Graph/build$ make
Scanning dependencies of target vec2
[ 8%] Building CXX object CMakeFiles/vec2.dir/3D_Graph/Vector2D.cpp.o
[ 16%] Linking CXX static library libvec2.a
[ 16%] Built target vec2
Scanning dependencies of target vec3
[ 25%] Building CXX object CMakeFiles/vec3.dir/3D_Graph/Vector3D.cpp.o
[ 33%] Linking CXX static library libvec3.a
[ 33%] Built target vec3
Scanning dependencies of target camera
[ 41%] Building CXX object CMakeFiles/camera.dir/3D_Graph/Camera.cpp.o
[ 50%] Linking CXX static library libcamera.a
[ 50%] Built target camera
Scanning dependencies of target conloop
[ 58%] Building CXX object CMakeFiles/conloop.dir/3D_Graph/ControlLoop.cpp.o
/home/pwang/tools/VR/27/3D-Graph/3D Graph/ControlLoop.cpp:1:17: warning: extra tokens at end of #ifdef directive
#ifdef __APPLE__||__linux__
^~
/home/pwang/tools/VR/27/3D-Graph/3D Graph/ControlLoop.cpp: In static member function ‘static void ControlLoop::loop(Camera&, double&)’:
/home/pwang/tools/VR/27/3D-Graph/3D Graph/ControlLoop.cpp:72:2: error: ‘POINT’ was not declared in this scope
POINT p;
^~~~~
/home/pwang/tools/VR/27/3D-Graph/3D Graph/ControlLoop.cpp:73:16: error: ‘p’ was not declared in this scope
GetCursorPos(&p);
^
/home/pwang/tools/VR/27/3D-Graph/3D Graph/ControlLoop.cpp:73:2: error: ‘GetCursorPos’ was not declared in this scope
GetCursorPos(&p);
^~~~~~~~~~~~
/home/pwang/tools/VR/27/3D-Graph/3D Graph/ControlLoop.cpp:73:2: note: suggested alternative: ‘SetCursorPos’
GetCursorPos(&p);
^~~~~~~~~~~~
SetCursorPos
/home/pwang/tools/VR/27/3D-Graph/3D Graph/ControlLoop.cpp: In static member function ‘static void ControlLoop::UserInput(Camera&)’:
/home/pwang/tools/VR/27/3D-Graph/3D Graph/ControlLoop.cpp:91:6: error: ‘_kbhit’ was not declared in this scope
if (_kbhit())
^~~~~~
/home/pwang/tools/VR/27/3D-Graph/3D Graph/ControlLoop.cpp:91:6: note: suggested alternative: ‘_Exit’
if (_kbhit())
^~~~~~
_Exit
/home/pwang/tools/VR/27/3D-Graph/3D Graph/ControlLoop.cpp:94:7: error: ‘_getch’ was not declared in this scope
c = _getch();
^~~~~~
/home/pwang/tools/VR/27/3D-Graph/3D Graph/ControlLoop.cpp:94:7: note: suggested alternative: ‘getc’
c = _getch();
^~~~~~
getc
CMakeFiles/conloop.dir/build.make:62: recipe for target 'CMakeFiles/conloop.dir/3D_Graph/ControlLoop.cpp.o' failed
make[2]: *** [CMakeFiles/conloop.dir/3D_Graph/ControlLoop.cpp.o] Error 1
CMakeFiles/Makefile2:106: recipe for target 'CMakeFiles/conloop.dir/all' failed
make[1]: *** [CMakeFiles/conloop.dir/all] Error 2
Makefile:83: recipe for target 'all' failed
make: *** [all] Error 2
```
thank you
Best Regards
William
Contributor guide
No contributing guide indexed for this repository
Research direction
Start with 3D_Graph/ControlLoop.cpp, especially the platform guard at line 1 and the failing input calls around lines 72-94. Re-run the documented cmake and make commands after investigating the reported Linux compiler errors; done means the project builds successfully without these errors.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cmake, cpp
- Domain
- build-system
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100