BEST Visual Studio Setup for C++ Projects!

Поделиться
HTML-код
  • Опубликовано: 27 ноя 2024

Комментарии • 333

  • @miteshsharma3106
    @miteshsharma3106 7 лет назад +598

    this c++ series is awesome cherno ........ plzz dont stop making this , we really apreciate it

    • @TheSim00n
      @TheSim00n 7 лет назад +48

      Patreon seems like a good way to make sure he doesn't ¯\_(ツ)_/¯

    • @blank-vw2sb
      @blank-vw2sb 3 года назад +7

      @The Illusionist True. Just build stuff while learning. Don't just learn learn learn.
      BUILD

  • @data-yc2ux
    @data-yc2ux 7 лет назад +316

    This whole C++ series deserves a lot more views. Thanks for the high quality :)

    • @kudoamv
      @kudoamv 6 лет назад +1

      @Cherno if the Video extends to 30 min please keep it that way, I would be happy to listen to all of it.

    • @mokshithpb7991
      @mokshithpb7991 3 года назад +1

      @Lee Strongman Now its 3 years

    • @AkariInsko
      @AkariInsko 2 года назад +2

      @Lee Strongman now 4 year

    • @raktul3697
      @raktul3697 Год назад +1

      @@AkariInsko now 6 years

  • @terryrussell8527
    @terryrussell8527 2 года назад +48

    The reason the original intermediates folder is under the project is to avoid conflicts when building solutions that contain multiple projects.
    Across two projects you might have a source file that has the same name and these would produce the same intermediate targets. I like your folder organization and so with my multi-project solutions I use something like the following for the intermediate directory:
    $(SolutionDir)bin\intermediates\$(ProjectName)\$(Platform)\$(Configuration)\

  • @fzntolenk
    @fzntolenk 6 лет назад +7

    You really have talent in teaching or explaining something... this is gonna be my must-have channel...

  • @markussmhovd1655
    @markussmhovd1655 7 лет назад +10

    Seriously the best C++ video tutorials on the internet! Keep up the great work Cherno!

  • @jul8803
    @jul8803 5 месяцев назад +1

    Man, that was useful! I remember taking over a C++ project and I was endlessly going back and forth between these output directories, made all the more confusing as of course the solution and the project had the same name!

  • @carlosdalomba
    @carlosdalomba 3 года назад +10

    Thanks Cherno, still saving me years later after your game programming series that started my career!
    Coming now from a Unity/C# background, I want to get into C++ and I think I wanna leverage Visual Studio still just like I do with C#.
    This video really helped me on a practical level, that I otherwise don't know if I'd have found.

  • @LukasTaves
    @LukasTaves Год назад +1

    Funny, that's the first time I see someone not like the intermediate files belonging to a folder, but having all final ones copied into the main solution folder.
    This is especially useful for shared library projects that are used across many solutions, because VS can detect the intermediate files are updated even across other solutions and not recompile them.

  • @johntrites3387
    @johntrites3387 3 года назад +13

    You're wrong! These are the BEST damn C++ VS Settings EVER!!! I'm hyperventilating over these SETTINGS! On a serious note, I absolute love your style of teaching. Great explanation of the concepts with relevant programming examples. I'm hoping this semi-retired engineer can find programming work in the era of Covid-19 to support your channel. Cheers in 2021.

  • @DanielKierkegaardAndersen
    @DanielKierkegaardAndersen 7 лет назад +13

    This year is such a great year for Cherno, so much Quality! :D

  • @noctua7771
    @noctua7771 6 лет назад +6

    This channel is going to be booming very soon
    Love the c++ series

  • @robertmoats1890
    @robertmoats1890 3 года назад +3

    Great videos. Good C++ videos are hard to come by. Good C++ videos by English-native authors are almost unheard of. I know accents shouldn't matter that much, but something about yours makes it almost effortless to absorb the information. I personally prefer to store my intermediate files completely outside of my solution directory - into an almost temporary location, such as C:\Dev\ObjectFiles\$(ProjectName)\$(Configuration)\, etc. Primarily just to make it easier to do backups.

  • @bondymagnomous3544
    @bondymagnomous3544 7 лет назад +33

    "really quick tip" - 12 minutes :D. Great series so far.

  • @leonardomarinovic3492
    @leonardomarinovic3492 7 лет назад +1

    So many people are saying you deserve more subscribers but damn you deserve more subscribers

  • @SALOway
    @SALOway Год назад

    After exactly this first video I now want to watch your other videos
    It's so helpful to understand wtf actually happen with the project

  • @handover007
    @handover007 3 года назад +1

    This series is just beyond comparison.

  • @asmonull
    @asmonull 4 года назад +3

    A bit of context why file structure is like that - the structure was made to ease the work of multi-solution gigantic codebases with .sln files often scattered around the filesystem while often reusing same projects. Goal was to reduce build time as much as possible (by keeping intermediates per project, so when you switch solution you can still use them), while still having separate output for each solution file. This kind of approach works quite well for applications the size of Windows, MS Office or Adobe Creative Suite, but often is overkill for anything smaller.

  • @bharatimaganti2454
    @bharatimaganti2454 4 года назад +4

    The videos are really helpful.. To the one's who know the basic OOP concepts of C++, but not sure about building projects, organizing into folders, setting the output/intermediated directories, how compiler and linker works, I say this videos are the best. I did'nt find any other source explaining better than this.

  • @EllieKitsune
    @EllieKitsune 7 лет назад +1

    wow a video on a day that is not Sunday. I have not watched it yet but I know it is going to be good because it is you!

  • @shohamziner
    @shohamziner 4 года назад +1

    that was...SO helpful. I never understood how the damn thing works and what's with all these folders. thank you!

  • @Stoneman06660
    @Stoneman06660 2 года назад

    This removed so much confusion for me using VS. Thanks, mate!

  • @dnsala
    @dnsala Год назад +1

    Thanks, answered all my questions!

  • @milicamisic4011
    @milicamisic4011 2 года назад

    Amazing video, I'm just getting started with C++ and I was so confused about all this stuff until I watched your vid, thanks! ❤

  • @AgentM124
    @AgentM124 7 лет назад +171

    Programmer: "A machine to turn caffeine into code."
    - idk, someone

  • @himejibuda19
    @himejibuda19 5 лет назад +1

    Certainly a great serie videos for learn C++....thanks a lot for everything mister Cherno.

  • @winuxworx
    @winuxworx 4 года назад +6

    The Microsoft default build file organization is a bit weird if you are only working on one project. When you work with multiple projects in one solution it makes sense that you have the final executable in the solutions folder separate from the per project builds.

  • @Undrios
    @Undrios Год назад

    Thank you, this is realy going to make my life easier especially as a beginner

  • @SeamanGR
    @SeamanGR 6 лет назад +1

    The most useful C++ related videos! Thanks!

  • @muhammadtaimourafzal5285
    @muhammadtaimourafzal5285 3 года назад

    cherno you are a legend.

  • @midvok3918
    @midvok3918 4 года назад +2

    Visual Studio is indeed great for large projects. But for small things like doing examples and tutorials, I prefer to use VSCode, because I can build&debug any single file containing main() without the hassle of congratulating projects for each thing I wanna try.

  • @bag_of_pixels
    @bag_of_pixels 4 года назад +8

    Output directory: $(SolutionDir)\bin\$(Platform)\$(Configuration)\

    • @NetHacker100
      @NetHacker100 3 года назад +1

      Not all heroes wear capes. Some wear trooper helmets papa bless

    • @rtdietrich
      @rtdietrich 2 года назад

      noooo: This is right: $(SolutionDir)bin\$(Platform)\$(Configuration)\ ===> one '\' has to be removed

  • @Carstin
    @Carstin 7 лет назад +4

    Churno is just pumping out videos these days aye

  • @bestganesh
    @bestganesh 4 года назад

    Nice explanation... It has resolved my doubts related to the folder structure and why it is so.

  • @cycobytetv9004
    @cycobytetv9004 4 года назад +1

    Really great work! I watched a few of your tutorials and you are right on point every single time, simple, clear, straight to the point, no time wasted. Keep up the good work!

  • @cancelhandles
    @cancelhandles 3 года назад

    Cherno, do you ever realize that one day you started drinking coffee and never stopped again?
    In all seriousness, thanks for this series, I'm really hoping it will get me into programming once and for all; while I could make things a bit easier on myself by learning Python instead, I'd really just rather be able to program ALL things I make in C++ if necessary, from the ground up; even if I probably won't end up doing it that way. Your video "How to REALLY learn C++" is what inspired me to check out your playlist, so here's hoping.

  • @thekingVLAD90
    @thekingVLAD90 7 лет назад +17

    That coffee sip though :))

    • @oamost
      @oamost 6 лет назад +2

      LoL, first I thought I left a comment on a video that I'm just about to view for the first time.

  • @Yno909
    @Yno909 6 лет назад +2

    This video def helped a ton. Thanks.

  • @hidemat5141
    @hidemat5141 2 года назад +2

    omg thank you so much. Visual studio seems so foreign to me without being about to look at my folder structure.

    • @atlantic_love
      @atlantic_love 2 года назад

      I don't understand Microsoft's desire to create some silly 'virtual' folder system that doesn't even reflect the real thing. I mean, could they not work on something more practical, such as Git or a GUI create screen like they had in the old Visual C++ software?

  • @onixydo3099
    @onixydo3099 5 лет назад +1

    I love your videos you are so funny and your way explaining is so amazing, your channel is one of the best channels continue like this brother

  • @salvadortokumura1194
    @salvadortokumura1194 Год назад

    Thanks, I was searching speciffically for this video

  • @kemptcode
    @kemptcode 7 лет назад +159

    Yeah but how do i use microsoft word

    • @pradyumnkejriwal3007
      @pradyumnkejriwal3007 7 лет назад +6

      You can't use Microsoft Word to do programming

    • @Digger-Nick
      @Digger-Nick 7 лет назад +97

      Pradyumn Kejriwal You can't use your brain to figure out sarcasm

    • @chronohax7186
      @chronohax7186 7 лет назад +7

      quite rude tho :v

    • @valizeth4073
      @valizeth4073 6 лет назад +9

      Well, you kinda should be able to, u can save files with .cpp format, get gcc and it should technically work, haven't tried it out tho.

    • @valentinidk6101
      @valentinidk6101 6 лет назад +2

      Pradyumn Kejriwal You can, but it's way worse than VS

  • @sykn3z
    @sykn3z 6 лет назад

    THANK YOU FOR YOUR TIMEEEEEEE BROOO Y R AWESOME!!! KEEP WITH THE C++ COURSE really really love it!

  • @tatterdemalion898
    @tatterdemalion898 3 года назад

    Well now! He also has to replace his blood with coffee. That is some fine coder material there! Love his vids!

  • @Massimus888
    @Massimus888 4 года назад

    Thanks for the tip. These Visual Studio videos are great!

  • @h.hristov
    @h.hristov 7 лет назад +3

    Thanks man, these videos are so helpful!

  • @steele.in.motion
    @steele.in.motion 5 лет назад +1

    Just had to pop in and say -- that is a freaking cool lamp.

  • @HappyMatt12345
    @HappyMatt12345 Год назад

    I'm going to start setting up my projects this way because the organization is easier for me to look at.

  • @donovanlay9835
    @donovanlay9835 3 года назад

    Gotta say, for an existing project this was a pain to fix, but eventually got it. Next time will start using this method from the get go and hopefully shouldn't have any issues

  • @guy6311
    @guy6311 2 года назад

    Like the lamp!

  • @MarkMcDaniel
    @MarkMcDaniel Месяц назад

    I prefer to check the box that places my solution and project stuff altogether into a single directory. But, that's because I generally create solutions with a single project executable.

  • @tenminutetokyo2643
    @tenminutetokyo2643 4 года назад

    Love that BGM.

  • @HiPh0Plover1
    @HiPh0Plover1 3 года назад +45

    this vid need a 2021 update

    • @Undrios
      @Undrios Год назад +1

      2 years later and he didn't make an update video :(

    • @Asango
      @Asango Год назад +16

      Because everything shown in this video works exactly the same in every single VS up to 22. This does not need an update yet and probably won't for quite a while.

  • @matsomo
    @matsomo 7 лет назад

    I started watching this series a few days ago and now I'm sad there's now more videos out yet, keep them coming

  • @chipnetics
    @chipnetics 3 года назад

    This video is superb and a far better default directory layout. I can't express how many times I've went into the wrong Debug/Release directory.... very frustrating and wears on you over time.

  • @Fernando-du5uj
    @Fernando-du5uj Год назад

    THANK YOU SO MUCH!!! Hate those default settings of vs.

  • @FdikxfkkxZDFEWDCjdjSSa
    @FdikxfkkxZDFEWDCjdjSSa 4 года назад

    This is useful for newbie like me , u r awesome dude

  • @peiquedq
    @peiquedq 7 лет назад

    This series is amazing! Keep on going, thank you so much!!!

  • @ssuriset
    @ssuriset 6 лет назад

    This guy is the best.

  • @Nautica216
    @Nautica216 6 лет назад +1

    It would be great if you did a series of videos on programming C++ code that provides functionality to a device of some sort (robotic or some output like a laser)?

  • @MsJavaWolf
    @MsJavaWolf 6 лет назад

    It is so weird how important that stuff is. Sometimes for a new project just configuring all the settings will be like 20% of the work. You think you are ok at C++ but then you have to link all the libs, set up the project structure, set up tests, sometimes you have to recompile a lib from source because it was linked in a different way, all that stuff is almost as important as knowing the actual programming language.
    The enxt thing is of course if you work in a team, better make sure all those project files use macros and relative paths, otherwise your team members will check the project ot and realize they don't have a z:\\ drive and everything will break.

  • @arsnakehert
    @arsnakehert 4 года назад

    Oh my god
    I had no idea how to organize my source folder using the file system directly in Visual Studio
    Thank you, 2017 Cherno

  • @jour785
    @jour785 Год назад

    I want to come back here in 10 years and be nostalgic

  • @nunyabiz2016
    @nunyabiz2016 4 года назад

    This is massively helpful, thank you

  • @oscarbergqvist4992
    @oscarbergqvist4992 7 лет назад

    Thanks! It all makes sense now.

  • @evrenerce
    @evrenerce 3 года назад

    I was wondering am i weird to change those settings, i am glad i found other VS C++ programmers are also just like me

  • @bimDe2024
    @bimDe2024 5 лет назад

    you solved half of my problem. thanks a lot.

  • @susiana5
    @susiana5 6 лет назад +1

    Thank u verry much for such nice Content, i never seen such helpful Videos on RUclips :D amazing :D

  • @bulatenkom
    @bulatenkom 7 лет назад +2

    Thank you, Cherno! One more awesome lesson is overhere. :)
    The only weird thing, which I have spotted in this video is extra "\" after $(SolutionDir). I have paused the video, comment it here, but, after 20 seconds of video, you fix it. xD

  • @federicobau8651
    @federicobau8651 Месяц назад

    @TheCherno about the intermediate objects being in the src dir and the excecutable in the outer folder...i honestly think makes sense...especially if you come from other languages. For exsmple in other languages the real executable are in the project root directory under a folder called build. They are not within source code file
    .
    While the other stuff like .obj are really still source code so it makes sense to NOT TO BE with the build exe

  • @DatBrit7
    @DatBrit7 7 лет назад

    While waiting for the video to load I took a mouth full of coffee. As it started playing just basically had a moment there... #LoveYouProbablyMoreHomoThanICareToAdmit

    • @jscorpio1987
      @jscorpio1987 5 лет назад

      I was drinking coffee while reading this comment and misread the first part as “while waiting for the video I took a load in the mouth”.
      Then I read the homo hashtag and realized we’re family! Lol

  • @alphadecay3116
    @alphadecay3116 6 лет назад +3

    Do you have to do this for each project you make?
    Great video by the way!

  • @jasonmathew33
    @jasonmathew33 7 лет назад

    The way you say "project" is weird.... I like it

  • @iam_Raavanan
    @iam_Raavanan 3 года назад

    This is really amazing and helpful one

  • @SarcTiann
    @SarcTiann 4 года назад

    Without your explanation, I would never have understood VS file management

  • @iamsaulo
    @iamsaulo 2 года назад

    good man, man good, man. Oh man. Ohh man. Ohh man. Thank you very much for this folder explanation in this jungle IDE. Now looks obvious, but man, I'm been fighting with this thing forever and never occurs to me that IDE folder organization is based on tags. Already rover over the little icons in the interface to check out, milion times, but the thing is more complicated than a swiss wrist watch... so, i just don't touch to not break the whole thing (lol). Tks man.

  • @Cynokine
    @Cynokine 7 лет назад +1

    Awesome, makes a lot of sense to configure the projects like you do. I don't really understand why so many IDE uses virtual folders.. Anyway, keep it up =)

  • @fischeye82
    @fischeye82 4 месяца назад

    After 7 Years this is still a very good explaination how to Setup Visual Studio. But is a similar setup for C++ also possible to do in Visual Studio Code?

  • @useijin
    @useijin Год назад

    Thank you so much!! You saved my life

  • @GloomDev
    @GloomDev 4 года назад

    So much better. Thanks much.

  • @noiamhippyman
    @noiamhippyman 4 года назад +2

    How do you look so much younger only three years ago?
    These last few years have been hell on all of us. lol

  • @davegreen7955
    @davegreen7955 5 лет назад +1

    Anyone having a problem with their Main.cpp NOT showing in their src folder after toggling to show all file view, simply go to File/Close Solution and then reopen the project, worked for me anyway.

  • @sebastianricks9459
    @sebastianricks9459 3 года назад

    You are the Bomba amigo!

  • @ab-br5os
    @ab-br5os 7 лет назад

    Great video. Short, informative, pleasant to watch. +1

  • @noapoleon_
    @noapoleon_ 4 года назад +7

    *PROBLEM:* Always resets my output and intermediates directory after I close a solution...

    • @travisbennison9478
      @travisbennison9478 4 года назад +15

      Don't know if you've solved this, as it's been 6 months, but just in case you haven't:
      these settings are all solution-specific. If you want to re-use this "model" of organization, you have to turn it into a template.
      To do that, you have to go to the upper part of VS, and go to "Project > Export Template".
      There, you'll be prompted a few things. Select "Project Template", go "Next >".
      Name your template however you like, give it a description.
      I don't usually worry about the Icon Image, or Preview Image, and the Output location doesn't really matter either, as that's not where VS "pulls" templates from. (By default, it pulls it from a nearby folder called just "Templates", somewhere inside the C:\Users\{user}\ directory, if you are curious).
      Hope this helps. And if not you, somebody else. Cheers.

    • @AnteP-dx4my
      @AnteP-dx4my 4 года назад

      @@travisbennison9478 tnx mate , much appriciated .

  • @nickknight5373
    @nickknight5373 4 года назад

    Excellent teaching.

  • @megam.m.s2968
    @megam.m.s2968 10 месяцев назад +2

    This vid need a 2024 update

  • @glitchingcore
    @glitchingcore Год назад +1

    Is it possible to save those changes so that they apply to all new projects as well?

  • @preciseestimatingltd2579
    @preciseestimatingltd2579 4 года назад

    Thanks, there aren't many videos on IDE's, would love to see some more in-depth videos on how to use Visual Studio. There aren't a great deal of videos on how to use IDE's. I've found the IDE more complicated than C++ lol.
    Also in Visual Studio I think there's a bug which struggles with creating templates. They don't appear when creating a new project. I managed to do a workaround by installing the zipped template to C:\Users\YourUserName\Documents\Visual Studio 2010\Templates\ProjectTemplates
    then the file becomes visible. This has been acknowledged by Microsoft as a bug & is intended for fix in later development I believe (coming across other threads where this issue was raised) so hopefully this gets addressed soon.

  • @dalskiBo
    @dalskiBo 4 года назад

    Concise & great content; thanks.

  • @vivekkumaragrawal9147
    @vivekkumaragrawal9147 4 года назад

    appreciate the effort ...very nice and informative video ..thankyou

  • @cristoferson17
    @cristoferson17 7 лет назад

    Amazing, thanks for the tips. Great work!!

  • @Mariana-cb1bo
    @Mariana-cb1bo 2 года назад

    Cherno, u are the best

  • @xuqiangzhang9724
    @xuqiangzhang9724 5 лет назад

    good tut,really apreciate it

  • @ahsanullah6326
    @ahsanullah6326 7 лет назад +2

    when i can't sleep i watch his videos because these videos make me sleepy or something not in a bad way but i think because of the soothing music behind makes me sleepy so i never watched 3 videos in line and not sleep. :(

  • @felonhighman5146
    @felonhighman5146 Год назад

    VERY VERY VERY USEFUL VIDEO!!!

  • @Tony_Yno.
    @Tony_Yno. 2 года назад

    Hey Cherno, did you ever make a video on all the different file Visual Studio creates. You mentioned you will consider making a video on that on 2:10 to 3:00

  • @matt-g-recovers
    @matt-g-recovers 3 года назад

    Love it.
    Excellent setup.
    Copied.

  • @TotalEnnui
    @TotalEnnui 2 года назад

    thanks, great help!

  • @marioseis7692
    @marioseis7692 3 года назад

    'Magister Maximvs'... Semper!