1 00:00:05,300 --> 00:00:06,400 Hello everyone. 2 00:00:06,400 --> 00:00:10,400 In this video, I want to give you a tour of the CodeLite interface. 3 00:00:10,900 --> 00:00:14,900 The version of CodeLite that I'm using here is 17.3.0. 4 00:00:14,900 --> 00:00:17,900 This version is more recent than the versions that I used, 5 00:00:17,900 --> 00:00:19,700 when I recorded the videos for the course. 6 00:00:20,390 --> 00:00:24,190 Overall, they are very very similar, sure you're going to see a couple of differences 7 00:00:24,190 --> 00:00:25,690 in the user interface, 8 00:00:25,690 --> 00:00:28,590 some things have been cleaned up and made more streamlined. 9 00:00:28,590 --> 00:00:31,390 But the basic functionality of the IDE, 10 00:00:31,390 --> 00:00:35,490 namely creating workspaces, creating projects, editing the code, 11 00:00:35,490 --> 00:00:38,490 building and running the code have not changed. 12 00:00:38,490 --> 00:00:40,490 So, let me give you a quick tour here. 13 00:00:40,490 --> 00:00:42,490 When you first open up CodeLite, 14 00:00:42,490 --> 00:00:45,990 if you don't have a workspace already open since the last time you saved it, 15 00:00:45,990 --> 00:00:47,870 you'll get a screen that looks like this. 16 00:00:47,870 --> 00:00:51,470 Over here on the left side, you'll see the Workspace view. 17 00:00:52,160 --> 00:00:54,520 This is where the workspace and projects 18 00:00:54,520 --> 00:00:58,880 will reside, there aren't any open now, because I don't have a workspace open yet. 19 00:00:58,880 --> 00:01:01,570 Over here in the center, you see these 20 00:01:01,570 --> 00:01:02,570 four big buttons. 21 00:01:02,570 --> 00:01:04,769 Again, that might change in the future, 22 00:01:04,769 --> 00:01:07,970 but right now we're going to use two of them, we're going to open an existing workspace, 23 00:01:07,970 --> 00:01:09,470 I'm going to create a new workspace. 24 00:01:10,160 --> 00:01:13,460 Down at the bottom, we can see recently opened workspaces, 25 00:01:13,460 --> 00:01:16,460 so you can see that I've already opened three workspaces 26 00:01:16,460 --> 00:01:19,260 and I did that, so you can see something down here. 27 00:01:19,260 --> 00:01:22,850 Very likely, the first time you run CodeLite, you're not going to have any workspaces, 28 00:01:22,850 --> 00:01:24,750 so this section down here will be empty. 29 00:01:25,440 --> 00:01:29,440 So, suppose I want to load a workspace, I can open a workspace and navigate to it. 30 00:01:29,440 --> 00:01:31,940 Or I'm just going to click Workspace 2 right here, 31 00:01:31,940 --> 00:01:35,140 which is a workspace that I created with several projects in it, 32 00:01:35,140 --> 00:01:37,140 just to walk you through this interface. 33 00:01:37,140 --> 00:01:38,940 So I'm just going to double click that 34 00:01:38,940 --> 00:01:42,440 and you can see that CodeLite has loaded Workspace 35 00:01:42,440 --> 00:01:44,640 2 into the Workspace view. 36 00:01:44,640 --> 00:01:49,040 Workspace 2 has four projects in it, project 1, project 1, 3 and 4. 37 00:01:49,040 --> 00:01:52,730 Each one of those is a stand alone C++ application. 38 00:01:52,730 --> 00:01:54,530 We can expand each of them. 39 00:01:55,520 --> 00:01:57,880 And you can see each one has a source folder, 40 00:01:57,880 --> 00:02:02,380 and within the source folder, they each have a main.cpp source file. 41 00:02:02,380 --> 00:02:04,380 That's where our C++ code goes. 42 00:02:04,880 --> 00:02:09,280 Later in the course, we're going to have projects that have multiple CPP files in them. 43 00:02:10,280 --> 00:02:13,580 Also you can see that Project 1 is bold 44 00:02:13,580 --> 00:02:14,940 and italicized, 45 00:02:14,940 --> 00:02:18,630 that tells you that Project 1 is the active project. 46 00:02:18,630 --> 00:02:23,130 The way that CodeLite works is that it builds and runs the active project. 47 00:02:23,130 --> 00:02:25,490 So when we come up and build things in a minute, 48 00:02:25,490 --> 00:02:27,890 it's always going to build the active project. 49 00:02:27,890 --> 00:02:30,190 So it's really important that we understand what 50 00:02:30,190 --> 00:02:33,190 we're building, because we could be editing Project 4 51 00:02:33,190 --> 00:02:36,550 and then pressing build, thinking that Project 4 is being built. 52 00:02:36,550 --> 00:02:40,750 But if Project 1 is the active project, project 1 will be built. 53 00:02:40,750 --> 00:02:42,950 Sounds confusing, but it really isn't, 54 00:02:42,950 --> 00:02:46,750 just make active what you're working on, it's really straightforward. 55 00:02:46,750 --> 00:02:50,000 Okay so, that's the workspace view, 56 00:02:50,000 --> 00:02:52,300 we've got some tabs up here 57 00:02:52,300 --> 00:02:55,300 and the only one we're going to use is Workspace, don't worry about the rest. 58 00:02:55,300 --> 00:02:59,560 In the IDE or an integrated development environment, such as CodeLite 59 00:02:59,560 --> 00:03:02,660 is designed for small programs like we're going to do, 60 00:03:02,660 --> 00:03:05,160 and it's also designed for very large programs. 61 00:03:05,160 --> 00:03:08,660 So it's got a lot of bells and whistles that we're not going to use. 62 00:03:08,660 --> 00:03:10,880 These are the kinds of things you would use in programs 63 00:03:10,880 --> 00:03:12,780 that are thousands of files and 64 00:03:12,780 --> 00:03:13,980 very, very complicated. 65 00:03:13,980 --> 00:03:16,880 So in this case, we're just going to keep it really, really simple, 66 00:03:16,880 --> 00:03:20,570 this is all about learning C++ more than it is about learning CodeLite. 67 00:03:20,570 --> 00:03:25,560 So, there's my workspace, you can see that I have this little 68 00:03:25,560 --> 00:03:29,060 paper airplane here, and when you click that, it collapses everything. 69 00:03:29,060 --> 00:03:33,060 Sometimes, we've got a lot of projects in here and they all get expanded 70 00:03:33,060 --> 00:03:34,860 and it's really hard to find stuff. 71 00:03:34,860 --> 00:03:37,060 So if you click that, it just collapses everything. 72 00:03:38,160 --> 00:03:40,160 Now, I can expand whatever I like again. 73 00:03:41,150 --> 00:03:44,950 Also, if I'm somewhere down here let's say, 74 00:03:45,850 --> 00:03:50,050 and I want to go to my active project, I can just click that home icon 75 00:03:50,050 --> 00:03:53,050 and that takes me to my active project right away and opens it up, 76 00:03:53,050 --> 00:03:54,250 so that's kind of handy. 77 00:03:54,250 --> 00:03:55,850 And you've already seen the settings, 78 00:03:55,850 --> 00:03:58,850 you can click the project you want and you can click that little wrench 79 00:03:58,850 --> 00:04:00,450 and it gives you your settings. 80 00:04:00,450 --> 00:04:04,250 We did that when we installed and configured CodeLite a few videos ago, 81 00:04:04,750 --> 00:04:05,150 all right. 82 00:04:05,150 --> 00:04:07,510 So, that's the workspace view. 83 00:04:07,510 --> 00:04:09,310 Now this big area right here 84 00:04:09,310 --> 00:04:12,670 in the center, that's got nothing in it right now, this is your editor. 85 00:04:12,670 --> 00:04:16,470 In order to use the editor, you need to click on a C++ file 86 00:04:16,470 --> 00:04:18,470 or something in the project. 87 00:04:18,470 --> 00:04:22,070 So in this case, I'm going to double click on main.cpp and it opened it up. 88 00:04:22,730 --> 00:04:26,090 And you could see this is very similar to the program we wrote during the installs. 89 00:04:26,090 --> 00:04:28,970 Hello from Project 1, makes sense. 90 00:04:28,970 --> 00:04:32,870 Now let's say, I want to open up Project 2, and I want to open up that source file 91 00:04:32,870 --> 00:04:35,870 that loaded up as well and it says hello from Project 2. 92 00:04:35,870 --> 00:04:39,070 Up here in the tab, we can tab between those two. 93 00:04:39,070 --> 00:04:43,170 And as I do that, you can see this blue bar over here in the Workspace view, 94 00:04:43,170 --> 00:04:46,170 jumping to the appropriate file in the project. 95 00:04:46,370 --> 00:04:50,060 We can turn that off by clicking that little link right here, 96 00:04:50,060 --> 00:04:53,860 I don't know why you would want to do that, I love the fact that I can see exactly 97 00:04:53,860 --> 00:04:55,860 where it's at, so I'm just going to leave that alone. 98 00:04:55,860 --> 00:04:58,460 We can open up the rest of these projects as well, 99 00:04:58,460 --> 00:05:02,260 let me expand all of these and I'll open up Project 3 and Project 4. 100 00:05:02,260 --> 00:05:06,560 So now you can see that, I've got four project main cpps open up here, 101 00:05:06,560 --> 00:05:08,360 and it's pretty easy to see, 102 00:05:08,360 --> 00:05:11,050 which project they belong to and you can actually hover over it, 103 00:05:11,050 --> 00:05:12,930 and it tells you the path to the workspace 104 00:05:12,930 --> 00:05:17,130 and the project and the file within the project, okay? So, 105 00:05:17,130 --> 00:05:18,330 that's great. 106 00:05:18,330 --> 00:05:22,330 When I modify the code and again, I'm going to go, let me collapse all of these, 107 00:05:22,330 --> 00:05:26,130 and I'm going to go to my active project, and there's project 1. 108 00:05:26,130 --> 00:05:28,490 So, that's where I'm at right now, 109 00:05:28,490 --> 00:05:31,290 I can close these up now, just to get them out of the way. 110 00:05:31,290 --> 00:05:32,890 Right now, I'm working on project 1. 111 00:05:33,690 --> 00:05:36,380 When I make any changes to this file for example, 112 00:05:36,380 --> 00:05:38,580 suppose I added a space at the end of this line. 113 00:05:40,080 --> 00:05:43,680 We get this little red dot right there, right next to the project name 114 00:05:44,080 --> 00:05:47,080 in the tab, that tells you that this file is called dirty. 115 00:05:47,080 --> 00:05:52,380 So in other words, what I'm working on right now is not what is on the file system. 116 00:05:52,780 --> 00:05:56,570 So, it's telling you right there, hey be sure to save this, 117 00:05:56,570 --> 00:05:59,370 if you really want this updated on the disk. 118 00:05:59,370 --> 00:06:01,270 So we can save with file, 119 00:06:02,170 --> 00:06:06,270 save file or CTRL S or you can click on this little save 120 00:06:06,270 --> 00:06:09,960 icon right up here in the bar, and I'll talk more about that control bar in a moment. 121 00:06:10,560 --> 00:06:14,860 So I can do that, I can press CTRL S and that little red dot goes away. 122 00:06:14,860 --> 00:06:18,160 If you're on Linux, It's a little black dot on most of Linux distributions, 123 00:06:18,160 --> 00:06:20,360 but again it doesn't matter what colour it is, 124 00:06:20,360 --> 00:06:24,960 but you're not going to see that little x to close it.So, that's my project 1. 125 00:06:25,760 --> 00:06:27,560 Let me remove that line 126 00:06:27,560 --> 00:06:30,560 and again, you can see that that's red and I'm going to save it again. 127 00:06:31,160 --> 00:06:33,850 So, this is how we would edit our program. 128 00:06:33,850 --> 00:06:37,150 I've made this font large, so that you can see it, 129 00:06:37,150 --> 00:06:38,750 better on video. 130 00:06:38,750 --> 00:06:42,350 All of that is in the settings, colours and fonts, If you click that, 131 00:06:42,350 --> 00:06:44,850 you can change the fonts, the colours, the 132 00:06:44,850 --> 00:06:48,540 theme that you're using, whether it's a light theme or a dark theme and so forth. 133 00:06:48,540 --> 00:06:50,230 I'm just going to leave this alone. 134 00:06:51,130 --> 00:06:54,130 We've already learned, how to create projects, we've learned how to create 135 00:06:54,130 --> 00:06:54,930 workspaces. 136 00:06:54,930 --> 00:06:59,330 We did that in the installation video, so that process is exactly the same. 137 00:06:59,330 --> 00:07:01,130 Now, how do we build and run? 138 00:07:01,430 --> 00:07:03,230 Well, let me expand this. 139 00:07:03,230 --> 00:07:07,630 Right now, project 1 is the active project, so we can come up to build. 140 00:07:07,630 --> 00:07:10,630 And we've got a couple of options here, you can see, 141 00:07:10,630 --> 00:07:13,630 we can run, we can build a project, we can rebuild it, we can clean it, 142 00:07:13,630 --> 00:07:15,510 we can do a whole bunch of stuff, right? 143 00:07:15,510 --> 00:07:19,510 We're only going to be using a couple of these, actually, probably just one of these most of the time. 144 00:07:20,200 --> 00:07:23,500 In order to create an executable file that we can run, 145 00:07:23,500 --> 00:07:25,190 we need to build the project. 146 00:07:25,190 --> 00:07:26,790 And in order to 147 00:07:26,790 --> 00:07:29,890 run an executable file, we have to have a good build, no 148 00:07:29,890 --> 00:07:31,690 syntax errors, no other errors. 149 00:07:31,690 --> 00:07:35,990 You can do that by pressing F7 to build the project, so let me do that. 150 00:07:36,490 --> 00:07:39,180 And the output view opens up down here and I'm just going to 151 00:07:39,180 --> 00:07:42,580 scroll this up just a little bit, little bit up, so you can see it all. 152 00:07:42,580 --> 00:07:44,880 The output view opens up. 153 00:07:44,880 --> 00:07:49,880 And we get our build output here, you can see that build output is in this build tab. 154 00:07:50,780 --> 00:07:54,780 If you post on the Q & A form saying, hey, I've got some kind of error, it's not building, 155 00:07:54,780 --> 00:07:58,380 I'm going to ask you to show me the build output, because that tells me what's going on. 156 00:07:58,980 --> 00:08:02,880 So, this is the build output notice, successful build, no errors. 157 00:08:02,880 --> 00:08:06,680 Once we have a successful build, we can come up to build and run it. 158 00:08:06,680 --> 00:08:10,380 Now it's going to ask me, would you like to build the active project before executing it? 159 00:08:10,380 --> 00:08:14,180 I've already built it, so I don't have to build it again, you certainly could. 160 00:08:14,180 --> 00:08:18,080 And if you want to always do one of these, just remember your choice. 161 00:08:18,080 --> 00:08:21,680 And click that little check mark, and it's not going to pester you all the time with this little, 162 00:08:21,680 --> 00:08:22,180 pop up. 163 00:08:22,180 --> 00:08:23,540 So let me execute it 164 00:08:23,540 --> 00:08:26,230 building and running Project 1, so I expect 165 00:08:26,230 --> 00:08:30,530 hello from Project 1 to display on my terminal, my command prompt. 166 00:08:30,530 --> 00:08:34,929 Execute and there you go, hello from Project 1. 167 00:08:34,929 --> 00:08:37,620 I should also mention that the process for Mac, 168 00:08:37,620 --> 00:08:40,419 Linux and Windows is exactly the same. 169 00:08:40,419 --> 00:08:44,410 So everything I'm talking about in this video, applies to all of the operating systems. 170 00:08:44,410 --> 00:08:47,410 When we're done, we press enter and we close that. 171 00:08:48,010 --> 00:08:52,010 So that's that, now we can modify the 172 00:08:52,010 --> 00:08:53,010 look and feel. 173 00:08:53,010 --> 00:08:56,310 So for example, suppose I don't want my output view over here. 174 00:08:56,310 --> 00:08:58,810 Suppose I want my output view over here, on the right? 175 00:08:58,810 --> 00:09:00,690 I can grab this blue bar, 176 00:09:00,690 --> 00:09:03,380 It may not be blue on your end, but I can grab that bar 177 00:09:03,380 --> 00:09:04,680 and just drag it over here. 178 00:09:04,680 --> 00:09:07,680 You can see it's lighting up right there, so I'm just going to drop it there, 179 00:09:07,680 --> 00:09:09,180 so there's my output view. 180 00:09:09,680 --> 00:09:12,680 And, now suppose I want my workspace 181 00:09:12,680 --> 00:09:15,370 view to be above that, so I can just move that over there. 182 00:09:15,370 --> 00:09:18,970 So now I can have my workspace view over here, my output view over here. 183 00:09:19,370 --> 00:09:21,570 The View menu option 184 00:09:21,570 --> 00:09:25,970 gives you all kinds of options for example, I can turn my output put pane off. 185 00:09:26,470 --> 00:09:29,350 In which case you can see it's just disappeared over here from the right 186 00:09:29,350 --> 00:09:30,950 and I can turn it back on. 187 00:09:31,550 --> 00:09:34,050 I can turn my workspace pane off 188 00:09:34,050 --> 00:09:35,350 and back on. 189 00:09:36,250 --> 00:09:39,250 This is totally up to you what your preferences 190 00:09:39,250 --> 00:09:42,250 are as far as the look and feel of your work environment. 191 00:09:42,850 --> 00:09:44,730 We can also do a view 192 00:09:44,730 --> 00:09:48,030 with the main toolbar orientation, that's the toolbar, 193 00:09:48,030 --> 00:09:49,730 that's this toolbar right up there, 194 00:09:49,730 --> 00:09:52,420 the one we see with the plus and the bug and all that. 195 00:09:52,420 --> 00:09:56,020 These are just shortcuts to things I've been doing, we can add a new file, 196 00:09:56,020 --> 00:09:58,220 we can open a file, we can save a file. 197 00:09:58,220 --> 00:10:01,220 That little hammer builds the active project. 198 00:10:01,220 --> 00:10:03,580 Here, we can stop a build, which is 199 00:10:03,580 --> 00:10:06,280 not a big deal for us, because our builds are pretty fast. 200 00:10:06,280 --> 00:10:10,080 But when we have really large C++ programs, 201 00:10:10,080 --> 00:10:13,380 builds can sometimes take an our believe it or not, or longer. 202 00:10:13,380 --> 00:10:16,380 So sometimes we'll want to stop the build for whatever reason. 203 00:10:16,880 --> 00:10:20,680 We can clean the active project and I'll show you what that is in just a moment. 204 00:10:20,680 --> 00:10:23,480 And we can run the active project and certainly we can debug, 205 00:10:23,480 --> 00:10:25,980 and we'll talk about debugging in a different video. 206 00:10:25,980 --> 00:10:28,580 So, these are the main functions here. 207 00:10:29,080 --> 00:10:32,580 If for whatever reason you just get lost in this interfacing, 208 00:10:32,580 --> 00:10:35,080 so you start moving these things around and oh my goodness, 209 00:10:35,080 --> 00:10:37,580 I don't like what I've done and I've having trouble getting back. 210 00:10:37,580 --> 00:10:41,380 You can always just go to view and restore layout. 211 00:10:42,070 --> 00:10:44,870 And that'll bring it right back to factory default, basically. 212 00:10:45,470 --> 00:10:48,470 So as I said, there's all the view issues here, 213 00:10:48,470 --> 00:10:52,270 If you don't like that main toolbar up here at the top and you want it on the left, 214 00:10:52,270 --> 00:10:55,270 you could just go to view main toolbar orientation left. 215 00:10:55,270 --> 00:10:58,070 And then it's going to say, do you want to reload CodeLite. 216 00:10:58,070 --> 00:11:01,570 Sometimes it's going to want to restart, let me say yes, you can see what it's like. 217 00:11:01,570 --> 00:11:04,070 It closes up, it opens up again 218 00:11:04,070 --> 00:11:07,270 and now you can see that the toolbar is over here on the left. 219 00:11:07,270 --> 00:11:10,870 So again, personal preferences there all the way around with the views. 220 00:11:11,370 --> 00:11:13,370 So now, let's talk about the build again. 221 00:11:14,270 --> 00:11:17,960 In this case, if I want to build, 222 00:11:17,960 --> 00:11:19,260 what that means is 223 00:11:20,060 --> 00:11:22,560 I want to build the active project. 224 00:11:23,360 --> 00:11:27,360 So what CodeLite is going to do, it's going to go out there and it's going to see first, 225 00:11:27,360 --> 00:11:28,660 has it already been built? 226 00:11:29,350 --> 00:11:31,710 If it has been built, then it's going to say, 227 00:11:31,710 --> 00:11:34,960 has anything changed in the source code here, 228 00:11:34,960 --> 00:11:36,320 since the last build? 229 00:11:36,820 --> 00:11:39,220 If the answer is no, then it's not going to rebuild it, 230 00:11:39,220 --> 00:11:42,520 It doesn't need to rebuild it, since the build is current, 231 00:11:42,520 --> 00:11:43,320 makes sense? 232 00:11:43,680 --> 00:11:46,980 Now, if we have made any changes or it's the first time we build, 233 00:11:46,980 --> 00:11:48,580 it's going to certainly build it. 234 00:11:48,780 --> 00:11:50,140 So that's what build does. 235 00:11:50,140 --> 00:11:54,540 Clean the project, removes any intermediate files, the executables, 236 00:11:54,540 --> 00:11:56,040 it just basically 237 00:11:56,040 --> 00:11:57,040 clears out everything. 238 00:11:57,040 --> 00:12:00,540 Not your source code, just the build products, cleans out everything. 239 00:12:00,540 --> 00:12:05,040 So the next time we build, we have a clean build, in other words, there's nothing prebuilt. 240 00:12:05,940 --> 00:12:08,440 Rebuild does both of those essentially. 241 00:12:08,440 --> 00:12:10,340 First it cleans and then it builds. 242 00:12:10,840 --> 00:12:14,830 That's what I would encourage you to use throughout the course, rebuild project. 243 00:12:14,830 --> 00:12:18,730 The reason that we don't use rebuild project in industry very much 244 00:12:18,730 --> 00:12:21,730 is because, our projects can be very, very large. 245 00:12:21,730 --> 00:12:26,030 And if I do a clean and then a build every time, it could take 20, 30 minutes. 246 00:12:26,030 --> 00:12:29,530 Whereas, the build itself is only going to build things 247 00:12:29,530 --> 00:12:31,130 that have changed since the last build, 248 00:12:31,130 --> 00:12:32,490 so they're much more efficient. 249 00:12:32,490 --> 00:12:35,690 But for this course, I would encourage you to select rebuild project. 250 00:12:35,690 --> 00:12:37,890 So let me do that, I'm going to click rebuild project, 251 00:12:38,690 --> 00:12:41,890 and you can see that the output view opened up down here. 252 00:12:41,890 --> 00:12:45,390 You probably didn't see it, but right before the build happened, 253 00:12:45,390 --> 00:12:46,990 the clean also happened. 254 00:12:46,990 --> 00:12:50,350 And the clean kind of looks like this, I'm going to select build clean project. 255 00:12:50,350 --> 00:12:52,850 And you can see that rm, means remove, 256 00:12:52,850 --> 00:12:56,150 so it's removing all the files in the build debug folder, 257 00:12:56,150 --> 00:12:59,850 which are all the intermediate files, all the binary files, essentially. 258 00:12:59,850 --> 00:13:02,050 So that's the clean. 259 00:13:02,050 --> 00:13:05,850 Now we can come up to build again now remember, let me rebuild it. 260 00:13:06,210 --> 00:13:10,200 Now, when you see a build that includes g++ exe, 261 00:13:10,200 --> 00:13:14,800 that's a real build that's actually building the intermediate files, okay? 262 00:13:14,800 --> 00:13:16,400 I hope this makes sense. 263 00:13:16,400 --> 00:13:19,000 Now if I try to build again just to build. 264 00:13:19,800 --> 00:13:23,000 Notice nothing happened, there was no g++ command in there. 265 00:13:23,000 --> 00:13:25,000 That's because the project was already built. 266 00:13:25,000 --> 00:13:28,300 CodeLite realized I don't need to build it, it's already current. 267 00:13:28,300 --> 00:13:32,300 So my advice is to always use rebuild, okay? 268 00:13:32,300 --> 00:13:35,400 Now we can do it at the project level, the active project, 269 00:13:35,400 --> 00:13:38,900 or we can build the entire workspace, or clean an entire workspace, 270 00:13:38,900 --> 00:13:40,700 or rebuild an entire workspace. 271 00:13:40,700 --> 00:13:43,200 So let me show you how to clean the entire workspace. 272 00:13:44,600 --> 00:13:47,400 You can see that, I just cleaned the workspace, 273 00:13:47,400 --> 00:13:50,400 so it's removing files from 274 00:13:50,400 --> 00:13:54,900 every single project, so you can see project 4, project 2, project 3, project 1. 275 00:13:54,900 --> 00:13:56,900 Now I can rebuild each project. 276 00:13:57,800 --> 00:14:02,000 But we rebuild the workspace, and it's going to build everything 277 00:14:02,000 --> 00:14:04,900 for each project within the workspace. 278 00:14:04,900 --> 00:14:08,500 We're probably not going to use that, I just wanted to show you that it was there. 279 00:14:09,500 --> 00:14:10,800 Okay? Perfect. 280 00:14:10,800 --> 00:14:13,800 Now obviously I can run Project 1 again, 281 00:14:13,800 --> 00:14:18,160 if I make project 4 the active project and I can do that by just double clicking it, 282 00:14:18,160 --> 00:14:19,460 just like that. 283 00:14:20,060 --> 00:14:22,060 And I can run it and go to build and run. 284 00:14:22,960 --> 00:14:25,320 I don't need to build it since, I've built everything 285 00:14:25,320 --> 00:14:27,620 in the workspace already, I'll just execute 286 00:14:27,620 --> 00:14:31,620 and we should see hello from Project 4 and that's exactly what we see. 287 00:14:31,620 --> 00:14:32,980 Great, all right? 288 00:14:32,980 --> 00:14:34,780 So that covers the building, 289 00:14:34,780 --> 00:14:38,140 the debugger I'll cover in a separate video later on in the class. 290 00:14:38,140 --> 00:14:41,640 Let me close this output view down a little bit. 291 00:14:41,640 --> 00:14:43,140 We also have 292 00:14:43,140 --> 00:14:46,500 searching for example, I could search for things within files, 293 00:14:46,500 --> 00:14:47,300 across files. 294 00:14:47,300 --> 00:14:51,700 I know that all these programs have a main in it, so I can find in files 295 00:14:51,700 --> 00:14:54,000 and I can say I want to search for main. 296 00:14:54,800 --> 00:14:58,800 And press find and then the output view again opens up, 297 00:14:58,800 --> 00:15:01,800 this time with the search tab highlighted. 298 00:15:01,800 --> 00:15:03,800 And you can see that I've got a main in 299 00:15:03,800 --> 00:15:06,800 Project 1 and Project 2 and Project 3 and so forth. 300 00:15:06,800 --> 00:15:10,100 And if I want to go to, let's say, Project 1's main, 301 00:15:10,100 --> 00:15:12,300 I could just find Project 1 and click here. 302 00:15:13,300 --> 00:15:15,600 And there it is, Project 1's main. 303 00:15:15,600 --> 00:15:17,500 I can go to Project 2's main 304 00:15:17,500 --> 00:15:20,150 and Project 2 opens up, up here and there it's main. 305 00:15:20,150 --> 00:15:25,150 So it's pretty handy to find things across files in your entire workspace in this case. 306 00:15:26,140 --> 00:15:28,830 You can clear all this by just 307 00:15:28,830 --> 00:15:31,830 clicking right there in that little broom and clear it up. 308 00:15:32,730 --> 00:15:35,930 And that's my output view, It's got several uses, 309 00:15:35,930 --> 00:15:39,290 this build tab is probably the mode we're going to use the most, 310 00:15:39,290 --> 00:15:43,980 and it's probably the most important one, because that'll tell us if there's compiler errors and so forth, 311 00:15:43,980 --> 00:15:45,980 all right?So let me close this back up. 312 00:15:48,180 --> 00:15:51,780 Now if the plugins, let's talk about that for a moment, 313 00:15:51,780 --> 00:15:55,680 there's really two plugins I want you to activate, they may be activated already, 314 00:15:55,680 --> 00:15:57,680 they may not be, but let me show you how to do it. 315 00:15:57,680 --> 00:16:01,560 You go to plugins and manage plugins and let me 316 00:16:01,560 --> 00:16:02,550 close this down here. 317 00:16:02,550 --> 00:16:06,350 To give us a little bit more room, let's go to plugins, manage plugins. 318 00:16:06,850 --> 00:16:10,450 And there's a whole bunch of plugins and plugins are just little external 319 00:16:10,450 --> 00:16:13,750 pieces of code and little programs that CodeLite uses. 320 00:16:13,750 --> 00:16:16,550 So the ones that I want you to check off for sure are 321 00:16:16,550 --> 00:16:19,240 language server plugin, make sure that's checked. 322 00:16:19,240 --> 00:16:22,040 And down here where it says wizards, make sure that's checked, 323 00:16:22,040 --> 00:16:24,040 because we're going to use that later in the course. 324 00:16:24,940 --> 00:16:26,940 That's it, hit okay? 325 00:16:27,440 --> 00:16:31,000 And when you come to plugins, it might ask you to restart. 326 00:16:31,000 --> 00:16:35,400 But you'll see those two plugins here in the language server. 327 00:16:35,400 --> 00:16:40,000 You can basically go to settings and make sure that everything's enabled, It should be by default. 328 00:16:40,800 --> 00:16:44,100 And then you could restart the language server. 329 00:16:45,390 --> 00:16:49,290 And what that does is that helps you do code completion, so as I type, 330 00:16:49,290 --> 00:16:51,980 it's going to help me by helping me complete the code. 331 00:16:51,980 --> 00:16:55,240 For example, if I typed in some variable name here 332 00:16:55,240 --> 00:16:57,540 and again we'll talk all about variable names later. 333 00:16:57,540 --> 00:17:01,040 Let's create an integer called age, let's say my age. 334 00:17:02,040 --> 00:17:03,540 Something like that, 335 00:17:03,540 --> 00:17:05,140 we put a semicolon here, 336 00:17:05,140 --> 00:17:09,130 then later on, if I want to use my age, I can just type my underscore 337 00:17:09,130 --> 00:17:11,730 and it pops it up for me and I can just press tab 338 00:17:11,730 --> 00:17:13,720 and use it, so I don't have to type. 339 00:17:13,720 --> 00:17:17,220 It also allows us, let me delete this. 340 00:17:17,220 --> 00:17:21,579 It also allows us to use some of the C++ keywords and functions so example, 341 00:17:21,579 --> 00:17:23,579 if I wanted to use double, 342 00:17:23,579 --> 00:17:27,180 i could just do that, press tab and create a variable name. 343 00:17:27,180 --> 00:17:29,980 So again, makes it very handy. 344 00:17:29,980 --> 00:17:33,670 It's kind of finicky sometimes, sometimes it wants to work, 345 00:17:33,670 --> 00:17:35,470 sometimes it doesn't want to work. 346 00:17:35,470 --> 00:17:39,160 What I've found is, if it doesn't work, just rebuild. 347 00:17:39,160 --> 00:17:41,760 Rebuild and then it kind of kicks it in. 348 00:17:42,660 --> 00:17:44,660 So, that's the plugins, 349 00:17:44,660 --> 00:17:46,760 the settings, there's tons of settings here. 350 00:17:46,760 --> 00:17:50,120 We've already seen some of the colours and fonts, the preferences, 351 00:17:51,020 --> 00:17:54,520 we've got whether we want to display line numbers over here 352 00:17:54,520 --> 00:17:55,620 in the editor or not. 353 00:17:55,620 --> 00:17:58,420 We can turn that on and off, highlight the current line number like that, 354 00:17:58,420 --> 00:18:00,720 you can see seven is bold. 355 00:18:00,720 --> 00:18:04,980 Again, I just leave all this alone, because the default 356 00:18:04,980 --> 00:18:06,580 settings are pretty good. 357 00:18:07,180 --> 00:18:09,870 I'll close that up, you can look through there, but again don't just 358 00:18:09,870 --> 00:18:13,770 start clicking on things, because your interface is going to get pretty crazy. 359 00:18:13,770 --> 00:18:15,330 So let me just leave that alone. 360 00:18:15,330 --> 00:18:18,330 Then the other thing you're going to see in your code is this little red thing. 361 00:18:18,330 --> 00:18:21,430 And it might be red, it might not be red, depending on the operating system, 362 00:18:21,430 --> 00:18:23,790 but you'll see some kind of little icon here. 363 00:18:23,790 --> 00:18:25,090 Where we can click it. 364 00:18:25,990 --> 00:18:27,590 And it collapses that. 365 00:18:28,490 --> 00:18:30,850 So, you can see that it collapses that. 366 00:18:30,850 --> 00:18:33,840 Now that doesn't look very useful here, but when you've got a lot of 367 00:18:33,840 --> 00:18:36,640 code, let's say you have 500, 600 lines of code. 368 00:18:36,640 --> 00:18:40,240 And you've got parts of your program that you're really not interested in right now, 369 00:18:40,240 --> 00:18:42,040 you're working on a different section. 370 00:18:42,040 --> 00:18:44,040 You can collapse certain sections 371 00:18:44,040 --> 00:18:48,030 to kind of just hide them, sort of it's not really hiding them, because they're there. 372 00:18:48,030 --> 00:18:51,630 But just kind of get them out of my way, right now while I work on this other section. 373 00:18:51,630 --> 00:18:55,730 The code is still there, you can see from the dots that the code is still there 374 00:18:55,730 --> 00:18:57,930 and we can always expand it whenever we like. 375 00:18:59,220 --> 00:19:02,910 Okay, so pretty much covers the basics that I wanted to cover. 376 00:19:02,910 --> 00:19:06,410 Really important, don't forget about view restore layout. 377 00:19:06,410 --> 00:19:08,910 If your layout gets really wonky, 378 00:19:08,910 --> 00:19:12,810 just go back to view and restore your layout and you're good to go. 379 00:19:12,810 --> 00:19:15,810 As far as creating workspaces and creating projects, 380 00:19:15,810 --> 00:19:18,410 we've already done that before in the installation videos, 381 00:19:18,410 --> 00:19:20,410 so that should be pretty straightforward. 382 00:19:20,410 --> 00:19:22,410 If you have a workspace open 383 00:19:22,410 --> 00:19:25,100 and you try to create a new one, it won't let you. 384 00:19:25,100 --> 00:19:29,790 Make sure you close the workspace first and then you're allowed to create one. 385 00:19:29,790 --> 00:19:32,480 So here's a section 19 workspace, 386 00:19:32,480 --> 00:19:34,770 this is a workspace we're going to use later in the course. 387 00:19:34,770 --> 00:19:37,770 Let me open it up to give you an example of 388 00:19:37,770 --> 00:19:40,130 a workspace with a bunch of projects in it. 389 00:19:40,130 --> 00:19:43,130 So you can see Section 19 that's again later on in the course. 390 00:19:43,130 --> 00:19:44,820 This is the section, we're going to use 391 00:19:44,820 --> 00:19:49,080 and this is the section on IO and how to use files and how to do things like that. 392 00:19:49,080 --> 00:19:52,080 So, we've got a lot of different projects in here. 393 00:19:52,580 --> 00:19:53,780 Each one has 394 00:19:53,780 --> 00:19:58,140 a description, main.cpp, and this is some of the code that we'll write later on. 395 00:19:58,140 --> 00:20:01,740 I know it looks maybe a little bit daunting right now, but don't worry, 396 00:20:01,740 --> 00:20:02,640 it'll be fine. 397 00:20:03,140 --> 00:20:04,500 I can close that up. 398 00:20:04,500 --> 00:20:08,800 And in this case, challenge 1 solution is the default project. 399 00:20:08,800 --> 00:20:12,600 Here is the challenge 1 solution, solution. 400 00:20:13,000 --> 00:20:15,300 So there's the code and you can see here, 401 00:20:15,300 --> 00:20:19,100 where it really is useful to use code folding 402 00:20:19,100 --> 00:20:22,600 and fold some of this stuff and kind of get it out of the way. 403 00:20:22,600 --> 00:20:25,300 So for example, there's my main, that's my whole program, right? 404 00:20:25,300 --> 00:20:27,300 But let's say I only want to look at structs. 405 00:20:27,800 --> 00:20:32,000 And I'm only looking at my structure, so they show up really, really cleanly 406 00:20:32,000 --> 00:20:34,800 without going through hundreds and hundreds of lines of code. 407 00:20:35,700 --> 00:20:38,800 In this case, that's my challenge 1 solution, suppose I want to run it. 408 00:20:38,800 --> 00:20:42,600 Well, I'm going to come to build, remember it is the active project, 409 00:20:42,600 --> 00:20:44,100 because it's bold and italicized, 410 00:20:44,100 --> 00:20:45,460 I'm going to go to build. 411 00:20:45,460 --> 00:20:47,460 I'm going to select rebuild project, 412 00:20:47,820 --> 00:20:52,080 you can see my output view down here, It's doing g++ exe. 413 00:20:52,080 --> 00:20:54,440 It's using everything I need to use. 414 00:20:54,440 --> 00:20:58,040 Then I'm going to come to build, run project right there. 415 00:20:59,040 --> 00:21:00,020 Just execute. 416 00:21:01,010 --> 00:21:05,370 I'm going to get a command prompt window and that's the output from this program that we're going to do, 417 00:21:05,370 --> 00:21:06,370 later on in the course. 418 00:21:08,170 --> 00:21:09,670 Okay, so that's it. 419 00:21:09,670 --> 00:21:13,270 This gives you a pretty good feeling for the interface, 420 00:21:13,270 --> 00:21:17,170 the entire CodeLite interface, there's a lot of stuff I didn't cover obviously. 421 00:21:17,170 --> 00:21:20,670 But I'm not going to use any of that stuff that I didn't cover in the course. 422 00:21:20,670 --> 00:21:24,970 IDE as I said, are usually used for very large programs. 423 00:21:24,970 --> 00:21:26,870 But they can also be used for small programs, 424 00:21:26,870 --> 00:21:29,070 we're just not going to use all the bells and whistles. 425 00:21:29,070 --> 00:21:31,270 So you have any questions, please let me know, 426 00:21:31,270 --> 00:21:33,870 and I'll see you in the next video and we'll start coding.