Ok, first errorOriginally Posted by Tonto
[Linker error] undefined reference to `WSAStartup@8'
Another error
4 C:\Programs\Dev-Cpp\Templates\main6.cpp `main' must return `int'
Ok, first errorOriginally Posted by Tonto
[Linker error] undefined reference to `WSAStartup@8'
Another error
4 C:\Programs\Dev-Cpp\Templates\main6.cpp `main' must return `int'
Last edited by maxorator; 08-22-2005 at 11:45 PM.
Originally Posted by maxorator
main must start with int, and return a int,
the following is a example on how main should be declared.
for some applications you may needCode:int main() { return 0; }
INT WINAPI MAIN()
or
int WINAPI MAIN()
either way it shoudl start with int and return int.
that will get rid of that error.
for your other error your not linking to something correctly
your prolyl doing a consoel application when you should
be picking a windows application on devc++.
If all you want to do is download files clean and simple, the solution was already given in the third post.
Check what headers and libs you need at the link given by Tonto. Make sure you check return values.Code:URLDownloadToFile( NULL, "http://www.google.com/intl/en_us/images/logo.gif", "c:\\google_logo.jpg", 0, NULL );
Maybe socket programming is a bit over your head just now and all you need is this simplified functionality.
hth
-nv
She was so Blonde, she spent 20 minutes looking at the orange juice can because it said "Concentrate."
When in doubt, read the FAQ.
Then ask a smart question.
What header file do I need for that?Originally Posted by nvoigt
Check what headers and libs you need at the link given by Tonto.
hth
-nv
She was so Blonde, she spent 20 minutes looking at the orange juice can because it said "Concentrate."
When in doubt, read the FAQ.
Then ask a smart question.