problem in curl .

How install curl in codeblocks

Dawnload Link : https://curl.se/windows/
Last edited on
Hello Hawlong,

Dev C++ is very old and outdated and no longer supported. Consider upgrading your IDE to maybe Code::Blocks of 1 of the MSVS Community versions, 2017 or 2019. All are free IDE and better supported with updates.

I have not used Curl, but I would guess that there a ".h" header file. This only describes the functions where the ".dll" file contains the actual functions.

You will need both to make Curl work, I believe.

Andy
some (most? all? ) dll may have a .lib file.
you link with the .h and .lib, and run the program with the .dll in a path the program can see.

some libraries, you must compile first. I do not know about this one, but I do know its a very popular one and that there should be some instructions.
Last edited on
Handy Andy

Thanks for answer ,
i install codeblocks now how can install curl ?

jonnin

Thanks for answer ,
Not found any file .lib
Dawnload Link : https://curl.se/windows/
Hello Hawlong,


i install codeblocks now how can install curl

Download Link : https://curl.se/windows/


The link looks like a good start. From there just choose your platform, 64 bit or 32 bit, and follow the instructions.

That is the best I can do for now since I have not used Curl.

Andy
I took a drive by of the download and there is a .lib folder with .a files in it. That is unixism for .lib ..

and the faq, how to get it working from a simplified level:

1. copy a suitable lib/config-*.h file as a start to lib/config-[youros].h

2. edit lib/config-[youros].h to match your OS and setup

3. edit lib/curl_setup.h to include config-[youros].h when your OS is
detected by the preprocessor, in the style others already exist

4. compile lib/*.c and make them into a library

I think you are going to eventually need to either build or find a library file... but I have been wrong before ... keep reading the instructions and see if you agree...
Handy Andy

okay , Thanks for help <3


jonnin

i'm sorry I did not understand anything because I am a beginner
i have 3 folder after dawnload curl
1- bin
2- lib
3-include
where do I start
@thmm, those codeblocks install directions are nice, even though the stackoverflow topic is over 9 years old. The current cURL version isn't 7.50 as mentioned in the article, it's 7.78.

A shame some people would want to download 7.50. :(
I thought the installation might still be the same.
I'd bet on the installation process being the same or similar, the basic IDE user interface hasn't changed substantially.

I was simply pointing out that some people wouldn't be able to adapt to any change, including the referenced cURL version. I've hit that particular "wall" when trying to help others.
Last edited on
thmm
https://stackoverflow.com/questions/8962611/how-do-i-include-curl-library-in-my-c-project-in-code-blocks-windows

i got error
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
||=== Build: Debug in tests (compiler: GNU GCC Compiler) ===|
c:\mingw\bin\..\lib\gcc\mingw32\9.2.0\..\..\..\..\mingw32\bin\ld.exe: lib\libcurl.a(hsts.o)|| undefined reference to `__mingw_vsscanf'|
c:\mingw\bin\..\lib\gcc\mingw32\9.2.0\..\..\..\..\mingw32\bin\ld.exe: lib\libcurl.a(http2.o)|| undefined reference to `nghttp2_version'|
c:\mingw\bin\..\lib\gcc\mingw32\9.2.0\..\..\..\..\mingw32\bin\ld.exe: lib\libcurl.a(http2.o)|| undefined reference to `nghttp2_submit_rst_stream'|
c:\mingw\bin\..\lib\gcc\mingw32\9.2.0\..\..\..\..\mingw32\bin\ld.exe: lib\libcurl.a(http2.o)|| undefined reference to `nghttp2_session_send'|
c:\mingw\bin\..\lib\gcc\mingw32\9.2.0\..\..\..\..\mingw32\bin\ld.exe: lib\libcurl.a(http2.o)|| undefined reference to `nghttp2_session_set_stream_user_data'|
c:\mingw\bin\..\lib\gcc\mingw32\9.2.0\..\..\..\..\mingw32\bin\ld.exe: lib\libcurl.a(http2.o)|| undefined reference to `nghttp2_pack_settings_payload'|
c:\mingw\bin\..\lib\gcc\mingw32\9.2.0\..\..\..\..\mingw32\bin\ld.exe: lib\libcurl.a(http2.o)|| undefined reference to `nghttp2_session_resume_data'|
c:\mingw\bin\..\lib\gcc\mingw32\9.2.0\..\..\..\..\mingw32\bin\ld.exe: lib\libcurl.a(http2.o)|| undefined reference to `nghttp2_session_want_write'|
c:\mingw\bin\..\lib\gcc\mingw32\9.2.0\..\..\..\..\mingw32\bin\ld.exe: lib\libcurl.a(http2.o)|| undefined reference to `nghttp2_priority_spec_init'|
c:\mingw\bin\..\lib\gcc\mingw32\9.2.0\..\..\..\..\mingw32\bin\ld.exe: lib\libcurl.a(http2.o)|| undefined reference to `nghttp2_submit_priority'|
c:\mingw\bin\..\lib\gcc\mingw32\9.2.0\..\..\..\..\mingw32\bin\ld.exe: lib\libcurl.a(http2.o)|| undefined reference to `nghttp2_session_send'|
c:\mingw\bin\..\lib\gcc\mingw32\9.2.0\..\..\..\..\mingw32\bin\ld.exe: lib\libcurl.a(http2.o)|| undefined reference to `nghttp2_session_want_write'|
c:\mingw\bin\..\lib\gcc\mingw32\9.2.0\..\..\..\..\mingw32\bin\ld.exe: lib\libcurl.a(http2.o)|| undefined reference to `nghttp2_session_mem_recv'|
c:\mingw\bin\..\lib\gcc\mingw32\9.2.0\..\..\..\..\mingw32\bin\ld.exe: lib\libcurl.a(http2.o)|| undefined reference to `nghttp2_strerror'|
c:\mingw\bin\..\lib\gcc\mingw32\9.2.0\..\..\..\..\mingw32\bin\ld.exe: lib\libcurl.a(http2.o)|| undefined reference to `nghttp2_priority_spec_init'|
c:\mingw\bin\..\lib\gcc\mingw32\9.2.0\..\..\..\..\mingw32\bin\ld.exe: lib\libcurl.a(http2.o)|| undefined reference to `nghttp2_submit_priority'|
c:\mingw\bin\..\lib\gcc\mingw32\9.2.0\..\..\..\..\mingw32\bin\ld.exe: lib\libcurl.a(http2.o)|| undefined reference to `nghttp2_session_send'|
c:\mingw\bin\..\lib\gcc\mingw32\9.2.0\..\..\..\..\mingw32\bin\ld.exe: lib\libcurl.a(http2.o)|| undefined reference to `nghttp2_session_check_request_allowed'|
c:\mingw\bin\..\lib\gcc\mingw32\9.2.0\..\..\..\..\mingw32\bin\ld.exe: lib\libcurl.a(http2.o)|| undefined reference to `nghttp2_session_want_read'|
c:\mingw\bin\..\lib\gcc\mingw32\9.2.0\..\..\..\..\mingw32\bin\ld.exe: lib\libcurl.a(http2.o)|| undefined reference to `nghttp2_session_want_write'|
c:\mingw\bin\..\lib\gcc\mingw32\9.2.0\..\..\..\..\mingw32\bin\ld.exe: lib\libcurl.a(http2.o)|| undefined reference to `nghttp2_session_callbacks_new'|
c:\mingw\bin\..\lib\gcc\mingw32\9.2.0\..\..\..\..\mingw32\bin\ld.exe: lib\libcurl.a(http2.o)|| undefined reference to `nghttp2_session_callbacks_set_send_callback'|
c:\mingw\bin\..\lib\gcc\mingw32\9.2.0\..\..\..\..\mingw32\bin\ld.exe: lib\libcurl.a(http2.o)|| undefined reference to `nghttp2_session_callbacks_set_on_frame_recv_callback'|
c:\mingw\bin\..\lib\gcc\mingw32\9.2.0\..\..\..\..\mingw32\bin\ld.exe: lib\libcurl.a(http2.o)|| undefined reference to `nghttp2_session_callbacks_set_on_data_chunk_recv_callback'|
c:\mingw\bin\..\lib\gcc\mingw32\9.2.0\..\..\..\..\mingw32\bin\ld.exe: lib\libcurl.a(http2.o)|| undefined reference to `nghttp2_session_callbacks_set_on_stream_close_callback'|
c:\mingw\bin\..\lib\gcc\mingw32\9.2.0\..\..\..\..\mingw32\bin\ld.exe: lib\libcurl.a(http2.o)|| undefined reference to `nghttp2_session_callbacks_set_on_begin_headers_callback'|
c:\mingw\bin\..\lib\gcc\mingw32\9.2.0\..\..\..\..\mingw32\bin\ld.exe: lib\libcurl.a(http2.o)|| undefined reference to `nghttp2_session_callbacks_set_on_header_callback'|
c:\mingw\bin\..\lib\gcc\mingw32\9.2.0\..\..\..\..\mingw32\bin\ld.exe: lib\libcurl.a(http2.o)|| undefined reference to `nghttp2_session_callbacks_set_error_callback'|
c:\mingw\bin\..\lib\gcc\mingw32\9.2.0\..\..\..\..\mingw32\bin\ld.exe: lib\libcurl.a(http2.o)|| undefined reference to `nghttp2_session_client_new'|
c:\mingw\bin\..\lib\gcc\mingw32\9.2.0\..\..\..\..\mingw32\bin\ld.exe: lib\libcurl.a(http2.o)|| undefined reference to `nghttp2_session_callbacks_del'|
c:\mingw\bin\..\lib\gcc\mingw32\9.2.0\..\..\..\..\mingw32\bin\ld.exe: lib\libcurl.a(http2.o)|| undefined reference to `nghttp2_session_upgrade2'|
c:\mingw\bin\..\lib\gcc\mingw32\9.2.0\..\..\..\..\mingw32\bin\ld.exe: lib\libcurl.a(http2.o)|| undefined reference to `nghttp2_strerror'|
c:\mingw\bin\..\lib\gcc\mingw32\9.2.0\..\..\..\..\mingw32\bin\ld.exe: lib\libcurl.a(http2.o)|| undefined reference to `nghttp2_submit_settings'|
c:\mingw\bin\..\lib\gcc\mingw32\9.2.0\..\..\..\..\mingw32\bin\ld.exe: lib\libcurl.a(http2.o)|| undefined reference to `nghttp2_strerror'|
c:\mingw\bin\..\lib\gcc\mingw32\9.2.0\..\..\..\..\mingw32\bin\ld.exe: lib\libcurl.a(http2.o)|| undefined reference to `nghttp2_session_set_stream_user_data'|
c:\mingw\bin\..\lib\gcc\mingw32\9.2.0\..\..\..\..\mingw32\bin\ld.exe: lib\libcurl.a(http2.o)|| undefined reference to `nghttp2_session_set_local_window_size'|
c:\mingw\bin\..\lib\gcc\mingw32\9.2.0\..\..\..\..\mingw32\bin\ld.exe: lib\libcurl.a(http2.o)|| undefined reference to `nghttp2_strerror'|
c:\mingw\bin\..\lib\gcc\mingw32\9.2.0\..\..\..\..\mingw32\bin\ld.exe: lib\libcurl.a(http2.o)|| undefined reference to `nghttp2_session_want_read'|
c:\mingw\bin\..\lib\gcc\mingw32\9.2.0\..\..\..\..\mingw32\bin\ld.exe: lib\libcurl.a(http2.o)|| undefined reference to `nghttp2_session_want_write'|
c:\mingw\bin\..\lib\gcc\mingw32\9.2.0\..\..\..\..\mingw32\bin\ld.exe: lib\libcurl.a(http2.o)|| undefined reference to `nghttp2_session_resume_data'|
c:\mingw\bin\..\lib\gcc\mingw32\9.2.0\..\..\..\..\mingw32\bin\ld.exe: lib\libcurl.a(http2.o)|| undefined reference to `nghttp2_is_fatal'|
c:\mingw\bin\..\lib\gcc\mingw32\9.2.0\..\..\..\..\mingw32\bin\ld.exe: lib\libcurl.a(http2.o)|| undefined reference to `nghttp2_priority_spec_init'|
c:\mingw\bin\..\lib\gcc\mingw32\9.2.0\..\..\..\..\mingw32\bin\ld.exe: lib\libcurl.a(http2.o)|| undefined reference to `nghttp2_submit_priority'|
c:\mingw\bin\..\lib\gcc\mingw32\9.2.0\..\..\..\..\mingw32\bin\ld.exe: lib\libcurl.a(http2.o)|| undefined reference to `nghttp2_session_send'|
c:\mingw\bin\..\lib\gcc\mingw32\9.2.0\..\..\..\..\mingw32\bin\ld.exe: lib\libcurl.a(http2.o)|| undefined reference to `nghttp2_is_fatal'|
c:\mingw\bin\..\lib\gcc\mingw32\9.2.0\..\..\..\..\mingw32\bin\ld.exe: lib\libcurl.a(http2.o)|| undefined reference to `nghttp2_session_want_read'|
c:\mingw\bin\..\lib\gcc\mingw32\9.2.0\..\..\..\..\mingw32\bin\ld.exe: lib\libcurl.a(http2.o)|| undefined reference to `nghttp2_session_want_write'|
c:\mingw\bin\..\lib\gcc\mingw32\9.2.0\..\..\..\..\mingw32\bin\ld.exe: lib\libcurl.a(http2.o)|| undefined reference to `nghttp2_session_resume_data'|
c:\mingw\bin\..\lib\gcc\mingw32\9.2.0\..\..\..\..\mingw32\bin\ld.exe: lib\libcurl.a(http2.o)|| undefined reference to `nghttp2_priority_spec_init'|
c:\mingw\bin\..\lib\gcc\mingw32\9.2.0\..\..\..\..\mingw32\bin\ld.exe: lib\libcurl.a(http2.o)|| undefined reference to `nghttp2_submit_request'|
||More errors follow but not being shown.|
||Edit the max errors limit in compiler options...|
||=== Build failed: 50 error(s), 0 warning(s) (0 minute(s), 3 second(s)) ===|

cURL library dependencies:
https://curl.se/docs/libs.html

Curl depends on external libraries for some features (and libcurl for all features). You can build curl without them, but curl gets a lot better if you have a few of these libraries:

Do you have any of the dependency libraries cURL wants or requires to be installed? The errors you showed indicate you don't have nghttp2.

You can build cURL without any of the dependency, but I dare say doing so isn't for a beginner.
Furry Guy

i install nghttp2

got more error
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
||=== Build: Debug in bobs (compiler: GNU GCC Compiler) ===|
..\..\..\..\..\MinGW\i686-w64-mingw32\lib\libcurl.a(content_encoding.o)|| undefined reference to `BrotliDecoderCreateInstance'|
..\..\..\..\..\MinGW\i686-w64-mingw32\lib\libcurl.a(content_encoding.o)|| undefined reference to `BrotliDecoderDecompressStream'|
..\..\..\..\..\MinGW\i686-w64-mingw32\lib\libcurl.a(content_encoding.o)|| undefined reference to `BrotliDecoderDestroyInstance'|
..\..\..\..\..\MinGW\i686-w64-mingw32\lib\libcurl.a(content_encoding.o)|| undefined reference to `BrotliDecoderGetErrorCode'|
..\..\..\..\..\MinGW\i686-w64-mingw32\lib\libcurl.a(content_encoding.o)|| undefined reference to `BrotliDecoderDestroyInstance'|
..\..\..\..\..\MinGW\i686-w64-mingw32\lib\libcurl.a(ldap.o)|| undefined reference to `_imp__ldap_err2string'|
..\..\..\..\..\MinGW\i686-w64-mingw32\lib\libcurl.a(ldap.o)|| undefined reference to `_imp__ldap_msgfree'|
..\..\..\..\..\MinGW\i686-w64-mingw32\lib\libcurl.a(ldap.o)|| undefined reference to `_imp__ldap_unbind_s'|
..\..\..\..\..\MinGW\i686-w64-mingw32\lib\libcurl.a(ldap.o)|| undefined reference to `_imp__ldap_set_option'|
..\..\..\..\..\MinGW\i686-w64-mingw32\lib\libcurl.a(ldap.o)|| undefined reference to `_imp__ldap_init'|
..\..\..\..\..\MinGW\i686-w64-mingw32\lib\libcurl.a(ldap.o)|| undefined reference to `_imp__ldap_sslinit'|
..\..\..\..\..\MinGW\i686-w64-mingw32\lib\libcurl.a(ldap.o)|| undefined reference to `_imp__ldap_set_option'|
..\..\..\..\..\MinGW\i686-w64-mingw32\lib\libcurl.a(ldap.o)|| undefined reference to `_imp__ldap_set_option'|
..\..\..\..\..\MinGW\i686-w64-mingw32\lib\libcurl.a(ldap.o)|| undefined reference to `_imp__ldap_set_option'|
..\..\..\..\..\MinGW\i686-w64-mingw32\lib\libcurl.a(ldap.o)|| undefined reference to `_imp__ldap_err2string'|
..\..\..\..\..\MinGW\i686-w64-mingw32\lib\libcurl.a(ldap.o)|| undefined reference to `_imp__ldap_search_s'|
..\..\..\..\..\MinGW\i686-w64-mingw32\lib\libcurl.a(ldap.o)|| undefined reference to `_imp__ldap_err2string'|
..\..\..\..\..\MinGW\i686-w64-mingw32\lib\libcurl.a(ldap.o)|| undefined reference to `_imp__ldap_first_entry'|
..\..\..\..\..\MinGW\i686-w64-mingw32\lib\libcurl.a(ldap.o)|| undefined reference to `_imp__ldap_get_dn'|
..\..\..\..\..\MinGW\i686-w64-mingw32\lib\libcurl.a(ldap.o)|| undefined reference to `_imp__ldap_memfree'|
..\..\..\..\..\MinGW\i686-w64-mingw32\lib\libcurl.a(ldap.o)|| undefined reference to `_imp__ldap_first_attribute'|
..\..\..\..\..\MinGW\i686-w64-mingw32\lib\libcurl.a(ldap.o)|| undefined reference to `_imp__ldap_get_values_len'|
..\..\..\..\..\MinGW\i686-w64-mingw32\lib\libcurl.a(ldap.o)|| undefined reference to `_imp__ldap_value_free_len'|
..\..\..\..\..\MinGW\i686-w64-mingw32\lib\libcurl.a(ldap.o)|| undefined reference to `_imp__ldap_memfree'|
..\..\..\..\..\MinGW\i686-w64-mingw32\lib\libcurl.a(ldap.o)|| undefined reference to `_imp__ldap_next_attribute'|
..\..\..\..\..\MinGW\i686-w64-mingw32\lib\libcurl.a(ldap.o)|| undefined reference to `_imp__ber_free'|
..\..\..\..\..\MinGW\i686-w64-mingw32\lib\libcurl.a(ldap.o)|| undefined reference to `_imp__ldap_next_entry'|
..\..\..\..\..\MinGW\i686-w64-mingw32\lib\libcurl.a(ldap.o)|| undefined reference to `_imp__ldap_get_dn'|
..\..\..\..\..\MinGW\i686-w64-mingw32\lib\libcurl.a(ldap.o)|| undefined reference to `_imp__ldap_value_free_len'|
..\..\..\..\..\MinGW\i686-w64-mingw32\lib\libcurl.a(ldap.o)|| undefined reference to `_imp__ldap_memfree'|
..\..\..\..\..\MinGW\i686-w64-mingw32\lib\libcurl.a(ldap.o)|| undefined reference to `_imp__ber_free'|
..\..\..\..\..\MinGW\i686-w64-mingw32\lib\libcurl.a(ldap.o)|| undefined reference to `_imp__ldap_memfree'|
..\..\..\..\..\MinGW\i686-w64-mingw32\lib\libcurl.a(ldap.o)|| undefined reference to `_imp__ldap_memfree'|
..\..\..\..\..\MinGW\i686-w64-mingw32\lib\libcurl.a(ldap.o)|| undefined reference to `_imp__ldap_simple_bind_s'|
..\..\..\..\..\MinGW\i686-w64-mingw32\lib\libcurl.a(ldap.o)|| undefined reference to `_imp__ldap_bind_s'|
..\..\..\..\..\MinGW\i686-w64-mingw32\lib\libcurl.a(ldap.o)|| undefined reference to `_imp__ldap_bind_s'|
..\..\..\..\..\MinGW\i686-w64-mingw32\lib\libcurl.a(openssl.o)|| undefined reference to `_imp__CertOpenSystemStoreA@8'|
..\..\..\..\..\MinGW\i686-w64-mingw32\lib\libcurl.a(openssl.o)|| undefined reference to `_imp__CertEnumCertificatesInStore@8'|
..\..\..\..\..\MinGW\i686-w64-mingw32\lib\libcurl.a(openssl.o)|| undefined reference to `_imp__CertGetIntendedKeyUsage@16'|
..\..\..\..\..\MinGW\i686-w64-mingw32\lib\libcurl.a(openssl.o)|| undefined reference to `_imp__CertGetEnhancedKeyUsage@16'|
..\..\..\..\..\MinGW\i686-w64-mingw32\lib\libcurl.a(openssl.o)|| undefined reference to `_imp__CertGetEnhancedKeyUsage@16'|
..\..\..\..\..\MinGW\i686-w64-mingw32\lib\libcurl.a(openssl.o)|| undefined reference to `_imp__CertFreeCertificateContext@4'|
..\..\..\..\..\MinGW\i686-w64-mingw32\lib\libcurl.a(openssl.o)|| undefined reference to `_imp__CertCloseStore@8'|
..\..\..\..\..\MinGW\i686-w64-mingw32\lib\libcurl.a(schannel.o)|| undefined reference to `_imp__CertFreeCertificateContext@4'|
..\..\..\..\..\MinGW\i686-w64-mingw32\lib\libcurl.a(schannel.o)|| undefined reference to `_imp__CertEnumCertificatesInStore@8'|
..\..\..\..\..\MinGW\i686-w64-mingw32\lib\libcurl.a(schannel.o)|| undefined reference to `_imp__CertEnumCertificatesInStore@8'|
..\..\..\..\..\MinGW\i686-w64-mingw32\lib\libcurl.a(schannel.o)|| undefined reference to `_imp__CertFreeCertificateContext@4'|
..\..\..\..\..\MinGW\i686-w64-mingw32\lib\libcurl.a(schannel.o)|| undefined reference to `_imp__CertEnumCertificatesInStore@8'|
..\..\..\..\..\MinGW\i686-w64-mingw32\lib\libcurl.a(schannel.o)|| undefined reference to `_imp__CertEnumCertificatesInStore@8'|
..\..\..\..\..\MinGW\i686-w64-mingw32\lib\libcurl.a(schannel.o)|| undefined reference to `_imp__CertFreeCertificateContext@4'|
||More errors follow but not being shown.|
||Edit the max errors limit in compiler options...|
||=== Build failed: 50 error(s), 0 warning(s) (0 minute(s), 1 second(s)) ===|


Is there any other library like curl? all i need send get request to my site ,

Maybe you could use Python?
https://docs.python.org/3/howto/urllib2.html
Last edited on
thmm ,

mmm , I did it easy with python and autoit
But I need to do it by c++ , Because this is the last point in the program to give to clients
You can try another library from this list.
https://en.cppreference.com/w/cpp/links/libs
Scroll to bottom -> Web
I am not sure if they are easier to install
Another option would be to bundle your app with the python interpreter(1 .dll ?)
and call the python code from your app.
thmm


Thanks for reply.
Okay i'll try another lib,
Thanks so much ,

Topic archived. No new replies allowed.