|
Question : warning LNK4089: all references to "WSOCK32.dll" discarded by /OPT:REF
|
|
We have a command line application run as a server before, and now, a typical windows user interface is required.
So, a new SDI MFC application is created under MS Visual C++ 6.0, and is integrated with the old application by modifying input/output. It can be built and works well with debug mode. While the release version being built, a warning appears like:
LINK : warning LNK4089: all references to "WSOCK32.dll" discarded by /OPT:REF
After the "/verbose" switch is added to linker, there hundreds functions are discarded.
The old application was not developed based on MFC. Does anyone know what the problem is?
|
|
Answer : warning LNK4089: all references to "WSOCK32.dll" discarded by /OPT:REF
|
|
This is NOT a problem...
What this _WARNING_ means is that you've told the linker to link WSOCK32.DLL into your application but since you also said "/OPT:REF" (which means REMOVE ALL LINKED FUNCTIONS THAT ARE NOT USED) it's telling you that NO FUNCTIONS from WSOCK32.DLL were needed.
Bottom line is that your inclusion of WSOCK32.LIB into this application is NOT NEEDED.
Got it?
|
|
|
|