[omniORB] Issue compiling with Microsoft Visual Studio 2022
Benjamin Bertrand
benjamin.bertrand at maxiv.lu.se
Tue Jan 13 15:56:21 UTC 2026
> > Hello,
> >
> > When trying to compile omniorb 4.3.4 on Windows with Visual Studio 2022, I got the following error:
> >
> > 2026-01-08T10:54:03.3000214Z ../../../../bin/x86_win32/clwrapper -gnuwin32 -c -O2 -FS -MD -EHs -GS -GR -Zi -nologo -I.. -I./.. -I../../../../include/omniORB4/internal -DUSE_omniORB_logStream -D_OMNIORB_LIBRARY -DOMNIORB_VERSION_STRING='"4.3.4"' -DOMNIORB_VERSION_HEX='0x040304f1' -DCONFIG_DEFAULT_LOCATION='"C:\\OMNIORB.CFG"' -DCONFIG_ENV='"OMNIORB_CONFIG"' -D"NTArchitecture" -I. -I. -I../../../../include -D__WIN32__ -D_WIN32_WINNT=0x0501 -D__x86__ -D__NT__ -D__OSVERSION__=4 -D_CRT_SECURE_NO_DEPRECATE=1 -Foshared/anonObject.o -Fdshared\\ anonObject.cc
> > 2026-01-08T10:54:03.3633009Z cl : Command line error D8003 : missing source filename
> > 2026-01-08T10:54:03.3651582Z cl -c -O2 -FS -MD -EHs -GS -GR -Zi -nologo -I.. -I.\.. -I..\..\..\..\include\omniORB4\internal -DUSE_omniORB_logStream -D_OMNIORB_LIBRARY -DOMNIORB_VERSION_STRING=\"4.3.4\" -DOMNIORB_VERSION_HEX=0x040304f1 -DCONFIG_DEFAULT_LOCATION=\"C:\OMNIORB.CFG\" -DCONFIG_ENV=\"OMNIORB_CONFIG\" -DNTArchitecture -I. -I. -I..\..\..\..\include -D__WIN32__ -D_WIN32_WINNT=0x0501 -D__x86__ -D__NT__ -D__OSVERSION__=4 -D_CRT_SECURE_NO_DEPRECATE=1 -Foshared\anonObject.o "-Fdshared anonObject.cc"
> > 2026-01-08T10:54:03.3677742Z make[3]: *** [../../../../mk/win32.mk:457: shared/anonObject.o] Error 2
> >
> > It looks like newer versions of MSVC don’t tolerate -Fd<dir>\.
> > We have to pass a real PDB filename.
> >
> > I applied the attached patch (doing the same as for static).
> > Could you please confirm this is the correct thing to do?
>
> According to the docs https://learn.microsoft.com/en-us/cpp/build/reference/fd-program-database-file-name?view=msvc-170
> this should still work.
Thanks for the quick reply!
> Can you please check if the issue is not rather related to the backslashes?
> It seems to treat "-Fdshared anonObject.cc" as one file name containing a space.
I think you are right.
I tried without any backslash and it worked.
2026-01-12T14:02:21.8423666Z + mkdir -p shared
2026-01-12T14:02:21.8614231Z ../../../../bin/x86_win32/clwrapper -gnuwin32 -c -O2 -FS -MD -EHs -GS -GR -Zi -nologo -I.. -I./.. -I../../../../include/omniORB4/internal -DUSE_omniORB_logStream -D_OMNIORB_LIBRARY -DOMNIORB_VERSION_STRING='"4.3.4"' -DOMNIORB_VERSION_HEX='0x040304f1' -DCONFIG_DEFAULT_LOCATION='"C:\\OMNIORB.CFG"' -DCONFIG_ENV='"OMNIORB_CONFIG"' -D"NTArchitecture" -I. -I. -I../../../../include -D__WIN32__ -D_WIN32_WINNT=0x0501 -D__x86__ -D__NT__ -D__OSVERSION__=4 -D_CRT_SECURE_NO_DEPRECATE=1 -Foshared/anonObject.o -Fdshared anonObject.cc
2026-01-12T14:02:21.9269148Z anonObject.cc
2026-01-12T14:02:22.5021053Z cl -c -O2 -FS -MD -EHs -GS -GR -Zi -nologo -I.. -I.\.. -I..\..\..\..\include\omniORB4\internal -DUSE_omniORB_logStream -D_OMNIORB_LIBRARY -DOMNIORB_VERSION_STRING=\"4.3.4\" -DOMNIORB_VERSION_HEX=0x040304f1 -DCONFIG_DEFAULT_LOCATION=\"C:\OMNIORB.CFG\" -DCONFIG_ENV=\"OMNIORB_CONFIG\" -DNTArchitecture -I. -I. -I..\..\..\..\include -D__WIN32__ -D_WIN32_WINNT=0x0501 -D__x86__ -D__NT__ -D__OSVERSION__=4 -D_CRT_SECURE_NO_DEPRECATE=1 -Foshared\anonObject.o -Fdshared -TpanonObject.cc
In the documentation you linked to, it says: "If you specify a path name that does not include a file name (the path ends in backslash)”.
So not sure if “shared” is handled as a directory or filename here...
With only one backslash it doesn’t:
2026-01-13T10:33:21.4579967Z ../../../bin/x86_win32/clwrapper -gnuwin32 -c -O2 -FS -MD -EHs -GS -GR -Zi -nologo -D_OMNITHREAD_DLL -I. -I. -I../../../include -D__WIN32__ -D_WIN32_WINNT=0x0501 -D__x86__ -D__NT__ -D__OSVERSION__=4 -D_CRT_SECURE_NO_DEPRECATE=1 -Foshared/nt.o -Fdshared\ nt.cc
2026-01-13T10:33:21.4977406Z cl : Command line error D8003 : missing source filename
2026-01-13T10:33:21.4995747Z cl -c -O2 -FS -MD -EHs -GS -GR -Zi -nologo -D_OMNITHREAD_DLL -I. -I. -I..\..\..\include -D__WIN32__ -D_WIN32_WINNT=0x0501 -D__x86__ -D__NT__ -D__OSVERSION__=4 -D_CRT_SECURE_NO_DEPRECATE=1 -Foshared\nt.o "-Fdshared nt.cc"
> Maybe this issue is not related to the visual studio itself, just the command processor your are using?
It could be. I’m compiling on conda-forge, so using a conda environment: https://dev.azure.com/conda-forge/feedstock-builds/_build/results?buildId=1435250&view=logs&j=535b614b-9e28-51ef-eb67-d0aa83d01d61&t=f3b82646-01b4-574c-79b5-1561965b3e04
Benjamin
> Marcin
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.omniorb-support.com/pipermail/omniorb-list/attachments/20260113/49f57f33/attachment.htm>
More information about the omniORB-list
mailing list