Build + Use static CURL with Visual Studio 2019 or 2017

Поділитися
Вставка
  • Опубліковано 1 сер 2024
  • There are far too few tutorials for this. It took me more than some time to figure out the first time I did it, now that I reinstalled and had to do it again, I thought I'd record the process for those building CURL and using it for the first time.
    Bookmark this video as you will likely return at some stage in the future.
    Download curl: curl.haxx.se/download.html
    Timestamps
    00:00 - Introduction
    00:50 - Setting up Visual Studio 2019 environment
    02:22 - Download CURL
    02:58 - Building x32 Debug & Release
    06:08 - Building x64 Debug & Release
    07:06 - Cleaning up for use
    08:33 - Preparing to add CURL
    09:30 - Explaining 2 methods
    09:50 - Method 1 [For example]
    12:58 - CURL Demo
    13:46 - Method 2 [Better]
    19:55 - CURL Demo 2
    Method 1 code, Method 2 code and Curl Sample Code available here: tcno.co/TroubleChute/info/cur...
    Why the external link? UA-cam does not allow greater than and smaller than brackets in video descriptions.
    -----------------------------
    💸 Found this useful? Help me make more! Support me by becoming a member: / @troublechute
    -----------------------------
    💸 Direct donations via Ko-Fi: ko-fi.com/TCNOco
    💬 Discuss video & Suggest (Discord): s.tcno.co/Discord
    👉 Game guides & Simple tips: / troublechutebasics
    🌐 Website: tcno.co
    📧 Need voice overs done? Business query? Contact my business email: TroubleChute (at) tcno.co
    Everything in this video is my personal opinion and experience, and should not be considered professional advice. Always do your own research and make sure what you're doing is safe.

КОМЕНТАРІ • 145

  • @dingFAching
    @dingFAching 4 роки тому +36

    This is one of the greatest UA-cam tutorials of all time. Subbed.

  • @georgesealy4706
    @georgesealy4706 3 роки тому

    Thanks so much for this detailed setup with cURL and VS. It worked great. I had tried previously to compile and use cURL using Eclipse C++, but I kept running into roadblocks. I couldn't find detailed documentation to get past the issues. But I have also used VS for many years, so I switched to your method. Now I can get back to the actual project I want to do.

  • @sophiacristina
    @sophiacristina 4 роки тому +11

    Thank you very much for the video!
    ALSO, i wanted to tell people that:
    IF YOUR PROJECT IN VC BEGINS WITH "include "pch.h""
    THEN, you'll have to "define CURL_STATICLIB" AFTER the include of "pch.h", that is what means the warning that says that CURL_STATICLIB is not linked because some other pre-compiled inclusion.
    This was being a headache to me, a simple change in the order fixed!

  • @digital_human
    @digital_human 4 роки тому

    Sometimes its so easy but it you read to much you get messed up. This is just perfect and spot on! Thanks for this man!

  • @7essica
    @7essica 4 роки тому +5

    Thank you so much! You're my lifesaver! I couldn't find any useful information about how to integrate cURL lib into C++ project but your video

  • @wonderwaffle4058
    @wonderwaffle4058 Рік тому

    THANK YOU! I was suffering for the whole day trying to compile curlib code with makefiles which just DON"T WORK on my laptop and after all of that, you, the saviour, came and ended my day with a success. Thank you a lot!

    • @jackmurphy8696
      @jackmurphy8696 Рік тому

      Did you try using nuget package manager in visual studio as well? I tried that and it does not link properly. I was so pissed.

  • @ny3atuy6egemot
    @ny3atuy6egemot 7 місяців тому +1

    Love c++, 20 minute guide to add the most common library of the world

  • @nickolayivanov670
    @nickolayivanov670 5 місяців тому

    ThanksEven I, who don’t know English well, understand everything. I follow your advice and everything works out for me. Before this, I suffered all day, and no one could explain to me so clearly how to compile someone else’s project. Thanks, really

  • @bbianchi6720
    @bbianchi6720 4 роки тому +1

    you are a great! You have clearly resolved the installation that seemed impossible to me !!! Thanks so much.

  • @vali20vali20vali20
    @vali20vali20vali20 Рік тому +1

    The fact that you need a tutorial to compile this bloody thing... Thanks for the video. Struggled for ages to do it using cmake, only to get endless errors when using "-DCURL_STATIC_CRT=ON", like "error C1189: #error: MSVC 6.0 requires "February 2003 Platform SDK"", "error C1083: Cannot open include
    file: 'sys/time.h': No such file or directory" and non-sense like that. This video finally saved me. I wonder why they can't post proper instructions like these on the project page. Not everyone has the luxury of using Linux everywhere.

  • @SSArchitecture
    @SSArchitecture 4 роки тому +1

    This is well job done. Best and clear way to understand and make run CURL in VS.

  • @kubakakauko
    @kubakakauko 4 роки тому +3

    God bless you my dude. I was struggling with this stuff for ages

    • @georgesealy4706
      @georgesealy4706 3 роки тому

      Yes, it is frustrating how poor the documentation is regarding these things. You end up spending gobs of time just trying to compile and use the library, let alone do that actual project.

  • @Maniclout
    @Maniclout 2 роки тому

    Oh my god finally somebody who explains the setup of the libraries. As a noob I thank you so much.

  • @ZackOfAllTrad3s
    @ZackOfAllTrad3s 2 роки тому

    Thank you so much!! Ive spent hours trying to get this to work, I wasnt even close

  • @JFP-Knives
    @JFP-Knives 3 роки тому

    Thumbs up! Finally it works! Great job and thanks a lot!

  • @osvaldoenriquez6488
    @osvaldoenriquez6488 3 роки тому

    Super helpful video, thank you so much for making it! :)

  • @MirakXfire
    @MirakXfire 3 роки тому

    you saved me bro i passed two days trying to install the curl library

  • @scottmandel6536
    @scottmandel6536 3 роки тому

    Many thanks for a very, very helpful video!

  • @ArunkumarUvaraj
    @ArunkumarUvaraj 2 роки тому

    This is really a great video... It works awesome for me !!!

  • @xrishabh
    @xrishabh 2 роки тому

    Thanks for making this awesome video !!

  • @user-gw1sy6mu3i
    @user-gw1sy6mu3i 2 роки тому

    Thank you very much!!! I love you! It helped me a lot💜

  • @idkidk9204
    @idkidk9204 3 роки тому

    I got saved by this man after 5h of research :D

  • @leandroneves8496
    @leandroneves8496 Рік тому

    Great Video! Quite professional, thanks a lot!

  • @Denis-sl1nn
    @Denis-sl1nn 2 роки тому

    Thank you some much for this amazing video.

  • @pathuxtv6617
    @pathuxtv6617 4 роки тому

    Incredible tutorial thank you so much

  • @davidcraig8106
    @davidcraig8106 3 роки тому

    When adding include dirs, click 3 dots on the right, then click macros at the bottom. When adding the include directory, you can create one string for all configurations something like this (need to use x86 instead of x32 when naming the dirs)
    \$(PlatformShortName) $(Configuration)\include\

  • @moriscnam
    @moriscnam Рік тому

    This video helped me a lot. Thank you

  • @portera1622
    @portera1622 Рік тому

    this was really helpful, thanks!

  • @abdullahtoqeer2009
    @abdullahtoqeer2009 3 роки тому

    Very great tutorial.. Thankyou

  • @Nothingtosee55
    @Nothingtosee55 3 роки тому +1

    thank you very fucking much i been looking for this since 2 months no joke ! finally found your video thank you so much dude

  • @GiorgiAptsiauriX
    @GiorgiAptsiauriX 4 роки тому

    Thanks. Deserved my sub.

  • @gabyawad624
    @gabyawad624 4 роки тому

    Thank You very much awesome video

  • @carrast
    @carrast 7 місяців тому

    excellent video, thanks a lot!!!

  • @d6rkv872
    @d6rkv872 4 роки тому

    Good guide. Thx dude!

  • @alfredoniz7972
    @alfredoniz7972 4 роки тому +3

    I have ADD. My desktop is a complete mess. Thank you for the organization tips.

  • @mooseminddayan4650
    @mooseminddayan4650 2 роки тому

    Thank you. Great Video.
    I wish you could zoom in more when you make these videos. That would be extremely helpful. Thank you.

  • @user-ls5xo3xc5y
    @user-ls5xo3xc5y 6 місяців тому

    Thanks. Very helpful

  • @williamweidner5425
    @williamweidner5425 4 роки тому +1

    excellent tutorial video! 5 star rating from me! clear, concise, gets right to the point AND can be reapplied in earlier versions like VS 2017!
    question: at 13:49, is hello from the internet sort of a default string built into the code that generates by default before you start using curl?''
    also, since I'm new to this, what would you recommend as a next step tutorial from this point?

    • @Kid420
      @Kid420 3 роки тому

      The - “Hello from the internet!” string is a string that he downloaded from the web, with the help of curl.

  • @mr.president6922
    @mr.president6922 Рік тому

    thank you bro you are life saver

  • @awaom311
    @awaom311 8 місяців тому

    It's work correctly with discord api, Thank you! for your tutorial.

  • @LimaSentosa
    @LimaSentosa 7 місяців тому

    Thank you very much !

  • @MrImcu
    @MrImcu 3 роки тому

    Thank you so much. ❤️️❤️️❤️️

  • @Tech-Gamer444
    @Tech-Gamer444 3 роки тому

    Is there a way that you can show an example of this in C programming?
    I was trying to practice on this language again before going to C++ and wanted to know if you can help with this?
    Thanks.

  • @EngElshaterHassan
    @EngElshaterHassan Рік тому

    you are awsome , really thank you

  • @MultiRoberth123
    @MultiRoberth123 2 роки тому +3

    followed all your steps, but if building for x64 (either release or debug), I get unresolved external symbol errors in curl_easy_init :l

  • @plyoox
    @plyoox 2 роки тому

    you're my hero

  • @SwillMith16
    @SwillMith16 2 роки тому

    Is this installations the same for other libraries? every library I've tried using seems to have different setup process so I have no idea how to get started with them if I don't watch these kind of tutorials. Some of the README files are useless aswell

  • @FreeDomSy-nk9ue
    @FreeDomSy-nk9ue 3 роки тому

    You're a life saver

  • @Roman-bw9gh
    @Roman-bw9gh Рік тому

    Thanks a lot man !

  • @freetimeproject7
    @freetimeproject7 4 роки тому

    good afternoon. When I try to access the ftp or sftp server, it displays error code 1. Tell me, how can I enable these protocols?

  • @leotomarere8318
    @leotomarere8318 Рік тому

    what happens if in visual studio 2019, parameter "vc=16" is changed to "vc=6" or "vc=15". Does that mean being compatible with lesser visual studio?

  • @TEMPERxNIGHT
    @TEMPERxNIGHT 3 роки тому

    Does this work on older versions such as 2015?

  • @abcjkl7410
    @abcjkl7410 3 роки тому

    legend!!!!

  • @XiSlow
    @XiSlow 3 роки тому

    Thank you!

  • @dagmacintosh6856
    @dagmacintosh6856 4 роки тому

    can you make a tutorial for using CPR(curl for people) as static library in visual studio.

  • @lotusdev3427
    @lotusdev3427 3 роки тому

    Thank you so much

  • @windowsbuilderthegreat3121
    @windowsbuilderthegreat3121 Рік тому

    how do you set the compiler to make it use visual studio 2017 for windows xp toolset

  • @msm2570
    @msm2570 11 місяців тому

    Thanks so much!!!

  • @MrHerhor67
    @MrHerhor67 4 роки тому

    I somehow got curl to work on my old PC like a year or two ago, with #include , is it still possible? And also I remember much less work, but maybe I only had one version...
    One thing I found; all headers in all versions are the same, so only one copy is needed.
    Okay, did some name fiddling and got it to work with just two changes needed in properties:
    Release, all platforms: `Normaliz.lib;Ws2_32.lib;Wldap32.lib;Crypt32.lib;advapi32.lib;$(SolutionDir)curl\$(PlatformShortName)release.lib`
    Debug, all platforms: `Normaliz.lib;Ws2_32.lib;Wldap32.lib;Crypt32.lib;advapi32.lib;$(SolutionDir)curl\$(PlatformShortName)debug.lib`

  • @GameBacardi
    @GameBacardi 4 роки тому

    Thank you

  • @timothybodin8478
    @timothybodin8478 2 роки тому

    I ran it with a simpler example. It worked with that....so maybe the problem is simply with your trial code....your test may conflict with VS2022(?)

  • @user-md7yf5bm8z
    @user-md7yf5bm8z 2 роки тому

    thank u! you really helped to me!

    • @maratfatkulov4993
      @maratfatkulov4993 2 роки тому

      ты для vs 2022 делал? если да, то подскажи, какие MFC ты устанавливал, "для новейшей версии v143" или как у него v142

    • @maratfatkulov4993
      @maratfatkulov4993 Рік тому

      @@shkshk8563 да

    • @maratfatkulov4993
      @maratfatkulov4993 Рік тому

      @@shkshk8563 начни делать 1 в 1 по этому гайду, делая каждую его секунду и получится

  • @ObilanCenobi
    @ObilanCenobi 4 роки тому

    3:51 i have a problem my x86 Native Tools... dont want to open a place where i have curl
    and i se something like that:
    b:\C++ Visual Studio>
    i should see my path C:\User....
    what i can do to repare this?

    • @MrHerhor67
      @MrHerhor67 3 роки тому

      Just like in regular console; just type the disk letter where you want to go, and a colon, eg. `C:`.
      You can even do it after CDing to the curl dir.

  • @zawarudo1818
    @zawarudo1818 Рік тому

    awesome

  • @maroso_
    @maroso_ 2 роки тому

    thank you

  • @giulianoferrara3159
    @giulianoferrara3159 Рік тому

    Thanks man

  • @user-hk3rh1zp6t
    @user-hk3rh1zp6t 2 роки тому

    Suuuuuper!

  • @harisundhar2876
    @harisundhar2876 Рік тому

    I'm getting unresolved external symbol errors LNK2001. I followed exactly the same procedure.

  • @matejsubrt8357
    @matejsubrt8357 5 місяців тому

    🙌🙌

  • @facundoconci4341
    @facundoconci4341 2 роки тому

    It works to me

  • @TheUpsArinUpsA
    @TheUpsArinUpsA 3 роки тому

    Thx you!

  • @mmddyyyy-his
    @mmddyyyy-his 3 роки тому

    Do c++ have package manager like in javascript, doing such a thing can be done in seconds like:
    npm install curl

  • @meanjellybean8963
    @meanjellybean8963 Рік тому

    i am having an issue with SOCKADDR_STORAGE in one of the LIBs. how can i get past this issue? unlink the LIB?

  • @MusicAMG
    @MusicAMG 6 місяців тому +1

    Will this work with VS 2022? The files I am getting are not named the same.. after I do the build for x64.. example "libcurl-vc17-x64-debug-static-ipv6-sspi-schannel-obj-curl" or am I on the right track here?

    • @Vertigo3858
      @Vertigo3858 4 місяці тому

      Same here

    • @MusicAMG
      @MusicAMG 4 місяці тому

      @@Vertigo3858 I got it working, but, I'd have to look at it again to see how.

  • @japanboy31415
    @japanboy31415 Рік тому

    im sorry but do i have to this everytime that i want to use an api though ?

  • @justinorji6479
    @justinorji6479 3 місяці тому

    Hey, does this work for CMake projects? I've been trying to find the properties page for an hour now and I can't find it

  • @wtfman468
    @wtfman468 2 роки тому +1

    I am getting unresolved external symbol errors, tf should I do

  • @RubikoOne
    @RubikoOne 2 роки тому

    Thanks

  • @bdcreation1563
    @bdcreation1563 6 місяців тому +1

    i use visual studio code(vscode version 1.85.2) can u send me a process for this?

  • @guillaumemuc8753
    @guillaumemuc8753 3 роки тому

    thx you !

  • @sdeth9558
    @sdeth9558 2 роки тому

    NMAKE : fatal error U1081
    How can i fix it?

  • @chasingdaydreams2788
    @chasingdaydreams2788 2 роки тому +3

    Doesnt work for VS 2022

  • @user-ed3bz6zf1e
    @user-ed3bz6zf1e 4 роки тому +2

    I have a visual studio 2019 with x86.(differ your one.) I was following you, but got a problem with 11:13 in #include "curl/curl.h". I got a red line under #include. Would you help me?

  • @giorgioguglielmone6528
    @giorgioguglielmone6528 Рік тому +1

    Great tutorial and very accurate. Following your steps and using current VS C++ 2022 and LibCurl 8.0.1 versions when I compile for x86 debug, I get folders libcurl-vc17-x86-debug-static-ipv6-sspi-schannel etc... and not them ..sspi-winssl . Are they all the same or do we need to give some other compilation parameter than what you give ? I compiled your example as well and it seems to work just fine. The only thing that does not find the file tcno.co/hello.txt, but the tecno.co page finds it and replies with the classic "404 Not Found"

    • @TroubleChute
      @TroubleChute  Рік тому +1

      I'm sure I deleted this file a whole ago, whoops!

  • @kentjordan4658
    @kentjordan4658 4 роки тому

    Make a video more about cURL and C++ please.

  • @jackmurphy8696
    @jackmurphy8696 Рік тому

    Followed the video to a tee. Could not get it to work. Gives me a 18 of unresolved external symbols. When I try to download it through nuget package manager it sees the library also but then gives me 4 unresolved symbols as well. How does any programmer complete anything? Every project I try and work on is like this. Can''t even actually get to my own code

  • @allerek3287
    @allerek3287 3 роки тому

    The problem is, even tho i even used your code 1:1, built just like you, i still end with .dll needed. :(

  • @vladmaiorov1072
    @vladmaiorov1072 2 роки тому

    I've installed almost every MFC, and it still doesn't work, because there's no MFC for it

  • @jonleinenaotamendi7510
    @jonleinenaotamendi7510 3 роки тому

    Man it can't be so complicated, i spent 2 whole days looking for a solution. If anyone knows of an easier way to do this so the main.cpp can be executed from cmd or powershell I'll be forever thankful to them. Great video anyways!

    • @jackmurphy8696
      @jackmurphy8696 Рік тому

      Do you want to run curl commands through the console or do you want to execute your program from the console?>

  • @codinggene2272
    @codinggene2272 2 роки тому +2

    1>test.obj : error LNK2019: unresolved external symbol __imp_curl_easy_init referenced in function main
    1>test.obj : error LNK2019: unresolved external symbol __imp_curl_easy_setopt referenced in function main
    1>test.obj : error LNK2019: unresolved external symbol __imp_curl_easy_perform referenced in function main
    1>test.obj : error LNK2019: unresolved external symbol __imp_curl_easy_cleanup referenced in function main
    In my case, this error resolved by using second method(improt with VS)

  • @Avighna
    @Avighna 2 роки тому

    Even after doing all of this, my program still has undefined references. How do I fix this?
    1>test.obj : error LNK2019: unresolved external symbol __imp_curl_easy_init referenced in function main
    1>test.obj : error LNK2019: unresolved external symbol __imp_curl_easy_setopt referenced in function main
    1>test.obj : error LNK2019: unresolved external symbol __imp_curl_easy_perform referenced in function main
    1>test.obj : error LNK2019: unresolved external symbol __imp_curl_easy_cleanup referenced in function main

  • @coolcsgo
    @coolcsgo 3 роки тому

    I still get the .dll

  • @ButIfWeSurvive-WeHereInTheEnd

    thankssssssssssssssssssssssssssssssssssss youuuuuuu!!!!!!!!!!!

  • @AndriiMytroshyn
    @AndriiMytroshyn 4 роки тому

    video help to link curl

  • @donovantheprogrammer2989
    @donovantheprogrammer2989 4 роки тому

    Wow this is alot of steps.. SFML didn't have nearly has many steps as this. I foolishly thought at libraries were created equal....

  • @ISupriyaSrikanth
    @ISupriyaSrikanth 4 місяці тому

    This solved me that GPT failed to 🙂

  • @maxim25o2
    @maxim25o2 3 роки тому +1

    omg, really?? its more playing with ID rather programing it self. Now I know why many peoples don't use IDE and they compile programs from terminal

  • @vv720
    @vv720 3 роки тому

    Hey Why do you?

  • @anshulmittal4805
    @anshulmittal4805 3 роки тому

    I am trying to use this method in console application as well as win32 dll. In console application it is working fine but in Win32 dll i get error "LNK2001 unresolved external symbol __imp_curl_easy_init". Can you provide solution for this?

  • @asd99579
    @asd99579 3 роки тому

    Just dump VS altogether. It is maintained so bad that you can't make use of tutorials like this. Components required are long time gone from VS and have multiple nesting dependencies that are removed from Microsoft websites as well.