Re: Issue compiling with Microsoft Visual Studio 2022

Benjamin Bertrand via omniORB-list <[email protected]> Tue, 13 Jan 2026 15:56:21 +0000
Newsgroups gmane.comp.corba.omniorb.user
Message-ID <GV3P280MB1328659F01F2A0143CEB77D5A08EA@GV3P280MB1328.SWEP280.PROD.OUTLOOK.COM>
--===============3557706622944142362==
Content-Language: en-GB
Content-Type: multipart/alternative;
	boundary="_000_GV3P280MB1328659F01F2A0143CEB77D5A08EAGV3P280MB1328SWEP_"

--_000_GV3P280MB1328659F01F2A0143CEB77D5A08EAGV3P280MB1328SWEP_
Content-Type: text/plain; charset="Windows-1252"
Content-Transfer-Encoding: quoted-printable

> > 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 -gnuwi=
n32 -c -O2 -FS -MD -EHs -GS -GR -Zi -nologo -I.. -I./.. -I../../../../inclu=
de/omniORB4/internal  -DUSE_omniORB_logStream -D_OMNIORB_LIBRARY -DOMNIORB_=
VERSION_STRING=3D'"4.3.4"' -DOMNIORB_VERSION_HEX=3D'0x040304f1' -DCONFIG_DE=
FAULT_LOCATION=3D'"C:\\OMNIORB.CFG"' -DCONFIG_ENV=3D'"OMNIORB_CONFIG"' -D"N=
TArchitecture" -I. -I. -I../../../../include -D__WIN32__ -D_WIN32_WINNT=3D0=
x0501 -D__x86__ -D__NT__ -D__OSVERSION__=3D4 -D_CRT_SECURE_NO_DEPRECATE=3D1=
 -Foshared/anonObject.o -Fdshared\\ anonObject.cc
> > 2026-01-08T10:54:03.3633009Z cl : Command line error D8003 : missing so=
urce 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_logStrea=
m -D_OMNIORB_LIBRARY -DOMNIORB_VERSION_STRING=3D\"4.3.4\" -DOMNIORB_VERSION=
_HEX=3D0x040304f1 -DCONFIG_DEFAULT_LOCATION=3D\"C:\OMNIORB.CFG\" -DCONFIG_E=
NV=3D\"OMNIORB_CONFIG\" -DNTArchitecture -I. -I. -I..\..\..\..\include -D__=
WIN32__ -D_WIN32_WINNT=3D0x0501 -D__x86__ -D__NT__ -D__OSVERSION__=3D4 -D_C=
RT_SECURE_NO_DEPRECATE=3D1 -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=92t 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/referen=
ce/fd-program-database-file-name?view=3Dmsvc-170
> this should still work.

Thanks for the quick reply!

> Can you please check if the issue is not rather related to the backslashe=
s?
> 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/o=
mniORB4/internal  -DUSE_omniORB_logStream -D_OMNIORB_LIBRARY -DOMNIORB_VERS=
ION_STRING=3D'"4.3.4"' -DOMNIORB_VERSION_HEX=3D'0x040304f1' -DCONFIG_DEFAUL=
T_LOCATION=3D'"C:\\OMNIORB.CFG"' -DCONFIG_ENV=3D'"OMNIORB_CONFIG"' -D"NTArc=
hitecture" -I. -I. -I../../../../include -D__WIN32__ -D_WIN32_WINNT=3D0x050=
1 -D__x86__ -D__NT__ -D__OSVERSION__=3D4 -D_CRT_SECURE_NO_DEPRECATE=3D1 -Fo=
shared/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=3D\"4.3.4\" -DOMNIORB_VERSION_HEX=
=3D0x040304f1 -DCONFIG_DEFAULT_LOCATION=3D\"C:\OMNIORB.CFG\" -DCONFIG_ENV=
=3D\"OMNIORB_CONFIG\" -DNTArchitecture -I. -I. -I..\..\..\..\include -D__WI=
N32__ -D_WIN32_WINNT=3D0x0501 -D__x86__ -D__NT__ -D__OSVERSION__=3D4 -D_CRT=
_SECURE_NO_DEPRECATE=3D1 -Foshared\anonObject.o -Fdshared -TpanonObject.cc

In the documentation you linked to, it says: "If you specify a path name th=
at does not include a file name (the path ends in backslash)=94.
So not sure if =93shared=94 is handled as a directory or filename here...

With only one backslash it doesn=92t:

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=3D0x0501 -D__x86__ -D__NT__ -D__OSVERSIO=
N__=3D4 -D_CRT_SECURE_NO_DEPRECATE=3D1 -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=3D0x05=
01 -D__x86__ -D__NT__ -D__OSVERSION__=3D4 -D_CRT_SECURE_NO_DEPRECATE=3D1 -F=
oshared\nt.o "-Fdshared nt.cc"

> Maybe this issue is not related to the visual studio itself, just the com=
mand processor your are using?

It could be. I=92m compiling on conda-forge, so using a conda environment: =
https://dev.azure.com/conda-forge/feedstock-builds/_build/results?buildId=
=3D1435250&view=3Dlogs&j=3D535b614b-9e28-51ef-eb67-d0aa83d01d61&t=3Df3b8264=
6-01b4-574c-79b5-1561965b3e04

Benjamin

> Marcin


--_000_GV3P280MB1328659F01F2A0143CEB77D5A08EAGV3P280MB1328SWEP_
Content-Type: text/html; charset="Windows-1252"
Content-Transfer-Encoding: quoted-printable

<html>
<head>
<meta http-equiv=3D"Content-Type" content=3D"text/html; charset=3DWindows-1=
252">
</head>
<body>
<span style=3D"font-family: Aptos, Arial, Helvetica, sans-serif; font-size:=
 12pt; color: rgb(0, 0, 0);">&gt; &gt; Hello,</span>
<div style=3D"font-family: Aptos, Arial, Helvetica, sans-serif; font-size: =
12pt; color: rgb(0, 0, 0);">
&gt; &gt;</div>
<div style=3D"font-family: Aptos, Arial, Helvetica, sans-serif; font-size: =
12pt; color: rgb(0, 0, 0);">
&gt; &gt; When trying to compile omniorb 4.3.4 on Windows with Visual Studi=
o 2022, I got the following error:</div>
<div style=3D"font-family: Aptos, Arial, Helvetica, sans-serif; font-size: =
12pt; color: rgb(0, 0, 0);">
&gt; &gt;</div>
<div style=3D"font-family: Aptos, Arial, Helvetica, sans-serif; font-size: =
12pt; color: rgb(0, 0, 0);">
&gt; &gt; 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 &nbsp;-DUSE_omniORB_logStream -D_OMNIORB_LIBRARY=
 -DOMNIORB_VERSION_STRING=3D'&quot;4.3.4&quot;' -DOMNIORB_VERSION_HEX=3D'0x=
040304f1'
 -DCONFIG_DEFAULT_LOCATION=3D'&quot;C:\\OMNIORB.CFG&quot;' -DCONFIG_ENV=3D'=
&quot;OMNIORB_CONFIG&quot;' -D&quot;NTArchitecture&quot; -I. -I. -I../../..=
/../include -D__WIN32__ -D_WIN32_WINNT=3D0x0501 -D__x86__ -D__NT__ -D__OSVE=
RSION__=3D4 -D_CRT_SECURE_NO_DEPRECATE=3D1 -Foshared/anonObject.o -Fdshared=
\\
 anonObject.cc</div>
<div style=3D"font-family: Aptos, Arial, Helvetica, sans-serif; font-size: =
12pt; color: rgb(0, 0, 0);">
&gt; &gt; 2026-01-08T10:54:03.3633009Z cl : Command line error D8003 : miss=
ing source filename</div>
<div style=3D"font-family: Aptos, Arial, Helvetica, sans-serif; font-size: =
12pt; color: rgb(0, 0, 0);">
&gt; &gt; 2026-01-08T10:54:03.3651582Z cl -c -O2 -FS -MD -EHs -GS -GR -Zi -=
nologo -I.. -I.\.. -I..\..\..\..\include\omniORB4\internal -DUSE_omniORB_lo=
gStream -D_OMNIORB_LIBRARY -DOMNIORB_VERSION_STRING=3D\&quot;4.3.4\&quot; -=
DOMNIORB_VERSION_HEX=3D0x040304f1 -DCONFIG_DEFAULT_LOCATION=3D\&quot;C:\OMN=
IORB.CFG\&quot;
 -DCONFIG_ENV=3D\&quot;OMNIORB_CONFIG\&quot; -DNTArchitecture -I. -I. -I..\=
..\..\..\include -D__WIN32__ -D_WIN32_WINNT=3D0x0501 -D__x86__ -D__NT__ -D_=
_OSVERSION__=3D4 -D_CRT_SECURE_NO_DEPRECATE=3D1 -Foshared\anonObject.o &quo=
t;-Fdshared anonObject.cc&quot;</div>
<div style=3D"font-family: Aptos, Arial, Helvetica, sans-serif; font-size: =
12pt; color: rgb(0, 0, 0);">
&gt; &gt; 2026-01-08T10:54:03.3677742Z make[3]: *** [../../../../mk/win32.m=
k:457: shared/anonObject.o] Error 2</div>
<div style=3D"font-family: Aptos, Arial, Helvetica, sans-serif; font-size: =
12pt; color: rgb(0, 0, 0);">
&gt; &gt;</div>
<div style=3D"font-family: Aptos, Arial, Helvetica, sans-serif; font-size: =
12pt; color: rgb(0, 0, 0);">
&gt; &gt; It looks like newer versions of MSVC don=92t tolerate -Fd&lt;dir&=
gt;\.</div>
<div style=3D"font-family: Aptos, Arial, Helvetica, sans-serif; font-size: =
12pt; color: rgb(0, 0, 0);">
&gt; &gt; We have to pass a real PDB filename.</div>
<div style=3D"font-family: Aptos, Arial, Helvetica, sans-serif; font-size: =
12pt; color: rgb(0, 0, 0);">
&gt; &gt;</div>
<div style=3D"font-family: Aptos, Arial, Helvetica, sans-serif; font-size: =
12pt; color: rgb(0, 0, 0);">
&gt; &gt; I applied the attached patch (doing the same as for static).</div=
>
<div style=3D"font-family: Aptos, Arial, Helvetica, sans-serif; font-size: =
12pt; color: rgb(0, 0, 0);">
&gt; &gt; Could you please confirm this is the correct thing to do?</div>
<div style=3D"font-family: Aptos, Arial, Helvetica, sans-serif; font-size: =
12pt; color: rgb(0, 0, 0);">
&gt;</div>
<div style=3D"font-family: Aptos, Arial, Helvetica, sans-serif; font-size: =
12pt; color: rgb(0, 0, 0);">
&gt; According to the docs https://learn.microsoft.com/en-us/cpp/build/refe=
rence/fd-program-database-file-name?view=3Dmsvc-170</div>
<div style=3D"font-family: Aptos, Arial, Helvetica, sans-serif; font-size: =
12pt; color: rgb(0, 0, 0);">
&gt; this should still work.</div>
<div dir=3D"ltr" style=3D"font-family: Aptos, Arial, Helvetica, sans-serif;=
 font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div dir=3D"ltr" style=3D"font-family: Aptos, Arial, Helvetica, sans-serif;=
 font-size: 12pt; color: rgb(0, 0, 0);">
Thanks for the quick reply!</div>
<div dir=3D"ltr" style=3D"font-family: Aptos, Arial, Helvetica, sans-serif;=
 font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style=3D"font-family: Aptos, Arial, Helvetica, sans-serif; font-size: =
12pt; color: rgb(0, 0, 0);">
&gt; Can you please check if the issue is not rather related to the backsla=
shes?</div>
<div style=3D"font-family: Aptos, Arial, Helvetica, sans-serif; font-size: =
12pt; color: rgb(0, 0, 0);">
&gt; It seems to treat &quot;-Fdshared anonObject.cc&quot; as one file name=
 containing a space.</div>
<div dir=3D"ltr" style=3D"font-family: Aptos, Arial, Helvetica, sans-serif;=
 font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div dir=3D"ltr" style=3D"font-family: Aptos, Arial, Helvetica, sans-serif;=
 font-size: 12pt; color: rgb(0, 0, 0);">
I think you are right.</div>
<div dir=3D"ltr" style=3D"font-family: Aptos, Arial, Helvetica, sans-serif;=
 font-size: 12pt; color: rgb(0, 0, 0);">
I tried without any backslash and it worked.</div>
<div dir=3D"ltr" style=3D"font-family: Aptos, Arial, Helvetica, sans-serif;=
 font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div dir=3D"ltr" style=3D"font-family: Aptos, Arial, Helvetica, sans-serif;=
 font-size: 12pt; color: rgb(0, 0, 0);">
2026-01-12T14:02:21.8423666Z + mkdir -p shared</div>
<div style=3D"font-family: Aptos, Arial, Helvetica, sans-serif; font-size: =
12pt; color: rgb(0, 0, 0);">
2026-01-12T14:02:21.8614231Z ../../../../bin/x86_win32/clwrapper -gnuwin32 =
-c -O2 -FS -MD -EHs -GS -GR -Zi -nologo -I.. -I./.. -I../../../../include/o=
mniORB4/internal &nbsp;-DUSE_omniORB_logStream -D_OMNIORB_LIBRARY -DOMNIORB=
_VERSION_STRING=3D'&quot;4.3.4&quot;' -DOMNIORB_VERSION_HEX=3D'0x040304f1'
 -DCONFIG_DEFAULT_LOCATION=3D'&quot;C:\\OMNIORB.CFG&quot;' -DCONFIG_ENV=3D'=
&quot;OMNIORB_CONFIG&quot;' -D&quot;NTArchitecture&quot; -I. -I. -I../../..=
/../include -D__WIN32__ -D_WIN32_WINNT=3D0x0501 -D__x86__ -D__NT__ -D__OSVE=
RSION__=3D4 -D_CRT_SECURE_NO_DEPRECATE=3D1 -Foshared/anonObject.o -Fdshared
 anonObject.cc</div>
<div style=3D"font-family: Aptos, Arial, Helvetica, sans-serif; font-size: =
12pt; color: rgb(0, 0, 0);">
2026-01-12T14:02:21.9269148Z anonObject.cc</div>
<div style=3D"font-family: Aptos, Arial, Helvetica, sans-serif; font-size: =
12pt; color: rgb(0, 0, 0);">
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=3D\&quot;4.3.4\&quot; -DOMNIORB_V=
ERSION_HEX=3D0x040304f1 -DCONFIG_DEFAULT_LOCATION=3D\&quot;C:\OMNIORB.CFG\&=
quot;
 -DCONFIG_ENV=3D\&quot;OMNIORB_CONFIG\&quot; -DNTArchitecture -I. -I. -I..\=
..\..\..\include -D__WIN32__ -D_WIN32_WINNT=3D0x0501 -D__x86__ -D__NT__ -D_=
_OSVERSION__=3D4 -D_CRT_SECURE_NO_DEPRECATE=3D1 -Foshared\anonObject.o -Fds=
hared -TpanonObject.cc</div>
<div dir=3D"ltr" style=3D"font-family: Aptos, Arial, Helvetica, sans-serif;=
 font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div dir=3D"ltr" style=3D"font-family: &quot;Segoe UI&quot;, &quot;Segoe UI=
 Variable Text&quot;, -apple-system, BlinkMacSystemFont, &quot;Helvetica Ne=
ue&quot;, Helvetica, Arial, sans-serif; color: rgb(22, 22, 22);">
<span style=3D"background-color: rgb(255, 255, 255);">In the documentation =
you linked to, it says: &quot;If you specify a path name that does not incl=
ude a file name (the path ends in backslash)=94.</span></div>
<div dir=3D"ltr" style=3D"font-family: &quot;Segoe UI&quot;, &quot;Segoe UI=
 Variable Text&quot;, -apple-system, BlinkMacSystemFont, &quot;Helvetica Ne=
ue&quot;, Helvetica, Arial, sans-serif; color: rgb(22, 22, 22);">
<span style=3D"background-color: rgb(255, 255, 255);">So not sure if =93sha=
red=94 is handled as a directory or filename&nbsp;here...</span></div>
<div dir=3D"ltr" style=3D"font-family: Aptos, Arial, Helvetica, sans-serif;=
 font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div dir=3D"ltr" style=3D"font-family: Aptos, Arial, Helvetica, sans-serif;=
 font-size: 12pt; color: rgb(0, 0, 0);">
With only one backslash it doesn=92t:</div>
<div dir=3D"ltr" style=3D"font-family: Aptos, Arial, Helvetica, sans-serif;=
 font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div dir=3D"ltr" style=3D"font-family: Aptos, Arial, Helvetica, sans-serif;=
 font-size: 12pt; color: rgb(0, 0, 0);">
2026-01-13T10:33:21.4579967Z ../../../bin/x86_win32/clwrapper -gnuwin32 -c =
-O2 -FS -MD -EHs -GS -GR -Zi -nologo -D_OMNITHREAD_DLL &nbsp;-I. -I. -I../.=
./../include -D__WIN32__ -D_WIN32_WINNT=3D0x0501 -D__x86__ -D__NT__ -D__OSV=
ERSION__=3D4 -D_CRT_SECURE_NO_DEPRECATE=3D1
 -Foshared/nt.o -Fdshared\ nt.cc</div>
<div style=3D"font-family: Aptos, Arial, Helvetica, sans-serif; font-size: =
12pt; color: rgb(0, 0, 0);">
2026-01-13T10:33:21.4977406Z cl : Command line error D8003 : missing source=
 filename</div>
<div style=3D"font-family: Aptos, Arial, Helvetica, sans-serif; font-size: =
12pt; color: rgb(0, 0, 0);">
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=3D0x05=
01 -D__x86__ -D__NT__ -D__OSVERSION__=3D4 -D_CRT_SECURE_NO_DEPRECATE=3D1 -F=
oshared\nt.o &quot;-Fdshared nt.cc&quot;</div>
<div dir=3D"ltr" style=3D"font-family: Aptos, Arial, Helvetica, sans-serif;=
 font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style=3D"font-family: Aptos, Arial, Helvetica, sans-serif; font-size: =
12pt; color: rgb(0, 0, 0);">
&gt; Maybe this issue is not related to the visual studio itself, just the =
command processor your are using?</div>
<div dir=3D"ltr" style=3D"font-family: Aptos, Arial, Helvetica, sans-serif;=
 font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div dir=3D"ltr" style=3D"font-family: Aptos, Arial, Helvetica, sans-serif;=
 font-size: 12pt; color: rgb(0, 0, 0);">
It could be. I=92m compiling on conda-forge, so using a conda environment: =
<a href=3D"https://dev.azure.com/conda-forge/feedstock-builds/_build/result=
s?buildId=3D1435250&amp;view=3Dlogs&amp;j=3D535b614b-9e28-51ef-eb67-d0aa83d=
01d61&amp;t=3Df3b82646-01b4-574c-79b5-1561965b3e04" data-outlook-id=3D"8f5e=
6f43-4ef8-4a91-b664-cfd33a4e9f45">
https://dev.azure.com/conda-forge/feedstock-builds/_build/results?buildId=
=3D1435250&amp;view=3Dlogs&amp;j=3D535b614b-9e28-51ef-eb67-d0aa83d01d61&amp=
;t=3Df3b82646-01b4-574c-79b5-1561965b3e04</a></div>
<div dir=3D"ltr" style=3D"font-family: Aptos, Arial, Helvetica, sans-serif;=
 font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div dir=3D"ltr" style=3D"font-family: Aptos, Arial, Helvetica, sans-serif;=
 font-size: 12pt; color: rgb(0, 0, 0);">
Benjamin</div>
<div dir=3D"ltr" style=3D"font-family: Aptos, Arial, Helvetica, sans-serif;=
 font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style=3D"font-family: Aptos, Arial, Helvetica, sans-serif; font-size: =
12pt; color: rgb(0, 0, 0);">
&gt; Marcin</div>
<div dir=3D"ltr" style=3D"font-family: Aptos, Arial, Helvetica, sans-serif;=
 font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
</body>
</html>

--_000_GV3P280MB1328659F01F2A0143CEB77D5A08EAGV3P280MB1328SWEP_--


--===============3557706622944142362==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
omniORB-list mailing list
[email protected]
https://www.omniorb-support.com/mailman/listinfo/omniorb-list

--===============3557706622944142362==--