QCC -Y_gpp and QCC Y_cpp compiled libraries?

Hello,

Our software running under Qnx is becoming quite large and therefore is
harder to mantain…recently, I have found that we had some libraries being
compiled with the QCC -Y_gpp option and others without it. These libraries
where linked together (statically) to generate some executables to run a
robot.
I just wanted to know if there are any consequences putting together
libraries compiled with GNU C++ lib and other compiled with the Dinkum C++
lib…

Thanks,

Carlos Beltran

Carlos Beltran <cbeltran@dist.unige.it> wrote:

Hello,

Our software running under Qnx is becoming quite large and therefore is
harder to mantain…recently, I have found that we had some libraries being
compiled with the QCC -Y_gpp option and others without it. These libraries
where linked together (statically) to generate some executables to run a
robot.
I just wanted to know if there are any consequences putting together
libraries compiled with GNU C++ lib and other compiled with the Dinkum C++
lib…

Well, the apps will be bigger. Also, if you could run into some odd stuff
if you say passed a GNU std::string to code written expecting a Dinkum one.

Generally this is not a good thing to be doing.

chris


Chris McKillop <cdm@qnx.com> “The faster I go, the behinder I get.”
Software Engineer, QSSL – Lewis Carroll –
http://qnx.wox.org/

Uhmm,
Actually, we did run into some odd stuff. In one of our programs we detected
a strange bug. A pointer to a structure passed as parameter to a function
seemed to point to another memory position that the one pointed before
calling that function. (this was checked in debug mode with gdb debuger).
Later, another program didn’t link correctly creating a empty non executable
file…
Those problems seem to be resolved compiling everything with the same -Y_gpp
option.
So, do you think this odd behavior is related with the diferent libraries??
I would say so but I would prefer to be sure this was the problem.

Thankf you!

Carlos Beltran

“Chris McKillop” <cdm@qnx.com> wrote in message
news:bvrack$633$1@inn.qnx.com

Carlos Beltran <> cbeltran@dist.unige.it> > wrote:
Hello,

Our software running under Qnx is becoming quite large and therefore is
harder to mantain…recently, I have found that we had some libraries
being
compiled with the QCC -Y_gpp option and others without it. These
libraries
where linked together (statically) to generate some executables to run a
robot.
I just wanted to know if there are any consequences putting together
libraries compiled with GNU C++ lib and other compiled with the Dinkum
C++
lib…


Well, the apps will be bigger. Also, if you could run into some odd stuff
if you say passed a GNU std::string to code written expecting a Dinkum
one.

Generally this is not a good thing to be doing.

chris


Chris McKillop <> cdm@qnx.com> > “The faster I go, the behinder I get.”
Software Engineer, QSSL – Lewis Carroll –
http://qnx.wox.org/

So, do you think this odd behavior is related with the diferent libraries??
I would say so but I would prefer to be sure this was the problem.

Most likely. Unfortunatly, C++ does a lot of compile/link time offset
calculations. So the samed named structure in two sets of C++ libs will
have different sizes, function locations, etc.

chris

\

Chris McKillop <cdm@qnx.com> “The faster I go, the behinder I get.”
Software Engineer, QSSL – Lewis Carroll –
http://qnx.wox.org/