This is a Windows Console application (actually a service) that a previous guy built 4 years ago and is installed and running. I now need to make some changes but can’t even build the current version! Here is the build output:
--------------------Configuration: MyApp - Win32 Debug-------------------- Compiling resources... Compiling... Main.cpp winsock.cpp Linking... LINK : warning LNK4098: defaultlib 'LIBCMTD' conflicts with use of other libs; use /NODEFAULTLIB:library Main.obj : error LNK2001: unresolved external symbol _socket_dontblock Debug/MyApp.exe : fatal error LNK1120: 1 unresolved externals Error executing link.exe. MyApp.exe - 2 error(s), 1 warning(s) --------------------------------------------------------------------------
If I use /NODEFAULTLIB then I get loads of errors. The code does not actually use _socket_noblock but I can’t find anything on it on the ‘net. Presumably it is used by some library I am linking to but I don’t know what library it is in.
— Alistair.
Sorry, this turns out to be an internal problem. A combination of a maverick coder 4 years ago and a rusty no-nothing (me!) now.
The code does not use
_socket_noblockbut it does usesocket_noblockand I just need to link to one of our own libraries.