[Help](I am a rookie) I can't Build wxCURL help help help !~!~!~ Topic is solved

Talk here about issues with one of the components hosted at wxCode, or suggest features for it.
Post Reply
lfjking
Earned some good credits
Earned some good credits
Posts: 102
Joined: Mon Nov 14, 2016 1:35 pm

[Help](I am a rookie) I can't Build wxCURL help help help !~!~!~

Post by lfjking »

I System :win 7 -64
instal codeblocks + wxWidgets
Now I need DownLoad something from https Server, so I want to try wxCURL LIB.
But I build Faile!!~!~!~

Code: Select all

D:\CodeBlocks_wxWidges\wxcurl\build>mingw32-make -f makefile.gcc
----------------------------------------------------------------------------
The selected wxWidgets build is not available!
Please use the options prefixed with WX_ to select another wxWidgets build.
---------------------------------------------------------------------------
makefile.gcc:213: recipe for target 'test_for_selected_wxbuild' failed
mingw32-make: *** [test_for_selected_wxbuild] Error 1
I don't know how to line wxWidgets to wxCURL Build......

help me please! :D
lfjking
Earned some good credits
Earned some good credits
Posts: 102
Joined: Mon Nov 14, 2016 1:35 pm

Re: [Help](I am a rookie) I can't Build wxCURL help help help !~!~!~

Post by lfjking »

thanks for this viewtopic.php?t=17193 line
I created a bat to solve this problem.

Code: Select all

@echo off
set WXWIN=D:\CodeBlocks_wxWidges\wxWidgets-3.0.1
mingw32-make -f makefile.gcc WX_DEBUG=0 WX_MONOLITHIC=1 WX_USE_OPENGL=1 WX_RUNTIME_LIBS=static WX_USE_RTTI=0 WX_USE_EXCEPTIONS=1
pause
But there is another problem

Code: Select all

c:/codeblocks/mingw/bin/../lib/gcc/mingw32/4.8.1/../../../../mingw32/bin/ld.exe:
 cannot find -lwxmsw29u_xrc
c:/codeblocks/mingw/bin/../lib/gcc/mingw32/4.8.1/../../../../mingw32/bin/ld.exe:
 cannot find -lwxmsw29u_html
c:/codeblocks/mingw/bin/../lib/gcc/mingw32/4.8.1/../../../../mingw32/bin/ld.exe:
 cannot find -lwxmsw29u_adv
c:/codeblocks/mingw/bin/../lib/gcc/mingw32/4.8.1/../../../../mingw32/bin/ld.exe:
 cannot find -lwxbase29u_xml
c:/codeblocks/mingw/bin/../lib/gcc/mingw32/4.8.1/../../../../mingw32/bin/ld.exe:
 cannot find -lwxmsw29u_core
c:/codeblocks/mingw/bin/../lib/gcc/mingw32/4.8.1/../../../../mingw32/bin/ld.exe:
 cannot find -lwxbase29u
collect2.exe: error: ld returned 1 exit status
makefile.gcc:246: recipe for target '..\samples\protocols\protocols.exe' failed
mingw32-make: *** [..\samples\protocols\protocols.exe] Error 1
I can't find..\samples\protocols\protocols.exe
How can I compile it?
PB
Part Of The Furniture
Part Of The Furniture
Posts: 4183
Joined: Sun Jan 03, 2010 5:45 pm

Re: [Help](I am a rookie) I can't Build wxCURL help help help !~!~!~

Post by PB »

Start with the obvious: You say you are using wxWidgets 3 built as a monolithic lib (somewhat unusual for a static build) yet according to the build ouput for the protocols sample, it expects wxWidgets 2.9 (perhaps setting WX_VERSION to the correct value would help) built as multilib? wxCURL has not been really updated in ages, so it probably does not support current wxWidgets versions, at least not out of the box. I have not used wxCURL so I have no idea how well it works with the current libcurl version either.

Anyway, you should provide the information about the following:
* How did you build your wxWidgets (static/dynamic, multilib/monolithic etc.), including the exact command line used
* Whether you can successfully build and run the minimal sample bundled with wxWidgets.
* What libcurl libraries are you using (provided binaries, built by yourself - how).
lfjking
Earned some good credits
Earned some good credits
Posts: 102
Joined: Mon Nov 14, 2016 1:35 pm

Re: [Help](I am a rookie) I can't Build wxCURL help help help !~!~!~

Post by lfjking »

PB wrote:Start with the obvious: You say you are using wxWidgets 3 built as a monolithic lib (somewhat unusual for a static build) yet according to the build ouput for the protocols sample, it expects wxWidgets 2.9 (perhaps setting WX_VERSION to the correct value would help) built as multilib? wxCURL has not been really updated in ages, so it probably does not support current wxWidgets versions, at least not out of the box. I have not used wxCURL so I have no idea how well it works with the current libcurl version either.

Anyway, you should provide the information about the following:
* How did you build your wxWidgets (static/dynamic, multilib/monolithic etc.), including the exact command line used
* Whether you can successfully build and run the minimal sample bundled with wxWidgets.
* What libcurl libraries are you using (provided binaries, built by yourself - how).

Thank you for your attention,First!

My wxWidgets Version:3.0.1
tdm-gcc-4.8.1-3
codeblocks 16.01
Build cmd line:

Code: Select all

 mingw32-make -f makefile.gcc MONOLITHIC=1 SHARED=0 UNICODE=1 BUILD=release
CodeBlocks can normally call wxWidgets Generation project

the end......wxCurl Need libcurl ?? I have not DownLoad....... #-o
lfjking
Earned some good credits
Earned some good credits
Posts: 102
Joined: Mon Nov 14, 2016 1:35 pm

Re: [Help](I am a rookie) I can't Build wxCURL help help help !~!~!~

Post by lfjking »

PB wrote:Start with the obvious: You say you are using wxWidgets 3 built as a monolithic lib (somewhat unusual for a static build) yet according to the build ouput for the protocols sample, it expects wxWidgets 2.9 (perhaps setting WX_VERSION to the correct value would help) built as multilib? wxCURL has not been really updated in ages, so it probably does not support current wxWidgets versions, at least not out of the box. I have not used wxCURL so I have no idea how well it works with the current libcurl version either.

Anyway, you should provide the information about the following:
* How did you build your wxWidgets (static/dynamic, multilib/monolithic etc.), including the exact command line used
* Whether you can successfully build and run the minimal sample bundled with wxWidgets.
* What libcurl libraries are you using (provided binaries, built by yourself - how).

Hello PB:
I use wxCURL because I intend to use it to download HTTPS resources on the web

It seems that there is not much use of wxCurl in the forum, and other Wx libraries can download resources from HTTPS?


Give a suggestion. Thank you.
User avatar
doublemax
Moderator
Moderator
Posts: 19103
Joined: Fri Apr 21, 2006 8:03 pm
Location: $FCE2

Re: [Help](I am a rookie) I can't Build wxCURL help help help !~!~!~

Post by doublemax »

wxCurl is just a small wrapper around curl. You could also use libcurl directly, the effort is almostr the same.
Use the source, Luke!
PB
Part Of The Furniture
Part Of The Furniture
Posts: 4183
Joined: Sun Jan 03, 2010 5:45 pm

Re: [Help](I am a rookie) I can't Build wxCURL help help help !~!~!~

Post by PB »

As I said, I never used wxCURL and so I was wrong about wxCURL needing libcurl. I blame it on its description which reads "wxCURL is a simplified and integrated interface between LibCURL and wxWidgets." ;)

Anyway, I downloaded the zipped version from the SourceForge (you may be better off using the SVN version where there is a commit probably not included in the ZIP) and could build it with a provided VC makefile without any issues with wxWidgets 3.1. It is therefore likely wxWidgets version is not an issue. Unfortunately, I do not have wxWidgets built with GCC at the hand atm, so I cannot try it.

I would still recommend matching the options used for building wxWidgets with those used for building wxCURL. I can see that some of the options you used when building wxCURL do not match.

Assuming this was how you build wxWidgets

Code: Select all

mingw32-make -f makefile.gcc MONOLITHIC=1 SHARED=0 UNICODE=1 BUILD=release
You may try building wxCURL like this (I assume you have set the WXWIN system environment variable properly):

Code: Select all

mingw32-make -f makefile.gcc WX_VERSION=30 WX_MONOLITHIC=1 WX_SHARED=0 WX_DEBUG=0
There may be a problem though, I do not see WX_MONOLITHIC mentioned anywhere in the makefile, so the option may be ignored and only the default wxWidgets multilib build is supported. I may be wrong but based on the errors you posted it appeared that the individual wxWidgets libraries were required despite WX_MONOLITHIC set to 1. OTOH it seemed only the samples failed to build?
lfjking
Earned some good credits
Earned some good credits
Posts: 102
Joined: Mon Nov 14, 2016 1:35 pm

Re: [Help](I am a rookie) I can't Build wxCURL help help help !~!~!~

Post by lfjking »

PB wrote:As I said, I never used wxCURL and so I was wrong about wxCURL needing libcurl. I blame it on its description which reads "wxCURL is a simplified and integrated interface between LibCURL and wxWidgets." ;)

Anyway, I downloaded the zipped version from the SourceForge (you may be better off using the SVN version where there is a commit probably not included in the ZIP) and could build it with a provided VC makefile without any issues with wxWidgets 3.1. It is therefore likely wxWidgets version is not an issue. Unfortunately, I do not have wxWidgets built with GCC at the hand atm, so I cannot try it.

I would still recommend matching the options used for building wxWidgets with those used for building wxCURL. I can see that some of the options you used when building wxCURL do not match.

Assuming this was how you build wxWidgets

Code: Select all

mingw32-make -f makefile.gcc MONOLITHIC=1 SHARED=0 UNICODE=1 BUILD=release
You may try building wxCURL like this (I assume you have set the WXWIN system environment variable properly):

Code: Select all

mingw32-make -f makefile.gcc WX_VERSION=30 WX_MONOLITHIC=1 WX_SHARED=0 WX_DEBUG=0
There may be a problem though, I do not see WX_MONOLITHIC mentioned anywhere in the makefile, so the option may be ignored and only the default wxWidgets multilib build is supported. I may be wrong but based on the errors you posted it appeared that the individual wxWidgets libraries were required despite WX_MONOLITHIC set to 1. OTOH it seemed only the samples failed to build?


Thank you PB doubts, maybe this package I will not be able to build a success, thank you for your answer, maybe I should understand the libcurl library, may be more helpful, after all, my purpose is to get https site Resources
lfjking
Earned some good credits
Earned some good credits
Posts: 102
Joined: Mon Nov 14, 2016 1:35 pm

Re: [Help](I am a rookie) I can't Build wxCURL help help help !~!~!~

Post by lfjking »

doublemax wrote:wxCurl is just a small wrapper around curl. You could also use libcurl directly, the effort is almostr the same.

Thank you for your attention, as you said I should try to use the libcurl library, but if it is also required to visit HTTPS OpenSSL?
PB
Part Of The Furniture
Part Of The Furniture
Posts: 4183
Joined: Sun Jan 03, 2010 5:45 pm

Re: [Help](I am a rookie) I can't Build wxCURL help help help !~!~!~

Post by PB »

I recommend reading libcurl install guide at https://curl.haxx.se/docs/install.html which also covers the situation with OpenSSL.
lfjking
Earned some good credits
Earned some good credits
Posts: 102
Joined: Mon Nov 14, 2016 1:35 pm

Re: [Help](I am a rookie) I can't Build wxCURL help help help !~!~!~

Post by lfjking »

PB wrote:I recommend reading libcurl install guide at https://curl.haxx.se/docs/install.html which also covers the situation with OpenSSL.

Thanks,
I wondered whether it can be directly linked to OPENSSL wxHTTP, this step is a simple point than the use of curl?
After all, I just want to link to HTTPS only

But now, But I now downloaded the curl, and I will be using the command line to download the form of the required additional, to my purpose
Complete the work, and then in-depth understanding CURL this interesting library
Thank you very much for your help!
Post Reply