473,698 Members | 2,471 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Additional Dependencies for Linker: ws2_32.lib

Rabbit
12,516 Recognized Expert Moderator MVP
You will also need to add ws2_32.lib to the list of library files, so the linker wont freak. To do this, go to the Visual Studio menu, Project->Win32WrapperCl ass Properties->Linker->Input and add ws2_32.lib to the Additional Dependencies field.
So the tutorial says I need to do this, unfortunately I'm using DevC++.

I was looking through the menus and I found the "Further object files or linker options" under project options. So I thought this might be the equivalent. However, there was no ws2_32.lib but there was a libws2_32.a which I assumed was the same thing.

So I include that but the Linker's still throwing "undefined reference"
Apr 5 '07 #1
6 15206
Banfa
9,065 Recognized Expert Moderator Expert
Does DevC++ run in CygWin?

CygWin does this funny thing where it adds the lib and the .a for you so you should specify the library as ws2_32

I think it's a Linux thing, definitely one of the stranger ones, I hate programs that assume things.


P.S. Udefined reference to what?
Apr 5 '07 #2
Rabbit
12,516 Recognized Expert Moderator MVP
Does DevC++ run in CygWin?

CygWin does this funny thing where it adds the lib and the .a for you so you should specify the library as ws2_32

I think it's a Linux thing, definitely one of the stranger ones, I hate programs that assume things.


P.S. Udefined reference to what?
It's Mingw but it can run under CygWin.

I'm also on Windows.
Apr 5 '07 #3
Banfa
9,065 Recognized Expert Moderator Expert
Try it as ws2_32 anyway, this may still apply.

And undefined reference to what?
Apr 5 '07 #4
Rabbit
12,516 Recognized Expert Moderator MVP
Nevermind, I got it. I had to use libwsock32.a instead.
Apr 5 '07 #5
Rabbit
12,516 Recognized Expert Moderator MVP
I wonder if it was the tutorial that's wrong or if the libraries in DevC++ are named differently from the libraries in Visual C++.
Apr 5 '07 #6
Banfa
9,065 Recognized Expert Moderator Expert
no there are 3 libraries in MSVC++ as well which your 2 are equivalent to your 2 of I suspect

winsock.lib     <-- 16 bit Windows Sockets 1
wsock32.lib   <-- 32 bit Windows Sockets 1
ws2_32.lib      <-- Windows Sockets 2
Apr 5 '07 #7

Sign in to post your reply or Sign up for a free account.

Similar topics

0
1810
by: TGF | last post by:
Hello, I am creating a console app. I try to link a static library by including it in the Linker-Input-Additional Dependencies field under the Project properties. Then I specify the path to the library in Linker-General-Addition Library Directories field under the Project options. The first question I have is....is this the correct way to include a static library. If not, then what is the correct way to do it (I need to make .NET...
0
1628
by: TGF | last post by:
Hello, I am creating a console app. I try to link a static library by including it in the Linker-Input-Additional Dependencies field under the Project properties. Then I specify the path to the library in Linker-General-Addition Library Directories field under the Project options. The first question I have is....is this the correct way to include a static library. If not, then what is the correct way to do it (I need to make .NET...
0
932
by: Harald Hoyer | last post by:
My solution consists of a DLL and an EXE. I set "Project dependencies", so that EXE depends on DLL. When the DLL is compiled as usual, I can see that the lib of the DLL is used in linker step of the EXE ("Configuration Properties/Linker/Command Line"). Everything is fine. When I change the DLL to managed, the corresponding lib disappears in linker step of the EXE. I need to add it manually at "Configuration...
5
6046
by: Pradnyesh Rane | last post by:
Hi, I am encountering the following linker error on VC7. LINK : fatal error LNK1171: unable to load ole32.dll This error is only encountered for the "Debug" configuration. The project successfully compiles/links in "Release" configuration. Any help is welcome.
2
2364
by: Stevet96 | last post by:
I am building a C++ library using VS .NET 2003. I am adding a library into the Additional Dependencies input box. I then click apply and check the resulting command line. This causes the library to be added twice. The first instance is just the library name, the second instance is the full path and library name. For example, adding test.lib to Additional dependencies results in: test.lib "C:\\test.lib" This causes the linker to...
1
1058
by: noleander | last post by:
I've got a Visual C++ solution containing two projects: A and B. A depends on B. When I change a source code file in B, then try to build A, I want B to get built automatically before A. How is this done? I tried putting B's output target file (foo.lib) in A's project properties "dependencies" list under Properties > Linker > Input > Additional Dependencies; but that did not work. Thanks in advance for any help, neal
3
8066
by: Chucker | last post by:
Hi Folks, I got a Wrapper Dll around a native C++ static library. In .NET 1.1 this worked fine. When moving to .NET 2.0 I get a couple of unresolved externals / linker errors: Error 16 error LNK2028: unresolved token (0A000007) "extern "C" void __clrcall ___CxxCallUnwindDtor(void (__clrcall*)(void *),void *)" (?___CxxCallUnwindDtor@@$$J0YMXP6MXPAX@Z0@Z) referenced in function "public: virtual __thiscall...
1
2264
by: Felix | last post by:
After porting a project from VC6 to VC.NET 2003 I have a very strange problem generating link error 1104 for import libraries. I just ported the project and made some small adaptions so it fits the new IDE. The project itself links against some import libraries belonging to dll's I wrote (these dll's have been ported too, of course). To keep things simple I only use one import library here. To tell the linker it should link against
6
17017
by: =?Utf-8?B?WW9naSBXYXRjaGVy?= | last post by:
Hello, I am using Visual Studio-2003. I created a project to build my library. Since I am using third party libraries as well, I have specified those additional library dependencies in project as "Additional Dependencies" under Linker-Input options. Since those libraries are also in different directory, I specified that library path in project as "Additional Library Directories" under Linker-General options. This is where I see some...
0
8683
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9170
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
8901
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8871
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7739
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6528
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4371
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4622
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3052
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.