Home » Extra libraries, Code snippets, applications etc. » C++ language problems and code snippets » UDP Server/Client with Winsock 
	
		
		
			| UDP Server/Client with Winsock [message #49844] | 
			Wed, 16 May 2018 16:58   | 
		 
		
			| 
				
	 | 
 
	
		Hello, 
 
i'm using version 11873 of TheIDE. I try to compile a code to do UDP connexion between server and client using Winsock. 
 
Compiling is OK but linking finish with error: 
 
undefined reference to WSAStartup 
 
I think GCC don't found ws2_32.lib, but the path where this file is present is ok (...mingw64/32/i686-w64-mingw32/lib) and i have add "-lws2_32" in Common link option. 
 
Where is my error ? Sorry i don't speak very well English. 
		
	- 
	
 
	Attachment: udp.png
	 
	(Size: 112.41KB, Downloaded 413 times)
 
 
		
		
 |  
	| 
		
	 | 
 
 
 |  
	
		
		
			| Re: UDP Server/Client with Winsock [message #49845 is a reply to message #49844] | 
			Wed, 16 May 2018 19:38    | 
		 
		
			
				
				
				  | 
					
						  
						Klugier
						 Messages: 1106 Registered: September 2012  Location: Poland, Kraków 
						
					 | 
					Senior Contributor  | 
					 | 
		 
		 
	 | 
 
	
		Hello, 
 
We definitely needs more information. Can you post your compilation output? Moreover, it will be nice to have the code you are linking against. 
 
___________ 
Off topic, I see you created Android builder. Nice to know   
 
Sincerely, 
Klugier 
		
		
  U++ - one framework to rule them all.
		[Updated on: Wed, 16 May 2018 19:38] Report message to a moderator  
 |  
	| 
		
	 | 
 
 
 |  
	
		
		
			| Re: UDP Server/Client with Winsock [message #49847 is a reply to message #49844] | 
			Thu, 17 May 2018 08:47    | 
		 
		
			| 
				
	 | 
 
	
		Hello 
 
I'm just trying to make a server client in UDP using Winsock (so under Windows). 
I use the Windows version of TheIDE. 
Here is the source code, it's just the beginning. 
 
I had already tested TCP socket under Freebsd, and did not have the problem of linking. 
 
I did some tests with Android, it works well. 
 
Thank you for your help.
		
		
		
 |  
	| 
		
	 | 
 
 
 |  
	| 
		
 |  
	| 
		
 |  
	| 
		
 |  
	| 
		
 |   
Goto Forum:
 
 Current Time: Tue Nov 04 17:12:28 CET 2025 
 Total time taken to generate the page: 0.06077 seconds 
 |