C
ChrisG
Hi,
I have a simple code:
==================================================
#include <iostream.h>
class InstructionSet
{
public:
InstructionSet() {
cerr << "InstructionSet CONSTRUCTOR\n";
}
~InstructionSet() {
cerr << "InstructionSet DESTROYED\n";
}
};
InstructionSet globalInstructionSet;
int main(int argc, char * argv[])
{
cerr << "main\n";
return 0;
}
==================================================
When I built and ran this on IBM AIX with xlc version 5, I got
main
But on the other UNIX platforms (HP, SGI, Alpha, Linux, SUN), I got
InstructionSet CONSTRUCTOR
main
InstructionSet DESTROYED
Do you know why the Aix build is not calling the default constructor?
The build commands on Aix are
Compiling rdc.cpp
xlc -q64 -O2 -DAIX5 -DRS64 -DRS6000 -qnolm -DUSE_AIX_LOCAL -c
-o rdc.o rdc.cpp -I. -Iunix -I../../include/
Creating rdc
xlc -q64 -O2 -DAIX5 -DRS64 -DRS6000 -qnolm -DUSE_AIX_LOCAL -o
rdc rdc.o -bh:4 -bpT:0x10000000 -bpD:0x200000 -L. -L../../bin/ -lbsd
-q64 -lpthreads -lC -lC -lc -lxlf90 -lm
Many thanks in advance,
Chris
I have a simple code:
==================================================
#include <iostream.h>
class InstructionSet
{
public:
InstructionSet() {
cerr << "InstructionSet CONSTRUCTOR\n";
}
~InstructionSet() {
cerr << "InstructionSet DESTROYED\n";
}
};
InstructionSet globalInstructionSet;
int main(int argc, char * argv[])
{
cerr << "main\n";
return 0;
}
==================================================
When I built and ran this on IBM AIX with xlc version 5, I got
main
But on the other UNIX platforms (HP, SGI, Alpha, Linux, SUN), I got
InstructionSet CONSTRUCTOR
main
InstructionSet DESTROYED
Do you know why the Aix build is not calling the default constructor?
The build commands on Aix are
Compiling rdc.cpp
xlc -q64 -O2 -DAIX5 -DRS64 -DRS6000 -qnolm -DUSE_AIX_LOCAL -c
-o rdc.o rdc.cpp -I. -Iunix -I../../include/
Creating rdc
xlc -q64 -O2 -DAIX5 -DRS64 -DRS6000 -qnolm -DUSE_AIX_LOCAL -o
rdc rdc.o -bh:4 -bpT:0x10000000 -bpD:0x200000 -L. -L../../bin/ -lbsd
-q64 -lpthreads -lC -lC -lc -lxlf90 -lm
Many thanks in advance,
Chris