|
Hi Freddie,
Thanks for the hint, that was indeed the problem. I am building the IXWebSocket package for a quadEM driver for the FX4 electrometer, produced by Pyramid Tech and also sold by XDSOxford:
IXWebSocket is a very nice package that builds
without warnings on Linux and Windows. However, they don't use macros to decorate the class names, so it would require editing their source to allow the optional __declspec(dllexport).
In this case it was cleaner to not build IXWebsocket as a separate library, but rather directly into the FX4 driver library. That way none of the IXWebSocket functions need to be exported. It is working on both windows-x64 and windows-x64-static now.
Thanks,
Mark
From: Tech-talk <tech-talk-bounces at aps.anl.gov> on behalf of Freddie Akeroyd - STFC UKRI via Tech-talk <tech-talk at aps.anl.gov>
Sent: Tuesday, June 9, 2026 7:31 PM
To: EPICS Tech Talk <tech-talk at aps.anl.gov>
Subject: RE: Strange problem linking a library on windows-x64
Hi Mark,
In a dynamic build ixwebsocket.lib is the import library containing the exported symbol references from the DLL, if the DLL has no symbols exported then I believe link will not create an import library. You can
confirm whether the DLL exports any symbols by running
dumpbin /exports ixwebsocket.dll
To resolve this check the header files for the library, there may be some additional preprocessor symbol that needs defining during an EPICS dynamic build so that the library source adds __declspec(dllexport) to
relevant functions to create an import library.
Regards,
Freddie
From: Tech-talk <tech-talk-bounces at aps.anl.gov>
On Behalf Of Mark Rivers via Tech-talk
Sent: 09 June 2026 22:47
To: EPICS Tech Talk <tech-talk at aps.anl.gov>
Subject: Strange problem linking a library on windows-x64
Folks,
I am having a strange problem linking a library on windows-x64 (dynamic build). The library compiles and links fine on windows-x64-static
(static build).
On windows-x64 the library compiles fine, but generates this error when linking:
link -nologo -subsystem:windows -dll -LTCG -incremental:no -opt:ref -release -MACHINE:X64 -out:ixwebsocket.dll -implib:ixwebsocket.lib
IXBench.obj IXCancellationRequest.obj IXConnectionState.obj IXDNSLookup.obj IXExponentialBackoff.obj IXGzipCodec.obj IXHttpClient.obj IXHttp.obj IXHttpServer.obj IXNetSystem.obj IXSelectInterrupt.obj IXSelectInterruptEvent.obj IXSelectInterruptFactory.obj
IXSelectInterruptPipe.obj IXSetThreadName.obj IXSocketAppleSSL.obj IXSocketConnect.obj IXSocket.obj IXSocketFactory.obj IXSocketMbedTLS.obj IXSocketOpenSSL.obj IXSocketServer.obj IXSocketTLSOptions.obj IXStrCaseCompare.obj IXUdpSocket.obj IXUrlParser.obj IXUserAgent.obj
IXUuid.obj IXWebSocketCloseConstants.obj IXWebSocket.obj IXWebSocketHandshake.obj IXWebSocketHttpHeaders.obj IXWebSocketPerMessageDeflateCodec.obj IXWebSocketPerMessageDeflate.obj IXWebSocketPerMessageDeflateOptions.obj IXWebSocketProxyServer.obj IXWebSocketServer.obj
IXWebSocketTransport.obj ws2_32.lib crypt32.lib bcrypt.lib
Generating code
Finished generating code
"Installing shared library ../../../../bin/windows-x64/ixwebsocket.dll"
"Installing library ../../../../lib/windows-x64/ixwebsocket.lib"
installEpics.pl: No such file 'ixwebsocket.lib' at H:/epics-devel/base-7.0.10/bin/windows-x64/installEpics.pl line 54.
make[3]: *** [H:/epics-devel/base-7.0.10/configure/RULES_BUILD:489: ../../../../lib/windows-x64/ixwebsocket.lib] Error 2
make[3]: Leaving directory 'J:/epics/devel/quadEM/quadEMApp/FX4Src/ixwebsocket/O.windows-x64'
make[2]: *** [H:/epics-devel/base-7.0.10/configure/RULES_ARCHS:58: install.windows-x64] Error 2
make[2]: Leaving directory 'J:/epics/devel/quadEM/quadEMApp/FX4Src/ixwebsocket'
make[1]: *** [H:/epics-devel/base-7.0.10/configure/RULES_DIRS:85: FX4Src/ixwebsocket.install] Error 2
make[1]: Leaving directory 'J:/epics/devel/quadEM/quadEMApp'
make: *** [H:/epics-devel/base-7.0.10/configure/RULES_DIRS:85: quadEMApp.install] Error 2
Note that the link command did not generate an error. However, there is an error when it tries to install the ixwebsocket.lib.
The problem is that the library file is not being created.
If I cd to the O.windows-x64 directory and manually type the "link" command it completes with no errors:
J:\epics\devel\quadEM\quadEMApp\FX4Src\ixwebsocket\O.windows-x64>link -nologo -subsystem:windows -dll -LTCG -incremental:no -opt:ref -release
-MACHINE:X64 -out:ixwebsocket.dll -implib:ixwebsocket.lib IXBench.obj IXCancellationRequest.obj IXConnectionState.obj IXDNSLookup.obj IXExponentialBackoff.obj IXGzipCodec.obj IXHttpClient.obj IXHttp.obj IXHttpServer.obj IXNetSystem.obj IXSelectInterrupt.obj
IXSelectInterruptEvent.obj IXSelectInterruptFactory.obj IXSelectInterruptPipe.obj IXSetThreadName.obj IXSocketAppleSSL.obj IXSocketConnect.obj IXSocket.obj IXSocketFactory.obj IXSocketMbedTLS.obj IXSocketOpenSSL.obj IXSocketServer.obj IXSocketTLSOptions.obj
IXStrCaseCompare.obj IXUdpSocket.obj IXUrlParser.obj IXUserAgent.obj IXUuid.obj IXWebSocketCloseConstants.obj IXWebSocket.obj IXWebSocketHandshake.obj IXWebSocketHttpHeaders.obj IXWebSocketPerMessageDeflateCodec.obj IXWebSocketPerMessageDeflate.obj IXWebSocketPerMessageDeflateOptions.obj
IXWebSocketProxyServer.obj IXWebSocketServer.obj IXWebSocketTransport.obj ws2_32.lib crypt32.lib bcrypt.lib
Generating code
Finished generating code
J:\epics\devel\quadEM\quadEMApp\FX4Src\ixwebsocket\O.windows-x64>
It should have created ixwebsocket.dll and ixwebsocket.lib. However, when I look for those files in the O.windows-x64 directory
only the .dll file exists, not the .lib file:
J:\epics\devel\quadEM\quadEMApp\FX4Src\ixwebsocket\O.windows-x64>dir *.lib *.dll
Volume in drive J is people_rw
Volume Serial Number is 5005-CD09
Directory of J:\epics\devel\quadEM\quadEMApp\FX4Src\ixwebsocket\O.windows-x64
Directory of J:\epics\devel\quadEM\quadEMApp\FX4Src\ixwebsocket\O.windows-x64
06/09/2026 04:37 PM 284,672 ixwebsocket.dll
1 File(s) 284,672 bytes
0 Dir(s) 9,569,302,556,672 bytes free
I have never seen this problem before. Any idea what could cause it?
Thanks,
Mark
|