xlc

How do I include IBM XLC template *.c files in the make dependency file?

For the XLC compiler, templated code goes in a *.c file. Then when your program is compiled that uses the template functions, the compiler finds the template definisions in the .c file and instantiates them. The problem is that these .c files are not by default included when doing an xlC -qmakedepend to generate the build dependencies....

Availability of #include <map> with xlC on AIX 4.3

Is there a version of xlC/VACPP available for AIX 4.3, which does not choke when given following source: #include <map> int main(void) { return 0; } If yes, is it still available anywhere? ...

Static declarations are not considered for a function call if the function is not qualified.

"painting/qpathclipper.cpp", line 1643.30: 1540-0274 (S) The name lookup for "fuzzyCompare" did not find a declaration. "painting/qpathclipper.cpp", line 1643.30: 1540-1292 (I) Static declarations are not considered for a function call if the function is not qualified. I'm trying to compile Qt 4.5.0 on xlC 9.0.0.4a, and getting the abo...

Initialization between types "const int** const" and "int**" is not allowed, why?

Using V1.8 z/OS XL C compiler, with warnings jacked-up using INFO(ALL), I get the following warning on line 4 of the code below: WARNING CCN3196 Initialization between types "const int** const" and "int**" is not allowed. 1 int foo = 0; 2 int *ptr = &foo; 3 const int * const fixed_readonly_ptr = ptr; 4 const int...

AIX 5.3 (ld-xlc) equivalent option Linux (ld-gcc) -rpath

My compiler:xlc version 10.1 Environment: AIX5.3 Linker: ld When i work on Linux , with gcc (4.4.1) i use the following option -Wl,-rpath (-Wl for the linker options) it adds a directory to the runtime library search path. What's the equivalent for xlc compiler ? or what's the equivalent to -rpath for the linker. Thank you. ...

Problem with Initializing Consts

This code, when compiled in xlC 8.0 (on AIX 5.3), produces the wrong result. It should print 12345, but instead prints 804399880. Removing the const in front of result makes the code work correctly. Where is the bug? #include <stdio.h> #include <stdlib.h> #include <string> long int foo(std::string input) { return strtol(input....

AIX xlC cross-compilation/linkage for C++ not finding C symbols

I am attempting to cross-compile on AIX with the xlc/xlC compilers. The code compiles successfully when it uses the default settings on another machine. The code actually successfully compiles with the cross-compilation, but the problem comes from the linker. This is the command which links the objects together: $(CHILD_OS)/usr/vacpp/b...

When is a>a true ?

Right, I think I really am living a dream. I have the following piece of code which I compile and run on an AIX machine: AIX 3 5 PowerPC_POWER5 processor type IBM XL C/C++ for AIX, V10.1 Version: 10.01.0000.0003 #include <stdio.h> #include <math.h> #define RADIAN(x) ((x) * acos(0.0) / 90.0) double nearest_distance(double radius,doub...

finding the default ccsid on a z/OS system using C++ routines

Hello, We are attempting to get the native CCSID (char encoding) on a z/OS system? Is there a way to retrieve the native CCSID on z-series system using XL C/C++ runtime routines or any other C/C++ routine? Please let me know. Thanks! - Azeem ...

Problem compiling boost.asio example on AIX with IBM Visual Age C++ 7.0

This is definitely going to be one of my more arcane questions, but I hope someone has had to deal with this pain. I am porting some software to IBM AIX 5.3, using IBM VisualAge C++ 7.0 compiler. The source code depends on boost.asio for networking, and when I was building the code, I got an error from the source: include/boost/asio...

AIX5.2, xlC: Getting unresolved symbols when linking a shared library which depends on static library which depends on another static library

This is for AIX5.2, xlC compiler. Lets imagine we have two static libraries: A.a (contains funcA() function definition) B.a (contains funcB() and funcC() functions) Major thing is that funcB() in its body calls funcA() from A.a. But funcC() has independent code from A.a. Needs to create a shared library, libX.so, which calls funcC() fro...