Link Error Undefined Reference To Wsastartup 8
Contents |
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and
Undefined Reference To Wsastartup@8' Code Blocks
policies of this site About Us Learn more about Stack Overflow the undefined reference to wsastartup@8' dev c++ company Business Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags undefined reference to `wnetaddconnection2a@16' Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 6.2 million programmers, just like you, helping each other. Join them; it only
Undefined Reference To Getaddrinfo
takes a minute: Sign up I'm trying to compile a socket program in DevC++ but everytime I do it I get a lot of linker errors like these: up vote 0 down vote favorite I have previously run the socket program successfully in Linux but I have to export it to WindowsXP, and I must admit I'm relatively new to programming
Mingw Winsock
in WindowsXP. These are the header files I used in the WindowsXP version [Linker error] undefined reference to `WSAStartup@8' [Linker error] undefined reference to `htons@4' [Linker error] undefined reference to `inet_pton' [Linker error] undefined reference to `socket@12' #define WIN32_LEAN_AND_MEAN #include
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and lws2_32 policies of this site About Us Learn more about Stack Overflow the company
Undefined Reference To `_uuidfromstringa@8'
Business Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users undefined reference to `doformatmessage' Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 6.2 million programmers, just like you, helping each other. Join them; it only takes a http://stackoverflow.com/questions/29028023/im-trying-to-compile-a-socket-program-in-devc-but-everytime-i-do-it-i-get-a-l minute: Sign up undefined reference to '_WSAStartup@8'. How to link libraries with NB? up vote 3 down vote favorite I use NetBeans, Windows and Cygwin with g++ compiler. I'm examining Windows Sockets 2. I do everything that is written in MS manual. I have a code (mostly from this manual): #include
Programming Boards C Programming undefined reference to `WSAStartup@8' Getting started with C or C++ | C Tutorial | C++ Tutorial http://cboard.cprogramming.com/c-programming/60326-undefined-reference-%60wsastartup@8.html | C and C++ FAQ | Get a compiler | Fixes for http://www.cplusplus.com/forum/beginner/83256/ common problems Thread: undefined reference to `WSAStartup@8' Thread Tools Show Printable Version Email this Page… Subscribe to this Thread… Display Linear Mode Switch to Hybrid Mode Switch to Threaded Mode 01-05-2005 #1 wicked View Profile View Forum Posts Registered User Join Date Jan 2005 Posts 11 undefined reference undefined reference to `WSAStartup@8' As the topic suggests I'm having trouble linking libs under Dev C++ 4(windows 2000). Also when creating a C project all my code I write providing it's more than a simple "hello world" kind of application doesn't seem to compile unless I change it's source file to .cpp rather than .c and no I'm not using c++ functions in undefined reference to the program. To get around these problems I've been having I've had to use MSVC++ changing the .c file to .cpp and use #pragma comment(lib, "wsock32.lib") rather than linking libs normally. wicked 01-05-2005 #2 Fordy View Profile View Forum Posts Visit Homepage &TH of undefined behavior Join Date Aug 2001 Posts 5,792 If memory serves correct, the libraries in DevC++ have a different naming convention to other compilers. In most compilers you would use "wsock32.lib", but I think in DevC++ it's called "libwsock32.a" or something similar. Try find this lib and link to it. Board Rules Blog 01-05-2005 #3 wicked View Profile View Forum Posts Registered User Join Date Jan 2005 Posts 11 Thats the thing, I've got no idea how to link to it via Dev C++ 4. wicked 01-05-2005 #4 anonytmouse View Profile View Forum Posts Yes, my avatar is stolen Join Date Dec 2002 Posts 2,544 Add "-lwsock32" (without the quotes) to the linker box under Project->Project Options->Parameters. If you have not set up a project, you will have to do that first. Go to File->New->Project->Empty Projec
help me,here is my program 1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
#include