C ++ second day beginner.
I wanted to run the sample program below and started touching C ++.
https://github.com/tokoik/fisheye
Thanks for your patience, but I hope you can forgive me even if this is a rudimentary question because I don't have enough understanding of C ++ basics and projects/libraries.
Environment
Windows10 Pro
VS Code
After installing MinGW and confirming that "gcc -v" passes,
The above sample code is clone, and c_cpp_properties.json is described as follows
{
"configurations": [
{
"name": "Win32",
"includePath": [
"${workspaceFolder}/**",
"C: /MinGW/lib/gcc/x86_64-w64-mingw32/7.1.0/include/c ++/x86_64-w64-mingw32",
"C: /MinGW/lib/gcc/x86_64-w64-mingw32/7.1.0/include/c ++/backward",
"C: /MinGW/lib/gcc/x86_64-w64-mingw32/7.1.0/include",
"C: /MinGW/lib/gcc/x86_64-w64-mingw32/7.1.0/include-fixed",
"C: /MinGW/lib/gcc/x86_64-w64-mingw32/7.1.0 /../../../../ x86_64-w64-mingw32/include",
"C: /MinGW/lib/gcc/x86_64-w64-mingw32/7.1.0/include/c++",
"C: /MinGW/lib/gcc/x86_64-w64-mingw32/7.1.0/include/c ++/tr1",
"C:/programs/fisheye-master/fisheye-master/libs/include"
],
"defines": [
"_DEBUG",
"UNICODE",
"_UNICODE"
],
"windowsSdkVersion": "10.0.18362.0",
"compilerPath": "C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/14.23.28105/bin/Hostx64/x64/cl.exe",
"cStandard": "c11",
"cppStandard": "c ++ 17",
"intelliSenseMode": "msvc-x64"
}
],
"version": 4
}
When "gcc fisheye.cpp" was executed, an error occurred.
PS C: \ programs \ fisheye-master \ fisheye-master>gcc. \ fisheye \ fisheye.cpp
In file included from. \ Fisheye \ GgApplication.h: 29,
from. \ fisheye \ fisheye.cpp: 2:
. \ fisheye \ gg.h: 32: 10: fatal error: GLFW/glfw3.h: No such file or directory
#include<GLFW/glfw3.h>
^ ~~~~~~~~~~~~~
compilation terminated.
Since "glfw3.h" exists under "C:/programs/fisheye-master/fisheye-master/libs/include/GLFW", we are struggling without knowing the reason.
-Install GLFW (recompiled) to another path and add that path to include path.
・ Rebuilding environment, re-clone sample program
→ Neither of them changed to an error.
Although it is not supplemental information, "Hello World!" can be output to the console.
I think that there is no mistake in the most basic environment construction itself.
Thanks for your cooperation.
-
Answer # 1
Related articles
- c ++ - i get fatal error: bits/error_constantsh: no such file or directory when compiling with arduino ide
- c ++ - c language: please tell me how to deal with the error message "bus error"!
- c ++ - acl beginner contest c question "connect cities" my answer becomes wa in some test cases
- c ++ - if the file cannot be found, an error will occur
- c ++ - i get a syntax error
- i am a beginner in ea creation and am making mql4, but i get an error, so i want to fix the error
- php fatal error "cannot redeclare" error statement
- i can't log in with a wordpress fatal error
- php fatal error: call to a member function fetchrow () does not show site
- c ++ - i get an error when i try to compile opencv
- c ++ - error in loaddivgraph function
- i can't compile gcc with a fatal error
- c ++ - error: expected unqualified-id before ‘this’
- i get an error with c ++ opencv
- c ++ - i want to know how to fix the error that liexe does not exist in mingw when trying to build the ffmpeg library
- c ++: error in search&display program in data file
- php fatal error: uncaught error: call to undefined function each () in/usr/share/pear/console/getop
- c ++ - forward declaration compilation error for c structs
- c ++ - atcoder beginner contest 095 half and half
- c ++ - could you please tell me how to resolve the error when using "wiring pih" and "bcm2835h" of raspberry
c_cpp_properties.json
is an editor setting and not a compiler setting.And the C ++ compiler command name is
g ++
instead ofgcc
.-I
is used as an option to specify the include path ofg ++
.Try this.