User forums > Using Code::Blocks
libcurl on Arch Linux
(1/1)
ImDevinC:
Good evening! I've been trying to troubleshoot this for a few hours and can't seem to figure it out. So here's what I have so far:
* curl is installed, which puts libcurl.so in /usr/lib/ and curl.h (and the other headers) in /usr/include/curl
* I added /usr/include to Search Directories -> Compiler in the global compiler settings
* I added /usr/lib to Search Directories -> Linker in the global compiler settings
* I added /usr/include/curl to Search Directories -> Compiler in the project compiler settings
* I added /usr/lib/libcurl.so to Linker Settings -> Link Libraries in the project compiler settings
* I included <curl/curl.h>
* On Curl *curl; I get the error error: 'Curl' was not declared in this scope
Any insight as to what I'm doing wrong? Thanks in advance!
BlueHazzard:
1) read this and post a full rebuild log: http://wiki.codeblocks.org/index.php?title=FAQ-Compiling_%28general%29#Q:_How_do_I_report_a_compilation_problem_on_the_forums.3F
2) probably you write "curl" not "Curl", but we need the full build log to help you
ImDevinC:
Thanks! Here's the build log
--- Code: ----------------- Build: Debug in TestProject (compiler: GNU GCC Compiler)---------------
g++ -Wall -fexceptions -g -I/usr/include/curl -I/usr/include -c /home/user/CppProjects/TestProject/main.cpp -o obj/Debug/main.o
/home/user/CppProjects/TestProject/main.cpp: In function ‘int main()’:
/home/user/CppProjects/TestProject/main.cpp:7:5: error: ‘Curl’ was not declared in this scope
Curl *curl;
^
/home/user/CppProjects/TestProject/main.cpp:7:11: error: ‘curl’ was not declared in this scope
Curl *curl;
^
Process terminated with status 1 (0 minute(s), 0 second(s))
2 error(s), 0 warning(s) (0 minute(s), 0 second(s))
--- End code ---
BlueHazzard:
1) Keep in mind that c is case sensitive...
2) Read the documentation and tutorials for example: http://curl.haxx.se/libcurl/c/ftpget.html for a curl example
3) Look how you have written Curl, and how the struct CURL is really written
greetings
Navigation
[0] Message Index
Go to full version