I keep getting linker errors for winsock2 functions whenever I compile. I'm using DevC++ with the default compiler. It's definately not a code problem. It's got to be something in the Options somewhere. Anyone got an idea?
I keep getting linker errors for winsock2 functions whenever I compile. I'm using DevC++ with the default compiler. It's definately not a code problem. It's got to be something in the Options somewhere. Anyone got an idea?
Code:#include <iostream.h> int var; int test(); int main() { cout << "Please input your language:\n 1. C (C,C++,C#)\n 2. VB\n 3. Other\n"; cin >> var; return test(); } int test() { if(var == 1) { cout << "Y0u 4r3 t3h 1337\n"; system("PAUSE"); return main(); } else if(var == 2) { cout << "N00B3R!\n"; system("PAUSE"); return main(); } else if(var == 3) { cout << "You were not thought of.\n"; system("PAUSE"); return main(); } else { return 0; }}
You need to link to libws2_32.a
Im not familiar with devc++, so I'm not exactly sure how you tell the linker which libraries to link to, but it's probably in the options somewhere.
Ahhh. Thanks, man. Worked great.
Code:#include <iostream.h> int var; int test(); int main() { cout << "Please input your language:\n 1. C (C,C++,C#)\n 2. VB\n 3. Other\n"; cin >> var; return test(); } int test() { if(var == 1) { cout << "Y0u 4r3 t3h 1337\n"; system("PAUSE"); return main(); } else if(var == 2) { cout << "N00B3R!\n"; system("PAUSE"); return main(); } else if(var == 3) { cout << "You were not thought of.\n"; system("PAUSE"); return main(); } else { return 0; }}