Page 1 of 1

wxCurl in unicode build

Posted: Wed Oct 04, 2006 2:27 pm
by Ildar
hi,

Has anybody managed to compile wxCurl using wxWidgets unicode build?

I'm trying to build wxCurl in Visual Studio 2005 and getting a bunch of errors like follows:

Code: Select all

Error	3	error C2664: 'ftpparse' : cannot convert parameter 2 from 'wxChar *' to 'char *'	e:\projects\bus\lib\wxcurl\src\curl\ftptool.cpp	107	
The compiler can't cast types returned by wxString::GetWriteBuf.

Is there a glue for wxCurl?

thank you in advance

Posted: Wed Oct 25, 2006 9:14 am
by fbronx
You can always use ToAscii from wxString

or use one the conversion functions:

http://www.wxwidgets.org/manuals/2.6.3/ ... onvclasses

Posted: Thu Feb 22, 2007 4:46 pm
by abdou
Hi Ildar,

If you are successfully using wxCurl, I need your help.
I'm trying to compile curl_app but I'm missing the file curl.h. The one I got from libcurl website is prompting these errors :

Code: Select all

d:\wxCURL\include\curl/curl.h(170) : error C2146: syntax error : missing ';' before identifier 'curl_socket_t'
d:\wxCURL\include\curl/curl.h(170) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
d:\wxCURL\include\curl/curl.h(170) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
d:\wxCURL\include\curl/curl.h(236) : error C2061: syntax error : identifier 'curl_socket_t'
d:\wxcurl\include\curl\multi.h(132) : error C2061: syntax error : identifier 'fd_set'
d:\wxcurl\include\curl\multi.h(228) : error C2061: syntax error : identifier 'curl_socket_t'
d:\wxcurl\include\curl\multi.h(249) : error C2061: syntax error : identifier 'curl_socket_t'
d:\wxcurl\include\curl\multi.h(321) : error C2061: syntax error : identifier 'curl_socket_t'
And as I'm not that smart in C/C++, I'm completely stopped.
Is the downloaded wxCurl.zip corrupted, please give me yours. Or just some clues.
Best Regards
Abdou

trouble building wxcurl... edit: works now!

Posted: Wed Jul 23, 2008 8:03 am
by mokapot
edit: it works now. this is what the flag must look like: --with-libcurl=$TOP_LEVEL_DIR/lib/libcurl/build-i686-pc-linux-gnu/bin/curl-config . the actual file must be included.

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

hi! i have a bit of trouble when i try to build wxcurl as a static lib. the problem is that my static libcurl lib isn't identified by wxcurl when i run configure.

this is the flags that i pass to wxcurl's configure:

Code: Select all

../configure --prefix=$TOP_LEVEL_DIR/lib/libwxcurl/build --with-wx-config=$TOP_LEVEL_DIR/lib/libwxgtk/build/wx-config --with-libcurl=$TOP_LEVEL_DIR/lib/libcurl/build --enable-static --disable-shared
terminal read out:

Code: Select all

checking build system type... i686-pc-linux-gnu
checking host system type... i686-pc-linux-gnu
checking target system type... i686-pc-linux-gnu
checking for the --enable-debug option... will be automatically detected

[...]

checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking for gawk... no
checking for mawk... mawk
checking for /lib/libcurl/build/bin/curl-config... no
checking whether libcurl is usable... no
configure: error:
    Could not find a valid libCURL installation on your system.

    If you do not have libCURL installed or you have an old version
    then please install the latest version from
      http:/curl.haxx.se/libcurl/

    If you have a valid libCURL installed, then please check the config.log
file for more details about the failure of this check.
and the config.log file says:

Code: Select all

configure:4266: checking for /lib/libcurl/build/bin/curl-config
configure:4299: result: no
configure:4416: checking whether libcurl is usable
configure:4459: g++ -o conftest  -O2 -I/lib/libcurl/build/include   conftest.cpp -L/lib/libcurl/build/lib -lcurl  >&5
/lib/libcurl/build/lib/libcurl.a(strerror.o): In function `Curl_idn_strerror':
/lib/libcurl/build/lib/../../lib/strerror.c:667: undefined reference to `idna_strerror'
/lib/libcurl/build/lib/libcurl.a(sslgen.o): In function `Curl_ssl_data_pending':
/lib/libcurl/build/lib/../../lib/sslgen.c:745: undefined reference to `SSL_pending'
/lib/libcurl/build/lib/libcurl.a(timeval.o): In function `curlx_tvnow':
/lib/libcurl/build/lib/../../lib/timeval.c:55: undefined reference to `clock_gettime'
/lib/libcurl/build/lib/libcurl.a(url.o): In function `fix_hostname':

etc.
but the curl-config file is there (in path TOP_LEVEL_DIR/lib/libcurl/build/bin) and executing it and passing it the different flags that are available seems to be working as it should.

what's wrong here? :cry:

libcurl was installed with:

Code: Select all

../configure --prefix=$TOP_LEVEL_DIR/lib/libcurl/build --enable-static --disable-shared
make
make install
-mokapot

Posted: Sun Nov 16, 2008 2:55 pm
by blizzymadden
abdou wrote:Hi Ildar,

If you are successfully using wxCurl, I need your help.
I'm trying to compile curl_app but I'm missing the file curl.h. The one I got from libcurl website is prompting these errors :

Code: Select all

d:\wxCURL\include\curl/curl.h(170) : error C2146: syntax error : missing ';' before identifier 'curl_socket_t'
d:\wxCURL\include\curl/curl.h(170) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
d:\wxCURL\include\curl/curl.h(170) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
d:\wxCURL\include\curl/curl.h(236) : error C2061: syntax error : identifier 'curl_socket_t'
d:\wxcurl\include\curl\multi.h(132) : error C2061: syntax ...
Abdou[/quote]

I'm getting these errors too.  I don't think compiling wxCurl on Windows works, the only people who can successfully compile it are on Linux.  Too bad, I had high hopes.

Posted: Thu Aug 06, 2009 7:06 am
by Ildar
blizzymadden wrote:I'm getting these errors too. I don't think compiling wxCurl on Windows works, the only people who can successfully compile it are on Linux. Too bad, I had high hopes.
It looks like I haven't been here for too long...

I managed to compile wxcurl under windows, although it took me some time to adjust the pieces of code which work with buffers. Unfortunately I did that nearly a year ago and can't find the source code now.