Solaris intel i386 上的developerstudio12.6 CC,编译器不显示错误或警告但失败

问题描述

尝试在Solaris intel i386 上使用developerstudio12.6 CC 编译C++ 程序。 编译器不显示错误或警告但失败。

可以理解为什么 CC 不显示任何警告或错误 - 可能是哪里出了问题?

<Project Sdk="Microsoft.NET.Sdk">
   <PropertyGroup>
   <OutputType>WinExe</OutputType>
   <TargetFramework>net5.0-windows</TargetFramework>
   <UseWPF>true</UseWPF>
   <StartupObject>Stats4Betting_NetCore.App</StartupObject>
   <ApplicationIcon>Resources\soccer_boom_alt.ico</ApplicationIcon>
   <Platforms>Anycpu;x64;x86</Platforms>
</PropertyGroup>
  <ItemGroup>
    ....
  </ItemGroup>
</Project>

使用 -verbose=template => 类似的输出,没有调试行 使用 -# 或 verbose=diags=> 大量输出但没有错误行

developerstudio12.6/bin/CC  -mt -xtarget=native -m32 -g  -errwarn=%all  -O -DNDEBUG  -c xml_test.cc -I<some include> -I<some other include> -o xml_test.o
echo $?
2

/opt/developerstudio12.6/lib/compilers/stdlibfilt -stderr

解决方法

您的 NLSPATH 环境变量不正确。

/opt/developerstudio12.6/bin/../../lib/locale/%L/LC_MESSAGES/%N.cat 指的是 /opt/lib/locale/%L/LC_MESSAGES/%N.cat 而不是 /opt/developerstudio12.6/lib/locale/%L/LC_MESSAGES/%N.cat,因为其中有一个额外的 .. 元素。

,

我刚刚通过在编译器选项中添加 -filt=%none 解决了这个问题:

-mt -xtarget=native -m32 -filt=%none -g2 -verbose=template -errtags -library=iostream