Jump to content
  • Advertisement
Sign in to follow this  
JPulham

HELP... HTTP-GET NOT WORKING!

This topic is 4624 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I was told to use HTTP-GET (http://www.mindcontrol.org/~hplus/http-get.html) to access online information, but when I try to compile it crashes! how can I fix this or is there a better library? I'm using Visual C++ toolkit 2003 with Code:Blocks.

Share this post


Link to post
Share on other sites
Advertisement
Can you give us the error on crash? Does it just exit silently? Is it a memory access violation?

As for a better library, it depends. What are you trying to do?


jfl.

Share this post


Link to post
Share on other sites
Its not a crash... I ment error, soz. It just says that some of the libs don't xist and some of the types don't either. i was wondering if there were any dependancies.
What I am trying to do is get a stream back from a PHP master server and feed it back into an XML parser.

Share this post


Link to post
Share on other sites
Things not existing is usually a sign that you haven't #included or using'd everything you need to. Without more info no-one can tell you more than that.

Share this post


Link to post
Share on other sites
I knew it was a bit vague, but I was wondering if anyone had the same problem. If not, using a different library would be better, thats what this is mostly about... finding a compatible lib. I've seen libCurl and been told it was good but havn't tried it yet. If it links ok then I'll use it, but if anyone has had problems with the HTTP-GET then I would make the changes and go back to that.

Share this post


Link to post
Share on other sites
Ok ... I've removed the Unix/Linux stuff... the preprocessors aren't filtering them out for some reason.
However I get 3 errors and I think the last two are because of the first:

mynetwork.cpp(215) : error C2146: syntax error : missing ';' before identifier 'addr_'
mynetwork.cpp(215) : error C2501: '`anonymous-namespace'::HTTPQuery::sockaddr_in' : missing storage-class or type specifiers
mynetwork.cpp(215) : error C2501: '`anonymous-namespace'::HTTPQuery::addr_' : missing storage-class or type specifiers

Any suggestions?

Share this post


Link to post
Share on other sites
You should #define WIN32 instead of modifying the headers. I have never used Code::Blocks, but there must be some way to globally define it in the IDE. I got HTTP-GET to work fine (with a change in character set, but I don't think that applies to you).

Otherwise, you could always 'upgrade' to Visual C++ 2005. The Express Edition is still free (if you decide to upgrade, you need to read this as well).


jfl.

Share this post


Link to post
Share on other sites
I already have the Express edition and I'm using all third party libraries so I don't need the PSDK (but I have it anyway :P)

Share this post


Link to post
Share on other sites
I defined WIN32 but now I get these unresolved externals

sock_port.obj : error LNK2019: unresolved external symbol __imp__CoCreateInstance@20 referenced in function "long __cdecl `anonymous namespace'::WindowsFirewallInitialize(struct INetFwProfile * *)" (?WindowsFirewallInitialize@?A0xc0f7dc6c@@YAJPAPAUINetFwProfile@@@Z)
sock_port.obj : error LNK2019: unresolved external symbol __imp__SysFreeString@4 referenced in function "long __cdecl `anonymous namespace'::WindowsFirewallAppIsEnabled(struct INetFwProfile *,unsigned short const *,int *)" (?WindowsFirewallAppIsEnabled@?A0xc0f7dc6c@@YAJPAUINetFwProfile@@PBGPAH@Z)
sock_port.obj : error LNK2019: unresolved external symbol __imp__SysStringLen@4 referenced in function "long __cdecl `anonymous namespace'::WindowsFirewallAppIsEnabled(struct INetFwProfile *,unsigned short const *,int *)" (?WindowsFirewallAppIsEnabled@?A0xc0f7dc6c@@YAJPAUINetFwProfile@@PBGPAH@Z)
sock_port.obj : error LNK2019: unresolved external symbol __imp__SysAllocString@4 referenced in function "long __cdecl `anonymous namespace'::WindowsFirewallAppIsEnabled(struct INetFwProfile *,unsigned short const *,int *)" (?WindowsFirewallAppIsEnabled@?A0xc0f7dc6c@@YAJPAUINetFwProfile@@PBGPAH@Z)
sock_port.obj : error LNK2019: unresolved external symbol __imp__CoUninitialize@0 referenced in function "bool __cdecl ENABLE_FIREWALL(void)" (?ENABLE_FIREWALL@@YA_NXZ)
sock_port.obj : error LNK2019: unresolved external symbol __imp__CoInitialize@4 referenced in function "bool __cdecl ENABLE_FIREWALL(void)" (?ENABLE_FIREWALL@@YA_NXZ)

Are there any libs I need? I linked WSock32.lib, what else do I need?

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!