Closed KrisD888 closed 8 months ago
Patches are welcome
Ok. After some investigation I have found that Microsoft's winsock2.h has recently changed in their later SDKs and added the following:
inline UINT32 SocketNotificationRetrieveEvents ( In OVERLAPPED_ENTRY* notification ) { return (UINT32)notification->dwNumberOfBytesTransferred; }
This then causes LNK2004 warnings when ldns is built and hence the LNK2005 errors with mod_enum that uses ldns.
The problem is the following inside freeswitch\libs\ldns\ldns\config.h (as pulled in by freeswitch when building for the first time: http://files.freeswitch.org/downloads/libs/ldns-1.6.9-1-win.tar.gz) - Lines 262-264:
If this is changed to the following then this will fix this issue and also work with older Windows SDKs:
Andy I hope you can simply make this change inside the ldns project and this issue will be fixed.
Thanks,
Andrew
Hi Andrew. No need to update the tarball. We have this file in the source tree: https://github.com/signalwire/freeswitch/blob/master/libs/win32/ldns/ldns-lib/config.h#L263
Andrey,
PR done here awaiting your approval: https://github.com/signalwire/freeswitch/pull/2188
Andrew
I just downloaded Master and compiled it. The 30 errors are now fixed but these two still show up upon opening of the solution.
E:\FS_GIT\docs\docs.2017.vcxproj : error : The project file could not be loaded. Could not find file 'E:\FS_GIT\docs\docs.2017.vcxproj'. E:\FS_GIT\docs\docs.2017.vcxproj E:\FS_GIT\fscomm\FSComm.2017.vcxproj : error : The project file could not be loaded. Could not find file 'E:\FS_GIT\fscomm\FSComm.2017.vcxproj'. E:\FS_GIT\fscomm\FSComm.2017.vcxproj
KrisD888: You need to simply not build these by removing them from the solution - see my (yet to be approved) PR: https://github.com/signalwire/freeswitch/pull/2192
I hope that helps.
Describe the bug 30 multiply defined symbols errors when building Freeswitch project mod_enum and errors loading docs.2017.vcxproj and FSComm.2017.vcxproj
To Reproduce Steps to reproduce the behavior:
The rest of the solution compiles OK and Freeswitch runs well without mod_enum.
Expected behavior It would be nice to clear up these errors even though they don't seem to affect my operation.
Package version or git hash FreeSWITCH Version 1.10.10-dev-5874~e764f292b5~64bit (e764f292b5 64bit)
Build Errors
Severity Code Description Project File Line Suppression State Error LNK2005 SocketNotificationRetrieveEvents already defined in ldns.lib(rdata.obj) mod_enum E:\FS_GIT\src\mod\applications\mod_enum\ldns.lib(dname.obj) 1
Error LNK2005 SocketNotificationRetrieveEvents already defined in ldns.lib(rdata.obj) mod_enum E:\FS_GIT\src\mod\applications\mod_enum\ldns.lib(rr.obj) 1
Error LNK2005 SocketNotificationRetrieveEvents already defined in ldns.lib(rdata.obj) mod_enum E:\FS_GIT\src\mod\applications\mod_enum\ldns.lib(packet.obj) 1
Error LNK2005 SocketNotificationRetrieveEvents already defined in ldns.lib(rdata.obj) mod_enum E:\FS_GIT\src\mod\applications\mod_enum\ldns.lib(resolver.obj) 1
Error LNK2005 SocketNotificationRetrieveEvents already defined in ldns.lib(rdata.obj) mod_enum E:\FS_GIT\src\mod\applications\mod_enum\ldns.lib(host2str.obj) 1
Error LNK2005 SocketNotificationRetrieveEvents already defined in ldns.lib(rdata.obj) mod_enum E:\FS_GIT\src\mod\applications\mod_enum\ldns.lib(str2host.obj) 1
Error LNK2005 SocketNotificationRetrieveEvents already defined in ldns.lib(rdata.obj) mod_enum E:\FS_GIT\src\mod\applications\mod_enum\ldns.lib(util.obj) 1
Error LNK2005 SocketNotificationRetrieveEvents already defined in ldns.lib(rdata.obj) mod_enum E:\FS_GIT\src\mod\applications\mod_enum\ldns.lib(parse.obj) 1
Error LNK2005 SocketNotificationRetrieveEvents already defined in ldns.lib(rdata.obj) mod_enum E:\FS_GIT\src\mod\applications\mod_enum\ldns.lib(buffer.obj) 1
Error LNK2005 SocketNotificationRetrieveEvents already defined in ldns.lib(rdata.obj) mod_enum E:\FS_GIT\src\mod\applications\mod_enum\ldns.lib(dnssec.obj) 1
Error LNK2005 SocketNotificationRetrieveEvents already defined in ldns.lib(rdata.obj) mod_enum E:\FS_GIT\src\mod\applications\mod_enum\ldns.lib(host2wire.obj) 1
Error LNK2005 SocketNotificationRetrieveEvents already defined in ldns.lib(rdata.obj) mod_enum E:\FS_GIT\src\mod\applications\mod_enum\ldns.lib(wire2host.obj) 1
Error LNK2005 SocketNotificationRetrieveEvents already defined in ldns.lib(rdata.obj) mod_enum E:\FS_GIT\src\mod\applications\mod_enum\ldns.lib(error.obj) 1
Error LNK2005 SocketNotificationRetrieveEvents already defined in ldns.lib(rdata.obj) mod_enum E:\FS_GIT\src\mod\applications\mod_enum\ldns.lib(net.obj) 1
Error LNK2005 SocketNotificationRetrieveEvents already defined in ldns.lib(rdata.obj) mod_enum E:\FS_GIT\src\mod\applications\mod_enum\ldns.lib(b64_ntop.obj) 1
Error LNK2005 SocketNotificationRetrieveEvents already defined in ldns.lib(rdata.obj) mod_enum E:\FS_GIT\src\mod\applications\mod_enum\ldns.lib(gmtime_r.obj) 1
Error LNK2005 SocketNotificationRetrieveEvents already defined in ldns.lib(rdata.obj) mod_enum E:\FS_GIT\src\mod\applications\mod_enum\ldns.lib(inet_ntop.obj) 1
Error LNK2005 SocketNotificationRetrieveEvents already defined in ldns.lib(rdata.obj) mod_enum E:\FS_GIT\src\mod\applications\mod_enum\ldns.lib(b32_ntop.obj) 1
Error LNK2005 SocketNotificationRetrieveEvents already defined in ldns.lib(rdata.obj) mod_enum E:\FS_GIT\src\mod\applications\mod_enum\ldns.lib(zone.obj) 1
Error LNK2005 SocketNotificationRetrieveEvents already defined in ldns.lib(rdata.obj) mod_enum E:\FS_GIT\src\mod\applications\mod_enum\ldns.lib(rr_functions.obj) 1
Error LNK2005 SocketNotificationRetrieveEvents already defined in ldns.lib(rdata.obj) mod_enum E:\FS_GIT\src\mod\applications\mod_enum\ldns.lib(b64_pton.obj) 1
Error LNK2005 SocketNotificationRetrieveEvents already defined in ldns.lib(rdata.obj) mod_enum E:\FS_GIT\src\mod\applications\mod_enum\ldns.lib(inet_pton.obj) 1
Error LNK2005 SocketNotificationRetrieveEvents already defined in ldns.lib(rdata.obj) mod_enum E:\FS_GIT\src\mod\applications\mod_enum\ldns.lib(b32_pton.obj) 1
Error LNK2005 SocketNotificationRetrieveEvents already defined in ldns.lib(rdata.obj) mod_enum E:\FS_GIT\src\mod\applications\mod_enum\ldns.lib(gettimeofday.obj) 1
Error LNK2005 SocketNotificationRetrieveEvents already defined in ldns.lib(rdata.obj) mod_enum E:\FS_GIT\src\mod\applications\mod_enum\ldns.lib(dnssec_zone.obj) 1
Error LNK2005 SocketNotificationRetrieveEvents already defined in ldns.lib(rdata.obj) mod_enum E:\FS_GIT\src\mod\applications\mod_enum\ldns.lib(sha1.obj) 1
Error LNK2005 SocketNotificationRetrieveEvents already defined in ldns.lib(rdata.obj) mod_enum E:\FS_GIT\src\mod\applications\mod_enum\ldns.lib(sha2.obj) 1
Error LNK2005 SocketNotificationRetrieveEvents already defined in ldns.lib(rdata.obj) mod_enum E:\FS_GIT\src\mod\applications\mod_enum\ldns.lib(strlcpy.obj) 1
Error LNK2005 SocketNotificationRetrieveEvents already defined in ldns.lib(rdata.obj) mod_enum E:\FS_GIT\src\mod\applications\mod_enum\ldns.lib(rbtree.obj) 1
Error LNK1169 one or more multiply defined symbols found mod_enum E:\FS_GIT\x64\Debug\mod\mod_enum.dll 1
When the solution first loads, it also throws these 2 errors:
E:\FS_GIT\docs\docs.2017.vcxproj : error : The project file could not be loaded. Could not find file 'E:\FS_GIT\docs\docs.2017.vcxproj'. E:\FS_GIT\docs\docs.2017.vcxproj
E:\FS_GIT\fscomm\FSComm.2017.vcxproj : error : The project file could not be loaded. Could not find file 'E:\FS_GIT\fscomm\FSComm.2017.vcxproj'. E:\FS_GIT\fscomm\FSComm.2017.vcxproj