CMake Tutorial EP 2 | Libraries | Installing | Pairing with Executables | RE-DONE!

  Рет қаралды 72,448

Code, Tech, and Tutorials

Code, Tech, and Tutorials

Жыл бұрын

original ep2 - • CMake Tutorial EP 2 | ...
full CMake playlist: • CMake Tutorial EP 1 | ...

Пікірлер: 63
@VictorAndScience
@VictorAndScience Жыл бұрын
Came to learn about CMake, and I ended up learning all the c++ basics I've been missing my entire life. Thanks, mate.
@elwinjyothis5388
@elwinjyothis5388 4 ай бұрын
I was frustrated with external libraries in C/C++ for a very very long time. I even stopped working with C/C++ at a point. Just finished this video, now I can build, link and install any external libraries or open source tools out there in the internet. I finally understand whats going under the hood. Thank you soo much!!!!
@darrenfinch1935
@darrenfinch1935 8 ай бұрын
As someone who has been trying to learn about CMake, this tutorial series is super helpful and criminally underrated. Thanks!
@takshpanchal8456
@takshpanchal8456 8 ай бұрын
++
@archibald-yc5le
@archibald-yc5le Жыл бұрын
Taught me everything I need about CMake, the best and the most practical tutorial there is. Thank you so much, you've gained a happy subscriber
@shouryagoel6481
@shouryagoel6481 10 ай бұрын
Literally the best hands on tutorial on CMake you will ever find.
@yasin_karaaslan
@yasin_karaaslan 8 күн бұрын
Idk why but the tone you have makes me more focused. Thanks
@camerondavis731
@camerondavis731 Жыл бұрын
I started building a large BASH program last month, and the harder it gets to manage, the more I'm starting to want to use C++ instead. In you come just a few weeks before with the exact tutorial that I needed to convert all my shell scripts to a structured cpp project. Thanks a lot!
@TheIpicon
@TheIpicon 15 күн бұрын
literally goated. I've been trying to find a normal humanized explanation on how to link libraries in different places for the past 3 HOURS with no success with no luck until I got to your video!
@gru74ik
@gru74ik Жыл бұрын
Thank you very much for this brilliant series! I found it very helpful. Great job done! Keep rocking!
@Kirfx
@Kirfx 5 ай бұрын
Thank you! I've been avoiding C/C++ very long time because of build system complexity. You make it clear.
@SebastianSastre
@SebastianSastre Жыл бұрын
Very useful. Thanks a lot for taking the time to record and share this!
@mjovanc
@mjovanc Жыл бұрын
This is awesome stuff dude. Just exactly what I needed to learn right now.
@satyamraj2779
@satyamraj2779 Ай бұрын
Thank you for your invaluable lecture. I learned a great deal from this video. To capture the return value, try printing it using the command "echo $?".
@jacksont8424
@jacksont8424 Жыл бұрын
These tutorials are great! Thanks for making them!
@karaliseklers2531
@karaliseklers2531 Жыл бұрын
I like almost any content you create for us
@samuelwanjare7193
@samuelwanjare7193 2 ай бұрын
Made my first installable c++ programme today. Thanks to you. I've been learning make and cmake lately.
@user-hk9yw4qr4h
@user-hk9yw4qr4h 4 ай бұрын
Love your videos, and really digging your logo!
@user-kt8nc4xd1u
@user-kt8nc4xd1u Жыл бұрын
Really great contents! Thanks for creating this video
@danibarack552
@danibarack552 8 ай бұрын
my man the info is useful and I'm glad that people enjoy learning a lot but please get to the point lmao. I just want to learn how to create a library and link it to a project in cmake, I don't need to hear a whole tangent on namespaces
@dudedudedudedude5381
@dudedudedudedude5381 17 күн бұрын
Thanks for your knowledge!
@osbornghampson3105
@osbornghampson3105 Жыл бұрын
I think you can return the exit value of the main function by typing echo $? on linux at 27:34
@nandunarayanan
@nandunarayanan 11 ай бұрын
you did not remove the relative path inclusion of adder.h in main.cpp, instead you could have add #include using namespace mearlymath;
@Zero-fl6wf
@Zero-fl6wf Жыл бұрын
SEE ORIGINAL EPISODE 2, in episode 3 you would need what you see in original episode 2
@xayanmusic3627
@xayanmusic3627 2 ай бұрын
Very good tutorial you earned another subscriber and a like ! Thank you zues
@SuperflyJon
@SuperflyJon Жыл бұрын
Given that in this example we are building the library and the executable adding a add_subdirectory() function to the parent CMakeLists.txt file will chain the projects. Then building the executable will build the library as well
@nubdevice4412
@nubdevice4412 Жыл бұрын
Here to stomp the comp... 💯
@Yusufbek-gp2qp
@Yusufbek-gp2qp Ай бұрын
Thank you!!!
@caglayandokme
@caglayandokme 2 ай бұрын
Thanks for your time to teach people something. Just a little feedback: In the previous video, you were using VS Code and I think it was easier to understand the file hierarchy. Also, not seeing the current directory in the command line prompt confuses things for us :)
@gabemorris1231
@gabemorris1231 7 ай бұрын
Please "sudo apt install tree" and run the tree command from time to time. It'll make it easier for us to see the file structure, but thanks for the vid.
@Autotrope
@Autotrope 2 ай бұрын
-f shouldn't be needed on rm -R. It doesn't do what some people assume it does, and what it does do is hide some error messages that may indicate you made a mistake typing the command. If the files you are deleting exist and your user has permissions on both the files and their containing directories, rm -R (or just rm -r) should work fine
@albinpaul3429
@albinpaul3429 Жыл бұрын
echo $? for getting the exit status of program. Thanks for the tutorial.
@lengors7327
@lengors7327 Жыл бұрын
Btw, you made the include file available but you did not change the include directive, its still using a relative path
@MurderByProxy
@MurderByProxy 8 ай бұрын
I was about to make a comment the other day about how videos seem to me in numerical order but not in chronological… took me a while to realize it was indeed the case
@Ashish_singh_dev
@Ashish_singh_dev 7 ай бұрын
17:24 also add adder.h in add_library(mearlymath adder.cpp adder.h) // those who are getting errors
@teuton8363
@teuton8363 11 ай бұрын
Thanks!
@songzh2911
@songzh2911 Жыл бұрын
echo $? will show 5
@LascelleMckenzie
@LascelleMckenzie Жыл бұрын
Thanks alot
@double-lung7364
@double-lung7364 Жыл бұрын
Thanks
@kartikpodugu
@kartikpodugu Жыл бұрын
unable to do same things in cmake 3.10.2
@ns50350
@ns50350 8 ай бұрын
where can we find trimerdemo and trim file
@minhajsixbyte
@minhajsixbyte 4 ай бұрын
Hi, 27:47 echo $? to get the last return value. Thanks!
@azeddinfaouzi8126
@azeddinfaouzi8126 8 ай бұрын
Amazing, maybe a little bit of zoom on the code, content stays perfect :] Thank you
@nim9441
@nim9441 Жыл бұрын
Im a total newb in cmake and thanks for the video. I have some questions. 1. 00:26:56 In my case this didn't work and cmake gives me an error like this: /usr/bin/ld: cannot find -lmearlymath. So I erased target_link_directories(testsome PRIVATE ${CMAKE_SOURCE_DIR}/../../SomeLibDemo/cpp/build/) and replaced target link lib with target_link_libraries(testsome ${CMAKE_SOURCE_DIR}/../../SomeLibDemo/cpp/build/libmealymath.a) and this worked. Why is that /usr/bin/ld: cannot find -lmearlymath error popuping? 2. 00:33:30 my workspace shows up with this cmake error: install TARGETS given unknown argument "include". I get the meaning of DESTINATION and PUBLIC_HEADER from the offical docs, but what is lib and include?
@tadashi_hamada
@tadashi_hamada 8 ай бұрын
I had same issue. It was because i ran "make" instead of "sudo make install"
@RyanJensenEE
@RyanJensenEE Жыл бұрын
9:00 at the drop of a dime. Haha. I'm going to use that one.
@testtest-ip3lu
@testtest-ip3lu 6 ай бұрын
I really don't like the cmake thing , still can't compile a simple project . cmake also need the so file start with `lib`. And there are so many similar command make people confused. I really hope rust and cargo replace all those cmake and cpp things
@ilyalevin123
@ilyalevin123 Жыл бұрын
27:50 "echo $?" or "echo $status" for csh
@teuton8363
@teuton8363 11 ай бұрын
Well it's fundamentally wrong what he is doing. The return value of a program indicates the status (negative values => not successful).
@jonasprintzen9508
@jonasprintzen9508 9 ай бұрын
I suggest adopting "Solve one problem Well", by sticking with talking about cmake. No Linux-commands, no C/C++. it's a better way to keep it short. Returned value from a command: echo $?.. Try 'false;echo $?;true;echo $?' You really shouldn't create confusion about which folder you are in. Let the prompt show!
@lengors7327
@lengors7327 Жыл бұрын
If you say definition all the time than, eventually, you will be right 😅
@florentcastelli
@florentcastelli 8 ай бұрын
Have you tested your project with CMake 2.8? No. So stop claiming it's the required version and use something current. Then you won't have to worry about bumping the minimum required version each time you want to use a feature.
@shifureisaikyou2055
@shifureisaikyou2055 Жыл бұрын
The original was easier to follow, you mix things that are linux usage related thats not too important for cmake
@tunichtgut5285
@tunichtgut5285 Жыл бұрын
CMake generated Makefiles are artificially long - you could typically throw out more than 90% of its content. A handwritten Makefile for such a simple example would also only consist of a few lines. Thing is that handwritten Makefiles require you to specify all the dependencies and get all commands right for e.g. building a library. What I don't like about cmake: there is a lot of black magic happening behind the scenes. This discomfits me. Same is true for GUI vs command line.
@5374seth
@5374seth 2 ай бұрын
A hammer doesn't tell you how a nail works, neither does CMake(or other build systems) tell you how the C++ building process works. C++ is just a forever-mess. CMake helps to ease that mess by abstracting away whatever specific functionally-equivalent syntactical idiosyncrasies your theoretical build system contains. I see CMake, and tools like it, as necessary evils in the hellscape that is the land of decentralized implementations of languages and their tools, ie the C++ ecosystem.
@ankushroy1729
@ankushroy1729 3 ай бұрын
5:18 that's kinda misleading and wrong, you don't need 2 hundred lines of Makefile to compile a programme, most of the stuff cmake puts into makefile are not useful for simple projects and moreover are a bloat imo
@gittesilberglarsen1262
@gittesilberglarsen1262 3 ай бұрын
Please please - this music overlay is execively annoying!
@typicalIsraeli
@typicalIsraeli 9 ай бұрын
I'm sorry, this tutorial is too "all over the place" i.e. not concise. The crucial aspects could have been covered in 10m - 15m. Video quality is low, even at 1080p (doesn't seem sharp), and the text editor is way too small. Learning C++ tricks is not the topic, tutorials should be focused.
@Alperic27
@Alperic27 29 күн бұрын
ya just have no clue what cmake really is …. 🤦‍♂️🤦‍♂️🤦‍♂️🤦‍♂️🤦‍♂️🤦‍♂️
@SirWrexes
@SirWrexes 27 күн бұрын
🤓
@satendrakushwaha8795
@satendrakushwaha8795 10 ай бұрын
Thanks
CMake Tutorial EP 3 | Git Submodules (adding glfw windowing library example)
21:51
Code, Tech, and Tutorials
Рет қаралды 82 М.
Heartwarming: Stranger Saves Puppy from Hot Car #shorts
00:22
Fabiosa Best Lifehacks
Рет қаралды 14 МЛН
ИРИНА КАЙРАТОВНА - АЙДАХАР (БЕКА) [MV]
02:51
ГОСТ ENTERTAINMENT
Рет қаралды 9 МЛН
The child was abused by the clown#Short #Officer Rabbit #angel
00:55
兔子警官
Рет қаралды 22 МЛН
BGFX renderer C API experiments
0:29
chriscchrisc
Рет қаралды 670
Linux - Storage Basics
15:49
x80nix
Рет қаралды 473
How to run C program in command prompt
0:58
Coding is Love
Рет қаралды 244 М.
How Fast Can You Throw a Car in Poly Bridge 3?
15:06
Reid Captain
Рет қаралды 28 М.
como INSTALAR VCPKG para VISUAL STUDIO code
3:01
IsmaelRR
Рет қаралды 1 М.
Неразрушаемый смартфон
1:00
Status
Рет қаралды 2,3 МЛН
Как слушать музыку с помощью чека?
0:36