You have no idea how much this tutorial helped me. I was struggling to find a good tutorial for this EXACT thing and you did it perfectly and clearly.
@idkwhatIshouldsayhere Жыл бұрын
Indian Programming Legend comes to save the day again...
@sungjuyea46272 жыл бұрын
As a person who uses VSCode on MacOs, this works perfectly! Thanks!!!
@namanagrawal770318 күн бұрын
Thanks man, this really helped, was stuck for 2 hours, trying to figure it out for my MBP M2 Pro
@dawidklyta25158 ай бұрын
I have done everything as you said, and it built but did't want to run app. I found out that i needed to add one more line in the task.json inside args "-Wl,-rpath,@executable_path/lib" and now it works perfectly. Thanks very much.
@aninosspro11 ай бұрын
thanks for the video. you fix in a 4 min what I was stuck in for the past 3 to 5 hours, keep the grease work
@nunzioturtulici9636 Жыл бұрын
I wanna say thank you! I would gone crazy trying to set up all without your video...thanks for sharing!
@somabencsik Жыл бұрын
Thank you so much, I was looking for a tutorial for like hours until I finally saw your video, and it is working, thanks once again!
@aaaakko13911 ай бұрын
Best one! Really help me figure out how to build OpenGL with vscode
@maxrathbone-boschis547 Жыл бұрын
This is what I have been looking for ages, THANK!!
@mr.mclovin84152 жыл бұрын
You made the process so easy . Brilliant tutorial .
@fullViewJay Жыл бұрын
Great simple and easy tutorial. Thank you! You can also change the file type to be glad.cpp as well to avoid adding the extra path to the args list
@vante688611 ай бұрын
Worked perfectly in mac M1, thank you!
@sanjaygupta231Ай бұрын
Thanks so much, I finally understand what's going on with the JSON files 😂
@aomadeira Жыл бұрын
Simple and straight to the point, thanks!
@WyattJebef-r9t8 күн бұрын
Actual GOAT, ty ty ty
@lolaueda82062 жыл бұрын
It is so clear! Thank you so much! I was waiting for it the whole year. Would you be teaching how to use VSC set up for 3D with shaders, where we add more separate files?? You made my day!
@torcat2 жыл бұрын
The instructions were PERFECTLY. Thank you so much buddy!
@РусланКононов-ч9я Жыл бұрын
Большое спасибо, добрый человек
@sauravregmi28722 жыл бұрын
Great instructions - easy to follow. Highly recommended!!!
@prashantshrestha55642 жыл бұрын
you made the entire process too easy. thanks buddy now i can bang my head in the wall
@viggenzz8 ай бұрын
thanks a lot. you are doing god's work. exactly what I needed.
@stamponfloormagic2 жыл бұрын
hi, I am having trouble getting the file to run using the first code, the error message I keep getting is: ~/main.cpp:1:10: fatal error: 'GLFW/glfw3.h' file not found #include ^~~~~~~~~~~~~~ 1 error generated. Build finished with error(s). any recommendations for how to solve? Thanks :)
@rosxnb2 жыл бұрын
Maybe you entered the include path wrong. If you still have problem let me know
@iamadityavaishy Жыл бұрын
@@rosxnb I have the same problem. Help please
@raghavav90973 ай бұрын
{ "version": "2.0.0", "tasks": [ { "type": "cppbuild", "label": "C/C++: clang build active file", "command": "/usr/bin/clang", "args": [ "-std=c++17", "-fcolor-diagnostics", "-fansi-escape-codes", "-Wall", "-g", "-I/opt/homebrew/opt/glfw/include", // Updated include path "-L/opt/homebrew/opt/glfw/lib", // Updated library path "-lglfw", // Link GLFW library "-lc++", // Link with the C++ standard library "${workspaceFolder}/*.cpp", // Source files "-o", "${workspaceFolder}/app", // Output executable "-framework", "OpenGL", "-framework", "Cocoa", "-framework", "IOKit", "-framework", "CoreVideo", "-framework", "CoreFoundation", "-Wno-deprecated" ], "options": { "cwd": "${fileDirname}" }, "problemMatcher": [ "$gcc" ], "group": { "kind": "build", "isDefault": true }, "detail": "compiler: /usr/bin/clang" } ] } use this it will work
@cornsalad142 ай бұрын
@@raghavav9097 where to use it, like in terminal or in any particular file?
@SCDCutlerАй бұрын
@@cornsalad14 tasks.json
@popcultureprogrammer21712 жыл бұрын
@rosxnb THANK YOU SO MUCH! I've been banging my head against the wall trying to figure this all out for WEEKS, since I dont have admin privileges on my school Macbook so I cant install libraries at root. I circumvented it by simply just having Homebrew on the desktop, and other than that, followed your tutorial exactly. I dont usually 'like' videos ( because I'm lazy & usually dont love the content on YT, but you earned it!. Thank you!
@ReggaeUnicorn Жыл бұрын
Nice job mate, much better than the official docs and much clearer.
@gurinderkaur68178 ай бұрын
fatal error: 'glad/glad.h' file not found #include ^~~~~~~~~~~~~ 1 error generated. i go this error please help
@raghavav90973 ай бұрын
{ "version": "2.0.0", "tasks": [ { "type": "cppbuild", "label": "C/C++: clang build active file", "command": "/usr/bin/clang", "args": [ "-std=c++17", "-fcolor-diagnostics", "-fansi-escape-codes", "-Wall", "-g", "-I/opt/homebrew/opt/glfw/include", // Updated include path "-L/opt/homebrew/opt/glfw/lib", // Updated library path "-lglfw", // Link GLFW library "-lc++", // Link with the C++ standard library "${workspaceFolder}/*.cpp", // Source files "-o", "${workspaceFolder}/app", // Output executable "-framework", "OpenGL", "-framework", "Cocoa", "-framework", "IOKit", "-framework", "CoreVideo", "-framework", "CoreFoundation", "-Wno-deprecated" ], "options": { "cwd": "${fileDirname}" }, "problemMatcher": [ "$gcc" ], "group": { "kind": "build", "isDefault": true }, "detail": "compiler: /usr/bin/clang" } ] } use this it will work
@nikoniko5570 Жыл бұрын
Holy shit, man I LOVE YOU
@mrunalkadhane5883 Жыл бұрын
Hi I am getting this error dyld[74341]: Library not loaded: @rpath/libglfw.3.dylib after running ./app in the terminal. Can you please help with this
@ritikanankar7207 Жыл бұрын
did you solve the issue? am getting the same one
@johnyeap71336 ай бұрын
same
@luckysun1852 Жыл бұрын
amazing videos, you saved my life.
@pierre-loicpennaneach Жыл бұрын
after continuing on with the tutorial i still have an issue where it fails tp build successfully saying that there isn't a glad header folder to find/use when there clearly is one
@AndreaDiaz-zy3jdАй бұрын
I have a problem building the app, It says "building for macOS-x86_64 but attempting to link with file built for macOS-arm64" and I see the solution is to add the "-DCMAKE_APPLE_SILICON_PROCESSOR=arm64" I add after the version of C++ on the build file, but It doesn't work
@donnychan1999 Жыл бұрын
You are a savior sir
@d1legends1572 жыл бұрын
For the first sample code, my build starts but never seems to finish... what can I do?
@12Vencedor2 жыл бұрын
xcode wouldnt work. i tried everything 3 hours. this at first didnt worked too until i double checked that i copied wrong folder. now it works!!! thank you very much!!
@mona-wy4yn2 жыл бұрын
thank you so much for this u are a life savior!
@ishiniavindya1032 жыл бұрын
Great tutorial thank you. Worked so well with my Macbook M1
@minanaji9597 Жыл бұрын
Works on M1 macbook! Thanks!
@ВладимирКуцев-б3п2 жыл бұрын
thank you so much, this was incredibly helpful :)
@朱禾兴2 жыл бұрын
Thx. Great video! Although I got this "code in description" after typing and following the video for ten minutes😅
@adamspiano Жыл бұрын
Thanks so much for this!!
@mira26422 ай бұрын
i couldn't find the glfw file in my mac
@brunocastro785811 ай бұрын
nice number of subs, my guy
@ankansaha3260 Жыл бұрын
I had followed all the steps.. but there showed me this error......."'GLFW/glfw3.h' file not found". this file is on the right place, but probably the compiler can't detect it.. what would I do to solve this..??
@Aaans-bd8ep Жыл бұрын
have you figured out how to solve this error? I have the same
@ankansaha3260 Жыл бұрын
@@Aaans-bd8ep Yes, I did.
@ryanliu866510 ай бұрын
how? lol @@ankansaha3260
@raghavav90973 ай бұрын
{ "version": "2.0.0", "tasks": [ { "type": "cppbuild", "label": "C/C++: clang build active file", "command": "/usr/bin/clang", "args": [ "-std=c++17", "-fcolor-diagnostics", "-fansi-escape-codes", "-Wall", "-g", "-I/opt/homebrew/opt/glfw/include", // Updated include path "-L/opt/homebrew/opt/glfw/lib", // Updated library path "-lglfw", // Link GLFW library "-lc++", // Link with the C++ standard library "${workspaceFolder}/*.cpp", // Source files "-o", "${workspaceFolder}/app", // Output executable "-framework", "OpenGL", "-framework", "Cocoa", "-framework", "IOKit", "-framework", "CoreVideo", "-framework", "CoreFoundation", "-Wno-deprecated" ], "options": { "cwd": "${fileDirname}" }, "problemMatcher": [ "$gcc" ], "group": { "kind": "build", "isDefault": true }, "detail": "compiler: /usr/bin/clang" } ] } use this it will work
@chhavi01910 ай бұрын
hi can you also explain how to add GLUT too?
@octaviotastico2 жыл бұрын
Thanks man! Very appreciated!
@rylee5233 Жыл бұрын
Thank you !Thats is really helpful and clear
@syi14 Жыл бұрын
why i do not have the c/c++ compiler?
@DevelopedEgg9 ай бұрын
Helped a lot thanks
@Sony_MiniDisc Жыл бұрын
I love indian programming tutorials
@pierre-loicpennaneach Жыл бұрын
anyone else have the issue of not being able to open the source code for the header file?
@gamerxl369 Жыл бұрын
I'm experiencing the same problem. Works fine initially but once i try to set up glad and test the new code to build it i get errors. Well i was gonna complain more, but it after moving the file out of the folder and then putting it back in for some reason it miraculously worked... Not sure what i did. Like i am still geting error glad/glad.h file not found but it bypassed it and i got it to print the triangle
@ilt_RIAD65 Жыл бұрын
i need help. my error is: error: invalid argument '-std=c++17' not allowed with 'C'. how do i right now
@abdullaannoman3322 жыл бұрын
clang: error: linker command failed with exit code 1 (use -v to see invocation) Build finished with error(s).
@aunesto17 Жыл бұрын
Hello. Thanks for this guide, I'm about to start a course that needs OpenGL and I only have a mac laptop so this is great. While trying to run Sample code 1 I get this error: Undefined symbols for architecture x86_64: "_main", referenced from: implicit entry/start for main executable ld: symbol(s) not found for architecture x86_64 clang: error: linker command failed with exit code 1 (use -v to see invocation) Could you please help me.
@danniel902 жыл бұрын
This was very helpful. Thanks!
@wilchardruin Жыл бұрын
it's a great begin , thanks
@pierre-loicpennaneach Жыл бұрын
i've followed your steps correctly up until the build but it gives me "clang: error: no such file or directory: '/Users/monsieurpipes/local_Uni_Files/2nd Year/comp2006/cw2/*.cpp' clang: error: no such file or directory: '/Users/monsieurpipes/local_Uni_Files/2nd Year/comp2006/cw2/glad.c'" any ideas why??
@sandeep.p7 Жыл бұрын
How to run the code after "build run sucessfully"
@rosxnb Жыл бұрын
you could just type "./app" in the terminal. Make sure you are in the right directory and you can see the "app" file. we name the executable as "app" with following command in the tutorial { "-o", "${workspaceFolder}/app" }
@ngvi8411 ай бұрын
can u instruct me include glut library
@preetikumari538 Жыл бұрын
Doing as it is why it is showing terminal failed please help me with this
@abdulhakim9537 Жыл бұрын
Thank you so much bro
@sheldonxu635 Жыл бұрын
i made a mistake creating the main.cpp under the dependancy folder, im so dumbbb
@Itsme-yq7cj11 ай бұрын
After repeating what you did, it gives me "clang: error: linker command failed with exit code 1 (use -v to see invocation)". I would appreciate if someone helps me. P.S I am using glfw 3.3.9
@chrystalmathias1185 Жыл бұрын
brew command not found -it says in the terminal
@sanghamitradas9437 Жыл бұрын
Hey. Mine is stuck at "Starting build..." for over 15mins now. Do you have any clue why? No other errors.
@purassicjark10 ай бұрын
Does GLEW need to be installed as well?
@_nakhoo_10 ай бұрын
I got an error: clang: error: no such file or directory: '/Users/.../Desktop/youtube/*.cpp'
@ayushsah8077Ай бұрын
replace the apt arg with this: "${workspaceFolder}/${fileBasenameNoExtension}.cpp" and you are good to go
@ashersaipe2 жыл бұрын
thanks so much for this! however the second example code link doesnt work. is this just me? please could you just reply with the code?
@rosxnb2 жыл бұрын
code I used was from learnopengl.com which by the way is great resource to learn about OpenGL if you are a beginner. here is the link: learnopengl.com/code_viewer_gh.php?code=src/1.getting_started/2.1.hello_triangle/hello_triangle.cpp
@oscarv69072 жыл бұрын
This worked really well for me, although I changed my task.json because my folder structure was different.
@joahnoub173 Жыл бұрын
Amazing thanks!
@ammarhamdy2892 жыл бұрын
my visual studio on Mac m1 cannot select a file to open
@ww25_td Жыл бұрын
Hi I am getting warning saying ld: warning: dylib was built for newer macOS version (13.0) then being linked (12.3). Do you have any suggestions? I am using the most up to date version of glfw and my Mac is 13?
@SlurpCode Жыл бұрын
I choose the same default build task however my args structure is different, is this normal and do I need to change it?
@rylee5233 Жыл бұрын
I cant start build after using conmand shift B ....what happened?or is there any other way to build?
@rylee5233 Жыл бұрын
OK I found it in just under Terminal
@fox204312 жыл бұрын
awesome! think you so much!!!
@ephysio73572 жыл бұрын
Very good tutorial, thank you !
@zhenko98412 жыл бұрын
Great tutorial, but u need to change the sound.
@sergioruppel7269 Жыл бұрын
i have a question, now that we modified the task.json file, will it be used for every c++ file we compile?
@rosxnb Жыл бұрын
you should include every cpp file path in task.json individually. All this is exactly like the commands you would pass to the compiler with flags and list of files but task.json is like script which invokes the compiler command each time so you won't have to write long commands every time you want to compile your files.
@ryanliu866510 ай бұрын
build is taking forever, anyone have any ideas?
@ЕкатеринаОстров Жыл бұрын
Thank you!
@rameshsharma40232 жыл бұрын
Thank you sir🥰.it help me a lot💐💐💐
@savo04032 жыл бұрын
hi! when i do the brew install glfw i get the error "zsh: command not found: brew" but it says that installation is successful
@rosxnb2 жыл бұрын
checkout following stack overflow discussion stackoverflow.com/questions/36657321/after-installing-homebrew-i-get-zsh-command-not-found-brew/71919315
@savo04032 жыл бұрын
@@rosxnb Thank you so much but now when i run specific code it says 'GL/glew.h' file not found what should i do
@rosxnb2 жыл бұрын
It's because you probably haven't specified the path for the GLEW. In this tutorial, I have used glad which is an alternative for the GLEW, so provide path to the files in task.json as I have done in video for the libraries.
@gregfrllo2 жыл бұрын
thank you so much
@1-upprotocol6212 жыл бұрын
Legend, tysm
@ddmichael90352 жыл бұрын
Hi, have you tried to include ASSIMP in the project? I followed your instruction to set up the OpenGL environment, but there seems to have linking issue when I include ASSIMP into the project. Any hint?
@rosxnb2 жыл бұрын
The linking process must be similar as I have shown for glad and glfw in the video. Maybe It has other dependencies, make sure you link all them. Unfortunately I haven't tried ASSIMP.
@ericdomer32922 жыл бұрын
hello im not able to find libglfw.3.3.dylib im only able to find libglfw.3.dylib please please please help out
@rosxnb2 жыл бұрын
have you tried re-downloading GLFW and check if the files exits?
@johnyeap71336 ай бұрын
same here only libglfw.3.dylib
@ДимаИванов-е8у2 жыл бұрын
Thank you a lot!
@محمدظافر-ذ1ذ2 жыл бұрын
for love of the god i need help its not working and i need it real bad for my study please answer me as you can🙏
@rosxnb2 жыл бұрын
what error message are you getting?
@d1legends1572 жыл бұрын
I finished the tutorial and the second sample code compiled and ran! I see why programmers lose their hair.
@nijhoomofficial2 жыл бұрын
Thanks a lot
@jhalakgiri86122 жыл бұрын
Keep it up 👍
@Israeli81032 жыл бұрын
not working for arm64
@alexba88ify2 жыл бұрын
Are you also getting some error about duplicate _main?
@pr88802 жыл бұрын
Thanks sir for Gl setup. It troublesoot my problem
@jakehues2 жыл бұрын
Hi, im getting this error: cannot open source file "OpenGL/gl.h" and this inside my glfw3.h: #include #include errors detected please update your includePath. Any ideas? Thanks :D
@rosxnb2 жыл бұрын
Path to the file "OpenGl/gl.h" is actually provided by OpenGL framework. Make sure you pass the flag "-framework OpenGL" without spelling error
@raghavav90973 ай бұрын
{ "version": "2.0.0", "tasks": [ { "type": "cppbuild", "label": "C/C++: clang build active file", "command": "/usr/bin/clang", "args": [ "-std=c++17", "-fcolor-diagnostics", "-fansi-escape-codes", "-Wall", "-g", "-I/opt/homebrew/opt/glfw/include", // Updated include path "-L/opt/homebrew/opt/glfw/lib", // Updated library path "-lglfw", // Link GLFW library "-lc++", // Link with the C++ standard library "${workspaceFolder}/*.cpp", // Source files "-o", "${workspaceFolder}/app", // Output executable "-framework", "OpenGL", "-framework", "Cocoa", "-framework", "IOKit", "-framework", "CoreVideo", "-framework", "CoreFoundation", "-Wno-deprecated" ], "options": { "cwd": "${fileDirname}" }, "problemMatcher": [ "$gcc" ], "group": { "kind": "build", "isDefault": true }, "detail": "compiler: /usr/bin/clang" } ] } use this it will work
@ahmadbodayr72032 жыл бұрын
gold
@johnsarofeen70222 жыл бұрын
I love you
@aarushikhatrimarry89792 жыл бұрын
👍👍👍
@DeadManRising Жыл бұрын
dude speak louder, damn.
@ahmadbodayr72032 жыл бұрын
read about islam if you are not muslim bro, thanks for the great video
@HarvestrX Жыл бұрын
Buy a PC, Macs are garbage!
@harshithgreddy81312 жыл бұрын
I am getting the following errors Can you please guide me through clang: error: no such file or directory: '/Users/harshithgreddy/Desktop/Project/*.cpp' clang: error: no such file or directory: '/Users/harshithgreddy/Desktop/Project/glad.c'
@rosxnb2 жыл бұрын
looks like you have provided the wrong path to source files do re-check that and if it still doesn't work, hit me up on twitter @rosxnb
@japde26942 жыл бұрын
I also have the same problem, did u manage to fix the issue?
@rushikeshvayandeshkar4902 Жыл бұрын
@@japde2694 I am also
@raghavav90973 ай бұрын
{ "version": "2.0.0", "tasks": [ { "type": "cppbuild", "label": "C/C++: clang build active file", "command": "/usr/bin/clang", "args": [ "-std=c++17", "-fcolor-diagnostics", "-fansi-escape-codes", "-Wall", "-g", "-I/opt/homebrew/opt/glfw/include", // Updated include path "-L/opt/homebrew/opt/glfw/lib", // Updated library path "-lglfw", // Link GLFW library "-lc++", // Link with the C++ standard library "${workspaceFolder}/*.cpp", // Source files "-o", "${workspaceFolder}/app", // Output executable "-framework", "OpenGL", "-framework", "Cocoa", "-framework", "IOKit", "-framework", "CoreVideo", "-framework", "CoreFoundation", "-Wno-deprecated" ], "options": { "cwd": "${fileDirname}" }, "problemMatcher": [ "$gcc" ], "group": { "kind": "build", "isDefault": true }, "detail": "compiler: /usr/bin/clang" } ] } use this it will work