Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to compile using CodeBlocks

Tags:

c++

codeblocks

I download LibCurl from http://curl.haxx.se/download.html (zip type), after I extract, I notice there is Include and Lib folder that has source codes, so I copy those to CodeBlocks project and include it, however when I build it show error

fatal error: curl/curlbuild.h: No such file or directory

The file is inside Include folder and I have included in my project

This is the project structure I create to compile LibCurl

I am new in C++ and using CodeBlocks, I plan to compile the LibCurl library into static lib file and include in my project, how do I do it? Please help, since the LibCurl by default only come with dsw Microsoft Visual C++ project file and I need to compile it into CodeBlocks (GNU GCC)

like image 950
John Kenedy Avatar asked Jul 03 '26 21:07

John Kenedy


1 Answers

According to the docs/INSTALL file in CURL's source archive, you should build CURL from the command line. If you are using MinGW (bundled with CodeBlocks), you need to make sure the MinGW bin directory is in your PATH variable (set PATH=<path_to_mingw>\bin;%PATH%) and then run mingw32-make mingw32 in CURL's root directory

like image 128
nspacestd Avatar answered Jul 06 '26 11:07

nspacestd



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!