Forum Stats

  • 3,769,286 Users
  • 2,252,943 Discussions
  • 7,874,978 Comments

Discussions

Solaris 11.4 system header files prevent usage of stlport4 library

Using this one line C++ program  with any Solaris Studio compiler, gives an error on Solaris 11.4 when using the -library=stlport4 option.

hello.cpp

#include <iostream>

int main()

{

    std::cout << "Hello world" << std::endl;

    return 0;

}

$ /opt/solarisstudio12.4/bin/CC -m64 hello.cpp -o hello -library=stlport4

"/opt/solarisstudio12.4/lib/compilers/include/CC/stlport4/stl/_stdio_file.h", line 161: Error: __pad is not a member of const __FILE.

"/opt/solarisstudio12.4/lib/compilers/include/CC/stlport4/stl/_stdio_file.h", line 163: Error: __pad is not a member of const __FILE.

"/opt/solarisstudio12.4/lib/compilers/include/CC/stlport4/stl/_stdio_file.h", line 165: Error: __pad is not a member of const __FILE.

"/opt/solarisstudio12.4/lib/compilers/include/CC/stlport4/stl/_stdio_file.h", line 165: Error: __pad is not a member of const __FILE.

"/opt/solarisstudio12.4/lib/compilers/include/CC/stlport4/stl/_stdio_file.h", line 167: Error: __pad is not a member of const __FILE.

"/opt/solarisstudio12.4/lib/compilers/include/CC/stlport4/stl/_stdio_file.h", line 170: Error: __pad is not a member of __FILE.

"/opt/solarisstudio12.4/lib/compilers/include/CC/stlport4/stl/_stdio_file.h", line 170: Error: __pad is not a member of __FILE.

"/opt/solarisstudio12.4/lib/compilers/include/CC/stlport4/stl/_stdio_file.h", line 172: Error: __pad is not a member of __FILE.

"/opt/solarisstudio12.4/lib/compilers/include/CC/stlport4/stl/_stdio_file.h", line 172: Error: __pad is not a member of __FILE.

Answers