xlc or xlC is the command to invoke IBM XL C or C++ compiler. It is used on IBMs proprietary platforms like Blue Gene, AIX, z/OS, and z/VM
Questions tagged [xlc]
113 questions
1
vote
0 answers
Equivalent -rdynamic flag in xlc compiler
Is there an equivalent to the -rdynamic flag (gcc) into xlc compiler in AIX?
Thank you.

Bob
- 11
- 1
1
vote
1 answer
IBM XL C/C++ Compiler: "No valid target devices available"
I'm compiling some OpenMP 4.5 code with the IBM XL C/C++ compiler with the intention of offloading some of its work to a GPU, like so:
xlc++ mycode.cpp -qsmp=omp -qreport -qoffload -std=c++11 -Wall
Compilation seems to be successful, giving me only…

Richard
- 56,349
- 34
- 180
- 251
1
vote
1 answer
What does `1587-163` mean from the IBM XL C/C++ compiler
I've compiled some code with the IBM XL C/C++ compiler v13.1.6 (13.01.0006.0000). My program is ending by printing the message
1587-163
Without any additional information.
What does this mean?

Richard
- 56,349
- 34
- 180
- 251
1
vote
2 answers
Availability of #include
Is there a version of xlC/VACPP available for AIX 4.3, which does not choke when given following source:
#include

Kosi2801
- 22,222
- 13
- 38
- 45
1
vote
1 answer
The parameter type is not valid for a function of this linkage type
I'm working on AIX with IBM's XL C compiler. I'm catching a compile error and I'm not sure how to proceed:
$ xlc -g3 -O0 -qarch=pwr8 -qaltivec fips197-p8.c -o fips197-p8.exe
"fips197-p8.c", line 59.16: 1506-754 (W) The parameter type is not valid…

jww
- 97,681
- 90
- 411
- 885
1
vote
1 answer
What is xlsmp in AIX?
I have istalled the Xlc compiler for AIX one of the library it installs is: /usr/lpp/xlsmp.rte/xlsmp.rte/3.1.0.6/liblpp.a. I am curious to know
What is xlsmp?
What does this library contain?

Starfish
- 697
- 1
- 6
- 18
1
vote
1 answer
IBM XL C/C++ Compiler: check compiler mode using preprocessor directive
I am trying to compile a sample c++ file test.cpp using IBM xlC compiler on AIX system. The file should be compiled in both 32-bit and 64-bit modes. I am using following commands to compile them in both modes:
xlC test.cpp (default compiler mode is…

Jatin Sanghvi
- 1,928
- 1
- 22
- 33
1
vote
4 answers
What input to sprintf would produce 0 result?
I am trying to debug a problem unrelated to this specific code and I am looking for clues, the clue being "what value might this counter have had?" The following line of code
sprintf(strAtLeast10long, "%lld%c%.02uP",
input/peta, decimal,…

Charles
- 479
- 1
- 3
- 13
1
vote
1 answer
XlC flag qhalt issue
I'm using xlC 13.1.5 and CMake 3.5. When I try to compile an MPI package using CMake, I get the following error:
/opt/ibm/xlC/13.1.5/bin/.orig/xlc_r: warning: 1501-269 fpic is not supported on this Operating System platform. Option fpic will be…

unrue
- 149
- 1
- 2
- 10
1
vote
1 answer
Why does the xlc++ compiler complain about casting an rvalue?
On z/OS the pthread_t type is a struct that contains a member char __[8];. I tried to cast this from a return value to an int64_t. I got following error:
CCN5216 (S) An expression of type "char [8]" cannot be converted to type "int64_t"
But if I…

Christian Ammer
- 7,464
- 6
- 51
- 108
1
vote
2 answers
Split generation of a Shared Object library (.so) file into two pass instead of one
I am trying to build a shared library lib_test.so from 'test.c' & test.exp files. This lib_test.so file will be used as a extension to another application.
The application doc specifies generation of tle lib_test.so file directly in a single pass by…

Anirban
- 550
- 3
- 19
1
vote
1 answer
What does "Duplicate symbol: __fe_def_env" mean?
When building a shared library on AIX with xlc, you see this linker warning:
ld: 0711-224 WARNING: Duplicate symbol: __fe_def_env
To reproduce, use this source file fenvtest.c:
#include
void exported_func() {
fenv_t f;
…

patrickmdnet
- 3,332
- 1
- 29
- 34
1
vote
0 answers
XL C Error for explicitly defined enum
When compiling a header file using XL C on AIX, I get a (1506-045 (S)) "Undeclared Identifier " error for each enumerated value of an enumerated type being defined. For the life of me, I can't find any syntax or logical errors in the file, and there…

Mr. Gravy
- 23
- 4
1
vote
2 answers
How to write informations needed in an executable file
I wanted to know if you knew a command or a way to write as comment or string inside of the executable file.
Indeed I already did this, with XLC compiler I did it with the #pragma comment(user, "string") however now I have to change to GCC but…

Ežekiel
- 15
- 6
1
vote
2 answers
The text "<" is unexpected when compiling with Xlc_r IBM compiler
I have a problem with the compiling of code with the xlC_r compiler on AIX OS. I have attached my code below which is causing the problem. I have tried to compile the
code on MS Windows with microsoft compiler and also compiled it under Linux with…

joe_specimen
- 295
- 3
- 19