473,386 Members | 1,745 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

Additional Dependencies for Linker: ws2_32.lib

Rabbit
12,516 Expert Mod 8TB
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->Win32WrapperClass 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 15181
Banfa
9,065 Expert Mod 8TB
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 Expert Mod 8TB
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 Expert Mod 8TB
Try it as ws2_32 anyway, this may still apply.

And undefined reference to what?
Apr 5 '07 #4
Rabbit
12,516 Expert Mod 8TB
Nevermind, I got it. I had to use libwsock32.a instead.
Apr 5 '07 #5
Rabbit
12,516 Expert Mod 8TB
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 Expert Mod 8TB
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
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...
0
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...
0
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...
5
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...
2
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...
1
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...
3
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...
1
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...
6
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...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

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.