473,554 Members | 2,300 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

linker problem LNK4089 with WS2_32.dll

Hello

I receive (only in Release build) the following linker warning:

LINK : warning LNK4089: all references to 'WS2_32.dll' discarded by /OPT:REF

If I set WS2_32.lib in project properties under ignore specific library,
then I receive:

ABContainer.obj : error LNK2019: unresolved external symbol
__imp__WSAClean up@0 referenced in function "public: __thiscall
ATL::_AtlWSAIni t::~_AtlWSAInit (void)" (??1_AtlWSAInit @ATL@@QAE@XZ)
EtvData.obj : error LNK2001: unresolved external symbol __imp__WSAClean up@0
helper.obj : error LNK2019: unresolved external symbol __imp__WSAClean up@0
referenced in function "public: void * __thiscall ATL::CSecBuffer ::`vector
deleting destructor'(uns igned int)" (??_ECSecBuffer @ATL@@QAEPAXI@Z )
MAPITable.obj : error LNK2001: unresolved external symbol
__imp__WSAClean up@0
Release/ETVAB32.dll : fatal error LNK1120: 1 unresolved externals

How do I resolve this problem (except suppressing the warning somehow)?

Eric
Jul 22 '05 #1
4 4845
I have received this warning for all my life and never care about it.

--
Ravi Ambros Wallau
r w a l l a u @ s p r i n g w i r e l e s s . n e t

"Eric" <ba********@kul l.ch.nospam.me. com> wrote in message
news:cl******** **@newshispeed. ch...
Hello

I receive (only in Release build) the following linker warning:

LINK : warning LNK4089: all references to 'WS2_32.dll' discarded by
/OPT:REF

If I set WS2_32.lib in project properties under ignore specific library,
then I receive:

ABContainer.obj : error LNK2019: unresolved external symbol
__imp__WSAClean up@0 referenced in function "public: __thiscall
ATL::_AtlWSAIni t::~_AtlWSAInit (void)" (??1_AtlWSAInit @ATL@@QAE@XZ)
EtvData.obj : error LNK2001: unresolved external symbol
__imp__WSAClean up@0
helper.obj : error LNK2019: unresolved external symbol __imp__WSAClean up@0
referenced in function "public: void * __thiscall ATL::CSecBuffer ::`vector
deleting destructor'(uns igned int)" (??_ECSecBuffer @ATL@@QAEPAXI@Z )
MAPITable.obj : error LNK2001: unresolved external symbol
__imp__WSAClean up@0
Release/ETVAB32.dll : fatal error LNK1120: 1 unresolved externals

How do I resolve this problem (except suppressing the warning somehow)?

Eric

Jul 22 '05 #2
Eric wrote:
Hello

I receive (only in Release build) the following linker warning:

LINK : warning LNK4089: all references to 'WS2_32.dll' discarded by

/OPT:REF

[snip]

Please note - this is comp.lang.c++ and (having cunningly read your
mind - and your annoyingly long list of cross-posted NGs - as to your
platform/compiler):

C++ language != MS Windows programming

C++ language != MS Windows programming in VC++, .NET, whatever

C++ language != linking on specific platforms (or linking at all, for
that matter)

You are way OT. Go somewhere else.

PS. Your Help system tells you *exactly* why you are getting that
warning. Look it up, then troll off.

--
Lionel B

Jul 22 '05 #3
Eric wrote:
I receive (only in Release build) the following linker warning:

LINK : warning LNK4089: all references to 'WS2_32.dll' discarded by
/OPT:REF


just live with it. It's no indication of any problem with your code, it
just means that WS2_32.dll file will not be necessary to run your app.
It does *not* however mean that its coresponding .lib is not used by
your app, as you can clearly see by other error message.
B.

Jul 22 '05 #4
"Eric" <ba********@kul l.ch.nospam.me. com> wrote in message news:cl******** **@newshispeed. ch...
LINK : warning LNK4089: all references to 'WS2_32.dll' discarded by /OPT:REF
How do I resolve this problem (except suppressing the warning somehow)?


Sometimes, there are libraries in your project settings which
you aren't really using. But this is not always the case. Some
of the Microsoft header files contain pragma's that add libraries
to the compilation, even if your EXE won't actually need them.
The LNK4089 warning is the linker telling you that it was
able to eliminate dependence on some DLL's and make your
EXE smaller. I don't like seeing the LNK4089 warnings myself.
The solution is to add

/IGNORE:4089

to your Linker, "Command Line" project settings. That's all you
have to do.

Jul 22 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
1771
by: Pankaj Bhagat | last post by:
Hi, This is in context with compiler and linker Can someone let me know 1) what is a binder? where is it needed? What does it do in a compiling process? ----------------- 2) When I have a g++ on linux, does the g++ or gcc have the linker and binder inbuilt in it?
1
4487
by: mariox | last post by:
Hi everybody, compiling a program I receive this message: Fatal: Unable to open file 'WS2_32.OBJ' Object file "programName.OBJ" is created, but I can't link it. Anyone can help me, please? PS: I use Borland C++ 5.5.1 (with service pack 2) and O.S. winXP.
2
8632
by: Zarnywoop | last post by:
Hi, Could someone offer a solution to the following issue I have with vc7.1. With VC6 it was possible to turn off linker warnings with a #pragma comment( linker, "/ignore:4049" ) line in the source. With VC7.1 the linker now reports that /ignore is unrecognised, and sure enough when consulting the docs. the option is no
1
4044
by: ComputerGanesh | last post by:
" The procedure entry point getaddrinfo could not be located in dynamic link library WS2_32.dll " error is occured while running my app. I don't know how to clear this error. Please reply me. Thanx -- Computer Ganesh
1
4802
by: run | last post by:
My enveronment - IE6 - .Net 1.1 sp1 - Windows 2000 sp4 I cannot use function "CSMTPConnection" on Vc++.Net on Windows 2000. because WS2_32.dll on error message as "The procedure entry point getaddrinfo could not be located in the dynamic link library WS2_32.dll". How i can updated winsock new version on windows2000? I want to execute...
0
1725
by: Yogesh Ketkar | last post by:
I have a asp .net application talking to some remoting objects. application hosting remoting objects runs on the same machine. From a last couple of days I have started getting System.DllNotFoundException: Unable to load DLL (ws2_32.dll). error when I run my asp.net application. Does anyone have any clue about this.
6
15198
Rabbit
by: Rabbit | last post by:
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...
2
2773
by: Oneironaut | last post by:
Hello friends, I have an issue with a linker warning. It is the warning LNK4089. I am working in MSVC6.0 I investigated and this warning tells that the import of the library to which it makes reference is redundant, thus the linker ignores that library in order to make the code smaller. As it is expected, it only appears for release...
1
4147
by: Deepath G | last post by:
This is deepath.. I am getting some linker error when i am trying to connect Websphere MQ using Borland C++ Builder 2006 using imqi.hpp on windows. Error Message ----------------------- Error: Unresolved external 'ImqMgr::~ImqMgr()' referenced from C:\DOCUMENTS AND SETTINGS\228753\MY DOCUMENTS\BORLAND STUDIO...
0
7812
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. ...
0
7894
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...
0
6161
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...
1
5442
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...
0
5162
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3579
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...
0
3561
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1145
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
850
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.