| | |
problem with cygcurl-2.dll
![]() |
•
•
Join Date: Jul 2007
Posts: 4
Reputation:
Solved Threads: 0
Hi,
i'm trying to use cygcurl-2.dll, i downloaded a simple example from curl site bur i'm not able to compile it properly. the example is this:
the compiler recognizes the include of the header, but for all the rest i get : "undefined reference to `_curl_easy_init'" etc.
what am i doing wrong?
i'm trying to use cygcurl-2.dll, i downloaded a simple example from curl site bur i'm not able to compile it properly. the example is this:
C++ Syntax (Toggle Plain Text)
#include <stdio.h> #include <curl/curl.h> int main(void) { CURL *curl; CURLcode res; curl = curl_easy_init(); if(curl) { /* First set the URL that is about to receive our POST. This URL can just as well be a https:// URL if that is what should receive the data. */ curl_easy_setopt(curl, CURLOPT_URL, "http://postit.example.com/moo.cgi"); /* Now specify the POST data */ curl_easy_setopt(curl, CURLOPT_POSTFIELDS, "name=daniel&project=curl"); /* Perform the request, res will get the return code */ res = curl_easy_perform(curl); /* always cleanup */ curl_easy_cleanup(curl); } return 0; }
the compiler recognizes the include of the header, but for all the rest i get : "undefined reference to `_curl_easy_init'" etc.
what am i doing wrong?
Which compiler are you using. I'm guessing that it's gcc with cygwin, since that's the library you mention.
What command line did you try?
It needs to be something like
The part at the end is what tells the compiler that you're interested in using curl functionality.
Obviously, you need to find the correct name for your library to substitute in that command line.
What command line did you try?
It needs to be something like
gcc prog.c -lcurlThe part at the end is what tells the compiler that you're interested in using curl functionality.
Obviously, you need to find the correct name for your library to substitute in that command line.
•
•
Join Date: Jul 2007
Posts: 4
Reputation:
Solved Threads: 0
Thanks for your answear.
yes, i'm using gcc g++, but i'm actually using it as a plugin for eclipse, so i compile my files with eclipse.
i tried importing the dll to my project, but like i said i get these errors.
maybe you can make something out of it:
like i said, it recognizes the #include <curl/curl.h> but not the commands that come after.
originally i come from java world, so i'm not very familiar with c++, so i'd appriciate it if you can give it to me in laim terms
.
yes, i'm using gcc g++, but i'm actually using it as a plugin for eclipse, so i compile my files with eclipse.
i tried importing the dll to my project, but like i said i get these errors.
maybe you can make something out of it:
C++ Syntax (Toggle Plain Text)
**** Build of configuration Debug for project connecit_uterasoft **** make -k all Building target: connecit_uterasoft.exe Invoking: GCC C++ Linker g++ -o"connecit_uterasoft.exe" ./src/ApplicationInfo.o ./src/CPUInfo.o ./src/ConnectionPoolInfo.o ./src/EJBPoolInfo.o ./src/JVMInfo.o ./src/http-post.o ./src/httpTest.o ./src/testXML.o ./src/xmlParser.o ./src/objects/ApplicationObject.o ./src/objects/CPUObject.o ./src/objects/ConnectionPoolObject.o ./src/objects/EJBPoolObject.o ./src/objects/JVMObject.o ./src/objects/ServerData.o ./src/fileHandler/PropFileHandler.o ./src/constants/Constants.o ./src/httpTest.o: In function `main': /cygdrive/d/eclipse/workspace/connecit_uterasoft/Debug/../src/httpTest.cpp:56: undefined reference to `_curl_easy_init' /cygdrive/d/eclipse/workspace/connecit_uterasoft/Debug/../src/httpTest.cpp:61: undefined reference to `_curl_easy_setopt' /cygdrive/d/eclipse/workspace/connecit_uterasoft/Debug/../src/httpTest.cpp:62: undefined reference to `_curl_easy_setopt' /cygdrive/d/eclipse/workspace/connecit_uterasoft/Debug/../src/httpTest.cpp:63: undefined reference to `_curl_easy_setopt' /cygdrive/d/eclipse/workspace/connecit_uterasoft/Debug/../src/httpTest.cpp:64: undefined reference to `_curl_easy_setopt' /cygdrive/d/eclipse/workspace/connecit_uterasoft/Debug/../src/httpTest.cpp:65: undefined reference to `_curl_easy_setopt' ./src/httpTest.o:/cygdrive/d/eclipse/workspace/connecit_uterasoft/Debug/../src/httpTest.cpp:66: more undefined references to `_curl_easy_setopt' follow ./src/httpTest.o: In function `main': /cygdrive/d/eclipse/workspace/connecit_uterasoft/Debug/../src/httpTest.cpp:69: undefined reference to `_curl_easy_perform' /cygdrive/d/eclipse/workspace/connecit_uterasoft/Debug/../src/httpTest.cpp:72: undefined reference to `_curl_easy_cleanup' collect2: ld returned 1 exit status make: *** [connecit_uterasoft.exe] Error 1 make: Target `all' not remade because of errors. Build complete for project connecit_uterasoft
like i said, it recognizes the #include <curl/curl.h> but not the commands that come after.
originally i come from java world, so i'm not very familiar with c++, so i'd appriciate it if you can give it to me in laim terms
. Last edited by ftom2; Jul 16th, 2007 at 9:17 am. Reason: added some lines
![]() |
Similar Threads
- Shell.dll file is reported as missing when quite clearly it's not. (Windows NT / 2000 / XP)
- "Run a DLL as an APP" error message on startup (Viruses, Spyware and other Nasties)
- "C:\system32\bridge.dll module cannot be located" problem (Viruses, Spyware and other Nasties)
- Crunchie...need your help with sqlo.dll (about blank) (Viruses, Spyware and other Nasties)
- new hompeage hijack dbipd.dll? (Viruses, Spyware and other Nasties)
- system32\bridge.dll error on start-up (Viruses, Spyware and other Nasties)
- Error message missing bridge.dll when starting windows (Viruses, Spyware and other Nasties)
- Ie6.. A coomon problem I tihnk (Web Browsers)
Other Threads in the C++ Forum
- Previous Thread: How do I build a web application using C++ Builder 2007?
- Next Thread: Static virtual functions - Reasons
| Thread Tools | Search this Thread |
anyfile api array based binary bitmap c++ c++borland c/c++ char class classes code coding compile console conversion count csimilaritybetweentext delete deploy desktop developer development directshow dll download draw dynamic dynamiccharacterarray email encryption error file forms fstream function functions game gdi+ givemetehcodez gnu graph gui homeworkhelp homeworkhelper http iamthwee ibm ifstream input int integer java lib linkedlist linker loop looping loops map math matrix memory multiple news node output packing parameter pointer problem program programming project python random read recursion reference rpg string strings temperature template test text text-file tree url variable vector video visualc++ visualizationtoolkit win32 windows winsock wordfrequency wxwidgets






