M
manoj.pattanaik
Hi,
I am trying to compile following piece of code (bb.cpp) using aCC (HP
ANSI C++ B3910B A.03.37) compiler on HP-UX 11.23. It gives error:485
//bb.cpp -- Starts
#include <iostream>
using namespace std;
class abc;
extern abc objabc;
template <class a>
class def
{
public:
void disp()
{
objabc.func();
}
};
class abc
{
public:
void func()
{
cout<<"from func"<<endl;
}
};
abc objabc;
//bb.cpp -- Ends
aCC -AA -c bb.cpp -o bb.o
Error 485: "bb.cpp", line 17 # Cannot use extern object of unknown
size; 'abc' must be defined first. "abc objabc" was declared at
["bb.cpp", line 8].
objabc.func();
^^^^^^
Same code is compiling fine with VC++ (Windows), CC (Solaris 9), gcc
(LInux). Can anyone please help me to compile it with aCC compiler on
HPUX?
I am trying to compile following piece of code (bb.cpp) using aCC (HP
ANSI C++ B3910B A.03.37) compiler on HP-UX 11.23. It gives error:485
//bb.cpp -- Starts
#include <iostream>
using namespace std;
class abc;
extern abc objabc;
template <class a>
class def
{
public:
void disp()
{
objabc.func();
}
};
class abc
{
public:
void func()
{
cout<<"from func"<<endl;
}
};
abc objabc;
//bb.cpp -- Ends
aCC -AA -c bb.cpp -o bb.o
Error 485: "bb.cpp", line 17 # Cannot use extern object of unknown
size; 'abc' must be defined first. "abc objabc" was declared at
["bb.cpp", line 8].
objabc.func();
^^^^^^
Same code is compiling fine with VC++ (Windows), CC (Solaris 9), gcc
(LInux). Can anyone please help me to compile it with aCC compiler on
HPUX?