WP8 2.1 Curl lib now compiled and working!

I have been trying to figure this one out for a while, lots of research.

The general consensus was that it could not be compiled on wp8, which made me sad, one the reasons I saw was the fact that windows phone does’nt include winsock. But of cause wp 8 does include winsock, to my surprise this was very easy to build and compile with a few alterations. I have tested, and my sample project it works.

I have only enabled the http option as there were a lot of additional libs which I’m not sure if windows phone 8 supports, I know you can compile openssl for so I will now try get this working

As always if anyone is interested I can post further instructions on how to set this up.

I think I’m nearly feature complete with wp 8 now which is great, I can now start finishing my game!

That’s excellent Ryan, well done! When you say you are almost feature complete, do you mean you are working toward getting the whole of cocos2d-x working on Windows Phone 8? If that’s correct, would you be interested in sharing your work? I know many people on this forum (myself included) are interested in just such a project.

Ben

Yeah I will get it all on git or bitbucket, I got OpenSSL working with curl also which was pretty massive, as I thought I’d never be able to get curl working in the first place.

I also tested twitcurl c++ as that requires OpenSSL and curl, it all worked which was nice.

I needed to also be able to convert dds images on the fly wp8 doesnt support WIC which would allow this, so I converted an opensource image manipulation tool called devil
http://openil.sourceforge.net/

That is also working for what I need at least,

There is also the tableview and scroll view extensions I now have working.

Really I’d like to make it stable now, as I’m sure wp8 version of cocos2d-x doesn’t support text alignment, which is really bugging me.

Then do documentation, as thats one off the biggest complaints about cocos2d-x

hi Ryan,could you please share you curl lib?:slight_smile:
i’m now porting my game from ios to wp8,but the libcurl doesn’t work for wp8.

Curl is attached!

Its straight forward to use
Add libs to linker, make sure the paths can be found in your paths!
Directly import the the dll’s into the project, so they can be found by the app

Set each dll to be content and it does not particpate in the build otherwise the app will not be able to consume them and you will get an error.

Make sure curl headers are included.

Feed back appreciated

Just right click on the file and go to properties to do this.

Enjoy!

[[http://metapps.co.uk/wp8curl.zip]]
Its says the file is too large so I’ve uploaded to my own server

thanks very much,but i can’t use it successfully:( could you please make a easy demo just like curltest?

What problems you having, any errors?

I can’t add libs to linker there is link error

Thank you, will try this out tonite ! :slight_smile:

unresolved external symbol
error LNK2001: unresolved external symbol impcurl_easy_perform
error LNK2001: unresolved external symbol impcurl_easy_setopt
error LNK2001: unresolved external symbol impcurl_easy_init
error LNK2001: unresolved external symbol impcurl_easy_cleanup

@Ryan Blake
could you please make a demo works Correctly like curltest

Make sure the libs are added to the linker, that is what is causing your error, look how cocos2d add external libs this should help, they must bee added to the project you are working within.

i’m sorry,but i still can’t make curl lib working perfectlly.

are you missing libcurl.winmd?

hi,Ryan:
I add your dll files into my project,every thing is fine but when I upload the .xap file to wp store,there are a lot of error occur:

1028: The native API MSVCR110D.dll:memchr() isn’t allowed in assembly libcurl.dll. Update it and then try again.
1028: The native API MSVCR110D.dll:strcpy() isn’t allowed in assembly OpenSSLWP8.dll. Update it and then try again.
1028: The native API vccorlib110d.DLL:??0ValueType@Platform@Q$AAAXZ () isn’t allowed in assembly OpenSSLWP8.dll. Update it and then try again.
1028: The native API MSVCR110D.dll:wcslen() isn’t allowed in assembly OpenSSLWP8.dll. Update it and then try again.
1028: The native API MSVCR110D.dll:_initterm_e() isn’t allowed in assembly libcurl.dll. Update it and then try again.
1028: The native API MSVCR110D.dll:?terminate@@YAXXZ() isn’t allowed in assembly OpenSSLWP8.dll. Update it and then try again.

Did you build these libs with debug mode?

Could you build a relase version to me? Or share me the source code and project I build it by myself.

Everything have been done only except this,I’m very anxiety. :~(

Thanks in advance

Yeah it was all debug mode, nice to see to see you got it working. I can add release package soon

Yeah it was all debug mode, nice to see to see you got it working. I can add release package soon

Ryan Blake wrote:

Yeah it was all debug mode, nice to see to see you got it working. I can add release package soon

Oh

I’m waiting for you online

Thanks again!

Ryan Blake wrote:

Yeah it was all debug mode, nice to see to see you got it working. I can add release package soon

Hi,Ryan:
I know it’s so impolite,but I am anxiously awaiting your release libs to upload my new game,could you build these to me ASAP?

I hope you can understand my mood.

I will enormously grateful for your help.:slight_smile:

I am still waiting……:frowning:

hi all, wp8 support libcurl now
https://github.com/cocos2d/cocos2d-x/tree/master/cocos2dx/platform/third_party/wp8/libcurl