I am trying to get your addon working with Codeblocks Windows. I don’t want/need to compile libcurl, unless its not the right version to use in your addon? (i mean, youve not included mac only or something?)
Anyway, I have so far:
included files from here in my project
added the search path
added preprocessor defines, i think this is right …
added to the top of ofxCurl.h
#define CURL_STATICLIB #define CURL_DISABLE_LDAP
as in your readme it says:
In Code::Blocks I had to define these two defines to make it
So, when I go to build, I get the error:
C:\openframeworks\v0.062\addons\ofxCurl\src\ofxCurlFileDownload.cpp||In member function ‘bool ofxCurlFileDownload::startDownloading()’:
C:\openframeworks\v0.062\addons\ofxCurl\src\ofxCurlFileDownload.cpp|69|error: ‘assert’ was not declared in this scope
I don’t know the code but as far as I know about macros like this, you can try to just comment the line out, because assert commands are only for debugging (or at least should only be used for that, not for programming logic)
Regarding the assert: It’s used as a safety line, for checking things to make functions safer. In your example, it’s used to make sure that the creation of multi_curl_handle was successful before proceeding. So you don’t “need” them, but then you don’t know when something is wrong (e.g. unsuccessful pointer creation because out-of-memory, or other things), and the code could start to behave unpredictably.
Adding #include or #include assert.h in ofxCurlFileDownload.h should make the error go away, although I don’t know why it appeared in the first place - Roxlu would also be affected by this, but obviously is not.
I updated the git version. It contains an example on how to post a simple form with some input fields and a file element. I added a function to retrieve the response from the server after posting. See the getPostResponseAsString and getPostResponseAsBuffer.
Both functions return the same data though getPostResponseAsBuffer returns a std::vector which can be handy if you want to parse the result.