Visual c++ instalacja cURL'a

0

Witam.
Od dawna mam problem z instalacją biblioteki curl w visual c++ 2010.
Stosowałem się do instrukcji podanej tutaj:
[url]http://curl.haxx.se/libcurl/c/visual_studio.pdf[/url]
Zrobiłem tak jak napisali dodałem include directories, additional include directories, preprocessor oraz input w linkierze.
Jednak mimo tego po kompilacji pojawia się błąd fatal error C1083: Cannot open include file: 'curl/curl.h': No such file or directory.

Podejrzewam że przyczyna może tkwić w tym że autor tego poradnika miał wersję curl-7.9.6.zip a ja mam curl-7.21.6 czyli najnowszą. [url]http://curl.haxx.se/download.html[/url]
Używam prostego przykładowego kodu.
Gdy zmieniam #include <curl/curl.h> na #include <curl.h> pojawia się inny błąd

1>     Creating library C:\Documents and Settings\admin\Pulpit\cure\CURL\vs\projekt\Debug\projekt.lib and object C:\Documents and Settings\Dorota\Pulpit\cure\CURL\vs\projekt\Debug\projekt.exp
1>libcurl.lib(ldap.obj) : error LNK2019: unresolved external symbol __imp__ldap_unbind_s referenced in function _Curl_ldap
1>libcurl.lib(ldap.obj) : error LNK2019: unresolved external symbol __imp__ldap_msgfree referenced in function _Curl_ldap
1>libcurl.lib(ldap.obj) : error LNK2019: unresolved external symbol __imp__ber_free referenced in function _Curl_ldap
1>libcurl.lib(ldap.obj) : error LNK2019: unresolved external symbol __imp__ldap_memfree referenced in function _Curl_ldap
1>libcurl.lib(ldap.obj) : error LNK2019: unresolved external symbol __imp__ldap_value_free_len referenced in function _Curl_ldap
1>libcurl.lib(ldap.obj) : error LNK2019: unresolved external symbol __imp__ldap_get_values_len referenced in function _Curl_ldap
1>libcurl.lib(ldap.obj) : error LNK2019: unresolved external symbol __imp__ldap_next_attribute referenced in function _Curl_ldap
1>libcurl.lib(ldap.obj) : error LNK2019: unresolved external symbol __imp__ldap_first_attribute referenced in function _Curl_ldap
1>libcurl.lib(ldap.obj) : error LNK2019: unresolved external symbol __imp__ldap_get_dn referenced in function _Curl_ldap
1>libcurl.lib(ldap.obj) : error LNK2019: unresolved external symbol __imp__ldap_next_entry referenced in function _Curl_ldap
1>libcurl.lib(ldap.obj) : error LNK2019: unresolved external symbol __imp__ldap_first_entry referenced in function _Curl_ldap
1>libcurl.lib(ldap.obj) : error LNK2019: unresolved external symbol __imp__ldap_search_s referenced in function _Curl_ldap
1>libcurl.lib(ldap.obj) : error LNK2019: unresolved external symbol __imp__ldap_simple_bind_s referenced in function _Curl_ldap
1>libcurl.lib(ldap.obj) : error LNK2019: unresolved external symbol __imp__ldap_init referenced in function _Curl_ldap
1>libcurl.lib(ldap.obj) : error LNK2019: unresolved external symbol __imp__ldap_set_option referenced in function _Curl_ldap
1>libcurl.lib(ldap.obj) : error LNK2019: unresolved external symbol __imp__ldap_err2string referenced in function _Curl_ldap
1>C:\Documents and Settings\admin\Pulpit\cure\CURL\vs\projekt\Debug\projekt.exe : fatal error LNK1120: 16 unresolved externals
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

Nie wiem dokładnie gdzie może tkwić błąd więc proszę Was o pomoc.

1

http://bobobobo.wordpress.com/2008/11/08/working-with-curl-getting-started-the-easy-way-on-win32/
nie wiem jak te dalsze linki do "14stu babci" :))) ale prawie na pewno pomoże Ci komentarz mówiący o "libcurl.lib ws2_32.lib winmm.lib wldap32.lib"
btw. cytowana tam opcja HTTP_ONLY tez brzmi sensownie, jezeli ldap masz w nosie

ps.
C:\Documents and Settings*admin*\Pulpit\cure\CURL\vs\projekt\Debug\projekt.lib
C:\Documents and Settings*Dorota*\Pulpit\cure\CURL\vs\projekt\Debug\projekt.exp
po co mieszasz pulpity?:)

0

Opiszę teraz krok po kroku co zrobiłem i jakie błędu się pojawiają.
Pobrałem najnowszą wersję curl'a (curl-7.21.6), otworzyłem plik libcurl.vcxproj w katalogu lib oraz skompilowałem go.
Później otworzyłem mój projekt i zrobiłem tak:
-w VC++ Directories -> include directories dodałem folder curl-7.21.6\include
-w VC++ Directories -> libary directories dodałem folder curl-7.21.6\lib\debug
-w Linkier -> Input dodałem libcurl.lib,

Po skompilowaniu żadnych błędów nie ma ========== Build: 1 succeeded, 0 failed, 0 up-to-date, 0 skipped ==========
ale gdy otwieram (f5) to niestety takie coś się pojawia

'projekt.exe': Loaded 'C:\WINDOWS\system32\ntdll.dll', Cannot find or open the PDB file
'projekt.exe': Loaded 'C:\WINDOWS\system32\kernel32.dll', Cannot find or open the PDB file
'projekt.exe': Loaded 'C:\Program Files\Alwil Software\Avast5\snxhk.dll', Cannot find or open the PDB file
'projekt.exe': Loaded 'C:\WINDOWS\system32\ws2_32.dll', Cannot find or open the PDB file
'projekt.exe': Loaded 'C:\WINDOWS\system32\advapi32.dll', Cannot find or open the PDB file
'projekt.exe': Loaded 'C:\WINDOWS\system32\rpcrt4.dll', Cannot find or open the PDB file
'projekt.exe': Loaded 'C:\WINDOWS\system32\secur32.dll', Cannot find or open the PDB file
'projekt.exe': Loaded 'C:\WINDOWS\system32\msvcrt.dll', Cannot find or open the PDB file
'projekt.exe': Loaded 'C:\WINDOWS\system32\ws2help.dll', Cannot find or open the PDB file
'projekt.exe': Loaded 'C:\WINDOWS\system32\wldap32.dll', Cannot find or open the PDB file
'projekt.exe': Loaded 'C:\WINDOWS\system32\msvcp100d.dll', Symbols loaded.
'projekt.exe': Loaded 'C:\WINDOWS\system32\msvcr100d.dll', Symbols loaded.
'projekt.exe': Loaded 'C:\WINDOWS\system32\mswsock.dll', Cannot find or open the PDB file
'projekt.exe': Loaded 'C:\WINDOWS\system32\hnetcfg.dll', Cannot find or open the PDB file
'projekt.exe': Loaded 'C:\WINDOWS\system32\gdi32.dll', Cannot find or open the PDB file
'projekt.exe': Loaded 'C:\WINDOWS\system32\user32.dll', Cannot find or open the PDB file
'projekt.exe': Loaded 'C:\WINDOWS\system32\wshtcpip.dll', Cannot find or open the PDB file
'projekt.exe': Loaded 'C:\WINDOWS\system32\wship6.dll', Cannot find or open the PDB file
'projekt.exe': Loaded 'C:\WINDOWS\system32\dnsapi.dll', Cannot find or open the PDB file
'projekt.exe': Loaded 'C:\WINDOWS\system32\iphlpapi.dll', Cannot find or open the PDB file
'projekt.exe': Loaded 'C:\WINDOWS\system32\rasadhlp.dll', Cannot find or open the PDB file
The thread 'Win32 Thread' (0xc44) has exited with code 0 (0x0).
The thread 'Win32 Thread' (0xce8) has exited with code -1073741510 (0xc000013a).
The thread 'Win32 Thread' (0xcac) has exited with code -1073741510 (0xc000013a).
The program '[2120] projekt.exe: Native' has exited with code -1073741510 (0xc000013a).

A mieszam bo lubię :)

1

No i z tego wynika, że program uruchomił się poprawnie, te błędy to brak symboli debugowania dla bibliotek systemowych. Najczęściej nie są potrzebne, ani domyślnie instalowane.

0

no rzeczywiście, myślałem że to błąd bo po uruchomieniu konsola była pusta, ale to dlatego że był podany adres http://example.com jako argument :) :)

0

Carlu, dzięki!!!
Pół dnia się męczyłem żeby podpiąć tego curla - dopóki nie trafiłem na Twój post ;-)
Stronka curl.haxx.se nie zawiera niestety potrzebnych informacji - dzięki za post.

1 użytkowników online, w tym zalogowanych: 0, gości: 1