which libraries contain cerr, cout, etc...

Hello,
I am pulling my hair out on this one…
I am getting undefined references to cerr, cout and other ostream type
calls.
I assumed they were always in libc and libstdc++ but I’m linking against
those
libraries.

Which library contains cerr, cout under QNX 6.1 ?

TIA,
$Kevin

How are you compiling? The normal way would be to use ‘QCC’ (note the case)
or ‘qcc -lang-c++’ which should give you the proper linkage.

cheers,

Kris

“Kevin Caporaso” <kcaporaso@pillardata.com> wrote in message
news:af7af7$6vd$1@nntp.qnx.com

Hello,
I am pulling my hair out on this one…
I am getting undefined references to cerr, cout and other ostream type
calls.
I assumed they were always in libc and libstdc++ but I’m linking against
those
libraries.

Which library contains cerr, cout under QNX 6.1 ?

TIA,
$Kevin

Actually, I’ve been using g++ (2.95.2) to compile.
Here is my compile line:
g++ -DX86_PC_NTO_QNX -fpic -lc -L/opt/x/c/lib -lxalan-c1_3 -L/usr/lib -L/op
t/xe/lib -lxerces-c1_6_0 /opt/x/c/obj/XalanExe.o -o /opt/x/c/bin/Xalan

Perhaps, I should try the QCC for a sound check.
Thanks,
$Kevin


“Kris Warkentin” <kewarken@qnx.com> wrote in message
news:af7ci1$911$1@nntp.qnx.com

How are you compiling? The normal way would be to use ‘QCC’ (note the
case)
or ‘qcc -lang-c++’ which should give you the proper linkage.

cheers,

Kris

“Kevin Caporaso” <> kcaporaso@pillardata.com> > wrote in message
news:af7af7$6vd$> 1@nntp.qnx.com> …

Hello,
I am pulling my hair out on this one…
I am getting undefined references to cerr, cout and other ostream type
calls.
I assumed they were always in libc and libstdc++ but I’m linking against
those
libraries.

Which library contains cerr, cout under QNX 6.1 ?

TIA,
$Kevin
\

QCC definitely fixed my linking problems.
Thanks, but I’m still interested in solving the g++ linkage errors.
Any help would be appreciated!

TIA,
$Kevin

“Kevin Caporaso” <kcaporaso@pillardata.com> wrote in message
news:af7d01$9ba$1@nntp.qnx.com

Actually, I’ve been using g++ (2.95.2) to compile.
Here is my compile line:

g++ -DX86_PC_NTO_QNX -fpic -lc -L/opt/x/c/lib -lxalan-c1_3 -L/usr/lib -L/op
t/xe/lib -lxerces-c1_6_0 /opt/x/c/obj/XalanExe.o -o /opt/x/c/bin/Xalan

Perhaps, I should try the QCC for a sound check.
Thanks,
$Kevin


“Kris Warkentin” <> kewarken@qnx.com> > wrote in message
news:af7ci1$911$> 1@nntp.qnx.com> …
How are you compiling? The normal way would be to use ‘QCC’ (note the
case)
or ‘qcc -lang-c++’ which should give you the proper linkage.

cheers,

Kris

“Kevin Caporaso” <> kcaporaso@pillardata.com> > wrote in message
news:af7af7$6vd$> 1@nntp.qnx.com> …

Hello,
I am pulling my hair out on this one…
I am getting undefined references to cerr, cout and other ostream type
calls.
I assumed they were always in libc and libstdc++ but I’m linking
against
those
libraries.

Which library contains cerr, cout under QNX 6.1 ?

TIA,
$Kevin


\

The problem is that qcc is the preferred front end and the one that we make
sure of. That is, the gcc specs files for qnx6 are not particularily well
maintained because we never use gcc as a front end. I’m sure that if
someone really wanted to monkey with it, they could get it working; it’s
just not high on our priority list.

cheers,

Kris

“Kevin Caporaso” <kcaporaso@pillardata.com> wrote in message
news:af7dp1$9m9$1@nntp.qnx.com

QCC definitely fixed my linking problems.
Thanks, but I’m still interested in solving the g++ linkage errors.
Any help would be appreciated!

TIA,
$Kevin

“Kevin Caporaso” <> kcaporaso@pillardata.com> > wrote in message
news:af7d01$9ba$> 1@nntp.qnx.com> …
Actually, I’ve been using g++ (2.95.2) to compile.
Here is my compile line:


g++ -DX86_PC_NTO_QNX -fpic -lc -L/opt/x/c/lib -lxalan-c1_3 -L/usr/lib -L/op
t/xe/lib -lxerces-c1_6_0 /opt/x/c/obj/XalanExe.o -o /opt/x/c/bin/Xalan

Perhaps, I should try the QCC for a sound check.
Thanks,
$Kevin


“Kris Warkentin” <> kewarken@qnx.com> > wrote in message
news:af7ci1$911$> 1@nntp.qnx.com> …
How are you compiling? The normal way would be to use ‘QCC’ (note the
case)
or ‘qcc -lang-c++’ which should give you the proper linkage.

cheers,

Kris

“Kevin Caporaso” <> kcaporaso@pillardata.com> > wrote in message
news:af7af7$6vd$> 1@nntp.qnx.com> …

Hello,
I am pulling my hair out on this one…
I am getting undefined references to cerr, cout and other ostream
type
calls.
I assumed they were always in libc and libstdc++ but I’m linking
against
those
libraries.

Which library contains cerr, cout under QNX 6.1 ?

TIA,
$Kevin




\

You need -lstdc++ if you want the GNU c++ libs, or -lcpp if you want the
Dinkum c++ libs.

g++ -DX86_PC_NTO_QNX -fpic -lc -L/opt/x/c/lib -lxalan-c1_3 -L/usr/lib -L/op
t/xe/lib -lxerces-c1_6_0 /opt/x/c/obj/XalanExe.o -o /opt/x/c/bin/Xalan

Kris,
I am seeing that linking problem with cout, cerr again, this time, with
QCC –
Here’s the compile line and a few of the linking errors follow:
There are others but I figured this was reasonable sampling.

QCC -DX86_PC_NTO_QNX
-lc -L/opt/x/c/lib -lxalan-c1_3 -L/usr/lib -L/opt/xe/lib -lxerces-c1_6_0 -O
-DNDEBUG /o
pt/x/c/obj/TestXPath.o /opt/x/c/obj/NodeNameTreeWalker.o -o
/opt/x/c/bin/testXPath


/opt/x/c/obj/TestXPath.o: In function main': /opt/x/c/obj/TestXPath.o(.text+0x5baf): undefined reference to cout’
/opt/x/c/obj/TestXPath.o: In function
__static_initialization_and_destruction_0': /opt/x/c/obj/TestXPath.o(.text+0x5eca): undefined reference to ios_base::Init::Init(void)

/opt/x/c/obj/TestXPath.o(.text+0x5eda): undefined reference to
_Winit::_Winit(void)' /opt/x/c/obj/TestXPath.o(.text+0x5eeb): undefined reference to _Winit::~_Winit(void)’
/opt/x/c/obj/TestXPath.o(.text+0x5efd): undefined reference to
`ios_base::Init::~Init(void
)’

TIA,
$Kevin




“Kris Warkentin” <kewarken@qnx.com> wrote in message
news:af7ci1$911$1@nntp.qnx.com

How are you compiling? The normal way would be to use ‘QCC’ (note the
case)
or ‘qcc -lang-c++’ which should give you the proper linkage.

cheers,

Kris

“Kevin Caporaso” <> kcaporaso@pillardata.com> > wrote in message
news:af7af7$6vd$> 1@nntp.qnx.com> …

Hello,
I am pulling my hair out on this one…
I am getting undefined references to cerr, cout and other ostream type
calls.
I assumed they were always in libc and libstdc++ but I’m linking against
those
libraries.

Which library contains cerr, cout under QNX 6.1 ?

TIA,
$Kevin

\

begin 666 link.txt
M44-#(“U$6#@V7U!#7TY43U]13E@@(” @7 T*+6QC(“U,+V]P=”]X+V,O;&EB
M(“UL>&%L86XM8S%?,R @+4PO=7-R+VQI8B M3”]O<'0O>&4O;&EB(“UL>&5R
M8V5S+6,Q7S9?,” M3R M1$Y$14)51R @("]O#0IP="]X+V,O;V)J+U1E<W18
M4&%T:“YO(”]O<'0O>"]C+V]B:B].;V1E3F%M951R965786QK97(N;R M;R O
M;W!T+W@O8R]B:6XO=&5S=%A0871H#0H-"@T*+V]P="]X+V,O;V)J+U1E<W18
M4&%T:“YO.B!);B!F=6YC=&EO;B!@;6%I;B<Z#0HO;W!T+W@O8R]O8FHO5&5S
M=%A0871H+F\H+G1E>‘0K,’@U8F%F3H@=6YD969I;F5D(’)E9F5R96YC92!T
M;R!@8V]U="<-“B]O<'0O>”]C+V]B:B]497-T6%!A=&@N;SH@26X@9G5N8W1I
M;VX@8%]?<W1A=&EC7VEN:71I86QI>F%T:6]N7V%N9%]D97-T<G5C=&EO;E\P
M)SH-“B]O<'0O>”]C+V]B:B]497-T6%!A=&@N;R@N=&5X="LP>#5E8V$I.B!U
M;F1E9FEN960@<F5F97)E;F-E('1O(&!I;W-?8F%S93HZ26YI=#HZ26YI="AV
M;VED
0T*)PT*+V]P=”]X+V,O;V)J+U1E<W184&%T:"YO*“YT97ATS!X-65D
M82DZ('5N9&5F:6YE9"!R969E<F5N8V4@=&@8%]7:6YI=#HZ7U=I;FET
’9O
M:60I)PT*+V]P=”]X+V,O;V)J+U1E<W184&%T:"YO*"YT97ATS!X-65E8BDZ
M('5N9&5F:6YE9"!R969E<F5N8V4@=&@8%]7:6YI=#HZ?E]7:6YI="AV;VED
M
2<-“B]O<'0O>”]C+V]B:B]497-T6%!A=&@N;R@N=&5X="LP>#5E9F0I.B!U
M;F1E9FEN960@<F5F97)E;F-E('1O(&!I;W-?8F%S93HZ26YI=#HZ?DEN:70H
(=F]I9 T**2<
end

Try this:

QCC -Vgcc_ntox86 -Y_gpp -DX86_PC_NTO_QNX -L/opt/x/c/lib -lxalan-c1_3 -L/opt/
xe/lib -lxerces-c1_6_0-O -DNDEBUG /opt/x/c/obj/TestXPath.o
/opt/x/c/obj/NodeNameTreeWalker.o -o /opt/x/c/bin/testXPath

You should also be sure they your .o files have been properly compiled as
well.

QCC -Vgcc_ntox86 -Y_gpp -c .c <.cc, *.cpp, whatever, + all the other libs
and defines you need>

You shouldn’t have to specify -lc, or -lstdc++, the qcc conf files will
handle that.
If you want to use the Dinkum C++ libs instead of the GNU C++ libs
change -Y_gpp to -Y_cpp.


Kris,
I am seeing that linking problem with cout, cerr again, this time, with
QCC –
Here’s the compile line and a few of the linking errors follow:
There are others but I figured this was reasonable sampling.

QCC -DX86_PC_NTO_QNX
-lc -L/opt/x/c/lib -lxalan-c1_3 -L/usr/lib -L/opt/xe/lib -lxerces-c1_6_0
-O
-DNDEBUG /o
pt/x/c/obj/TestXPath.o /opt/x/c/obj/NodeNameTreeWalker.o -o
/opt/x/c/bin/testXPath


/opt/x/c/obj/TestXPath.o: In function main': /opt/x/c/obj/TestXPath.o(.text+0x5baf): undefined reference to cout’
/opt/x/c/obj/TestXPath.o: In function
__static_initialization_and_destruction_0': /opt/x/c/obj/TestXPath.o(.text+0x5eca): undefined reference to ios_base::Init::Init(void)

/opt/x/c/obj/TestXPath.o(.text+0x5eda): undefined reference to
_Winit::_Winit(void)' /opt/x/c/obj/TestXPath.o(.text+0x5eeb): undefined reference to _Winit::~_Winit(void)’
/opt/x/c/obj/TestXPath.o(.text+0x5efd): undefined reference to
`ios_base::Init::~Init(void
)’

TIA,
$Kevin




“Kris Warkentin” <> kewarken@qnx.com> > wrote in message
news:af7ci1$911$> 1@nntp.qnx.com> …
How are you compiling? The normal way would be to use ‘QCC’ (note the
case)
or ‘qcc -lang-c++’ which should give you the proper linkage.

cheers,

Kris

“Kevin Caporaso” <> kcaporaso@pillardata.com> > wrote in message
news:af7af7$6vd$> 1@nntp.qnx.com> …

Hello,
I am pulling my hair out on this one…
I am getting undefined references to cerr, cout and other ostream type
calls.
I assumed they were always in libc and libstdc++ but I’m linking
against
those
libraries.

Which library contains cerr, cout under QNX 6.1 ?

TIA,
$Kevin



\

Jeff Baker <jbaker@qnx.com> wrote:

Try this:

QCC -Vgcc_ntox86 -Y_gpp -DX86_PC_NTO_QNX -L/opt/x/c/lib -lxalan-c1_3 -L/opt/

I tried “use QCC” on my qnx 6.1 box and don’t see the -Y option.
Can you explain it a bit?
thanks!

“Jeff Baker” <jbaker@qnx.com> wrote in message
news:afa0qj$bip$1@nntp.qnx.com

Try this:


QCC -Vgcc_ntox86 -Y_gpp -DX86_PC_NTO_QNX -L/opt/x/c/lib -lxalan-c1_3 -L/opt/
xe/lib -lxerces-c1_6_0-O -DNDEBUG /opt/x/c/obj/TestXPath.o
/opt/x/c/obj/NodeNameTreeWalker.o -o /opt/x/c/bin/testXPath

This bombs with:
cc: unknown target ‘gcc_ntox86_gpp’
cc: targets available in /etc/qcc:
gcc_ntox86 (GNU C, default)
make: *** [/opt/x/c/obj/XalanAttr.o] Error 1

I must be missing some definition or .conf file?? Where do i find the
correct one?
Thanks!

You should also be sure they your .o files have been properly compiled as
well.

QCC -Vgcc_ntox86 -Y_gpp -c .c <.cc, *.cpp, whatever, + all the other
libs
and defines you need

You shouldn’t have to specify -lc, or -lstdc++, the qcc conf files will
handle that.
If you want to use the Dinkum C++ libs instead of the GNU C++ libs
change -Y_gpp to -Y_cpp.


Kris,
I am seeing that linking problem with cout, cerr again, this time, with
QCC –
Here’s the compile line and a few of the linking errors follow:
There are others but I figured this was reasonable sampling.

QCC -DX86_PC_NTO_QNX \

-lc -L/opt/x/c/lib -lxalan-c1_3 -L/usr/lib -L/opt/xe/lib -lxerces-c1_6_0
-O
-DNDEBUG /o
pt/x/c/obj/TestXPath.o /opt/x/c/obj/NodeNameTreeWalker.o -o
/opt/x/c/bin/testXPath


/opt/x/c/obj/TestXPath.o: In function main': /opt/x/c/obj/TestXPath.o(.text+0x5baf): undefined reference to cout’
/opt/x/c/obj/TestXPath.o: In function
__static_initialization_and_destruction_0': /opt/x/c/obj/TestXPath.o(.text+0x5eca): undefined reference to ios_base::Init::Init(void)

/opt/x/c/obj/TestXPath.o(.text+0x5eda): undefined reference to
_Winit::_Winit(void)' /opt/x/c/obj/TestXPath.o(.text+0x5eeb): undefined reference to _Winit::~_Winit(void)’
/opt/x/c/obj/TestXPath.o(.text+0x5efd): undefined reference to
`ios_base::Init::~Init(void
)’

TIA,
$Kevin




“Kris Warkentin” <> kewarken@qnx.com> > wrote in message
news:af7ci1$911$> 1@nntp.qnx.com> …
How are you compiling? The normal way would be to use ‘QCC’ (note the
case)
or ‘qcc -lang-c++’ which should give you the proper linkage.

cheers,

Kris

“Kevin Caporaso” <> kcaporaso@pillardata.com> > wrote in message
news:af7af7$6vd$> 1@nntp.qnx.com> …

Hello,
I am pulling my hair out on this one…
I am getting undefined references to cerr, cout and other ostream
type
calls.
I assumed they were always in libc and libstdc++ but I’m linking
against
those
libraries.

Which library contains cerr, cout under QNX 6.1 ?

TIA,
$Kevin





\

Sorry, I don’t have a 6.1.0 install for reference here. Lose the -Y option
completely and see what happens.

“Jeff Baker” <> jbaker@qnx.com> > wrote in message
news:afa0qj$bip$> 1@nntp.qnx.com> …
Try this:



QCC -Vgcc_ntox86 -Y_gpp -DX86_PC_NTO_QNX -L/opt/x/c/lib -lxalan-c1_3 -L/opt/
xe/lib -lxerces-c1_6_0-O -DNDEBUG /opt/x/c/obj/TestXPath.o
/opt/x/c/obj/NodeNameTreeWalker.o -o /opt/x/c/bin/testXPath

This bombs with:
cc: unknown target ‘gcc_ntox86_gpp’
cc: targets available in /etc/qcc:
gcc_ntox86 (GNU C, default)
make: *** [/opt/x/c/obj/XalanAttr.o] Error 1

I must be missing some definition or .conf file?? Where do i find the
correct one?
Thanks!


You should also be sure they your .o files have been properly compiled
as
well.

QCC -Vgcc_ntox86 -Y_gpp -c .c <.cc, *.cpp, whatever, + all the other
libs
and defines you need

You shouldn’t have to specify -lc, or -lstdc++, the qcc conf files will
handle that.
If you want to use the Dinkum C++ libs instead of the GNU C++ libs
change -Y_gpp to -Y_cpp.


Kris,
I am seeing that linking problem with cout, cerr again, this time,
with
QCC –
Here’s the compile line and a few of the linking errors follow:
There are others but I figured this was reasonable sampling.

QCC -DX86_PC_NTO_QNX


-lc -L/opt/x/c/lib -lxalan-c1_3 -L/usr/lib -L/opt/xe/lib -lxerces-c1_6_0
-O
-DNDEBUG /o
pt/x/c/obj/TestXPath.o /opt/x/c/obj/NodeNameTreeWalker.o -o
/opt/x/c/bin/testXPath


/opt/x/c/obj/TestXPath.o: In function main': /opt/x/c/obj/TestXPath.o(.text+0x5baf): undefined reference to cout’
/opt/x/c/obj/TestXPath.o: In function
__static_initialization_and_destruction_0': /opt/x/c/obj/TestXPath.o(.text+0x5eca): undefined reference to ios_base::Init::Init(void)

/opt/x/c/obj/TestXPath.o(.text+0x5eda): undefined reference to
_Winit::_Winit(void)' /opt/x/c/obj/TestXPath.o(.text+0x5eeb): undefined reference to _Winit::~_Winit(void)’
/opt/x/c/obj/TestXPath.o(.text+0x5efd): undefined reference to
`ios_base::Init::~Init(void
)’

TIA,
$Kevin




“Kris Warkentin” <> kewarken@qnx.com> > wrote in message
news:af7ci1$911$> 1@nntp.qnx.com> …
How are you compiling? The normal way would be to use ‘QCC’ (note
the
case)
or ‘qcc -lang-c++’ which should give you the proper linkage.

cheers,

Kris

“Kevin Caporaso” <> kcaporaso@pillardata.com> > wrote in message
news:af7af7$6vd$> 1@nntp.qnx.com> …

Hello,
I am pulling my hair out on this one…
I am getting undefined references to cerr, cout and other ostream
type
calls.
I assumed they were always in libc and libstdc++ but I’m linking
against
those
libraries.

Which library contains cerr, cout under QNX 6.1 ?

TIA,
$Kevin









\

Ya, I did that and I got the same linking errors.
Any other ideas?
eekk… I’m VERY new to QNX.

TIA,
$Kevin

“Jeff Baker” <jbaker@qnx.com> wrote in message
news:afaak4$jm8$1@nntp.qnx.com

Sorry, I don’t have a 6.1.0 install for reference here. Lose the -Y
option
completely and see what happens.


“Jeff Baker” <> jbaker@qnx.com> > wrote in message
news:afa0qj$bip$> 1@nntp.qnx.com> …
Try this:




QCC -Vgcc_ntox86 -Y_gpp -DX86_PC_NTO_QNX -L/opt/x/c/lib -lxalan-c1_3 -L/opt/
xe/lib -lxerces-c1_6_0-O -DNDEBUG /opt/x/c/obj/TestXPath.o
/opt/x/c/obj/NodeNameTreeWalker.o -o /opt/x/c/bin/testXPath

This bombs with:
cc: unknown target ‘gcc_ntox86_gpp’
cc: targets available in /etc/qcc:
gcc_ntox86 (GNU C, default)
make: *** [/opt/x/c/obj/XalanAttr.o] Error 1

I must be missing some definition or .conf file?? Where do i find the
correct one?
Thanks!


You should also be sure they your .o files have been properly compiled
as
well.

QCC -Vgcc_ntox86 -Y_gpp -c .c <.cc, *.cpp, whatever, + all the
other
libs
and defines you need

You shouldn’t have to specify -lc, or -lstdc++, the qcc conf files
will
handle that.
If you want to use the Dinkum C++ libs instead of the GNU C++ libs
change -Y_gpp to -Y_cpp.


Kris,
I am seeing that linking problem with cout, cerr again, this time,
with
QCC –
Here’s the compile line and a few of the linking errors follow:
There are others but I figured this was reasonable sampling.

QCC -DX86_PC_NTO_QNX



-lc -L/opt/x/c/lib -lxalan-c1_3 -L/usr/lib -L/opt/xe/lib -lxerces-c1_6_0
-O
-DNDEBUG /o
pt/x/c/obj/TestXPath.o /opt/x/c/obj/NodeNameTreeWalker.o -o
/opt/x/c/bin/testXPath


/opt/x/c/obj/TestXPath.o: In function main': /opt/x/c/obj/TestXPath.o(.text+0x5baf): undefined reference to cout’
/opt/x/c/obj/TestXPath.o: In function
__static_initialization_and_destruction_0': /opt/x/c/obj/TestXPath.o(.text+0x5eca): undefined reference to ios_base::Init::Init(void)

/opt/x/c/obj/TestXPath.o(.text+0x5eda): undefined reference to
_Winit::_Winit(void)' /opt/x/c/obj/TestXPath.o(.text+0x5eeb): undefined reference to _Winit::~_Winit(void)’
/opt/x/c/obj/TestXPath.o(.text+0x5efd): undefined reference to
`ios_base::Init::~Init(void
)’

TIA,
$Kevin




“Kris Warkentin” <> kewarken@qnx.com> > wrote in message
news:af7ci1$911$> 1@nntp.qnx.com> …
How are you compiling? The normal way would be to use ‘QCC’ (note
the
case)
or ‘qcc -lang-c++’ which should give you the proper linkage.

cheers,

Kris

“Kevin Caporaso” <> kcaporaso@pillardata.com> > wrote in message
news:af7af7$6vd$> 1@nntp.qnx.com> …

Hello,
I am pulling my hair out on this one…
I am getting undefined references to cerr, cout and other
ostream
type
calls.
I assumed they were always in libc and libstdc++ but I’m linking
against
those
libraries.

Which library contains cerr, cout under QNX 6.1 ?

TIA,
$Kevin











\

What’s strange is that I can create a very simple cpp program
and cout, cerr link in just fine.

#include

using namespace std;

int main()
{
cerr << “ouch!\n”;
cout << “bye!\n”;
return 0;
}



“Kevin Caporaso” <kcaporaso@pillardata.com> wrote in message
news:afac30$l73$1@nntp.qnx.com

Ya, I did that and I got the same linking errors.
Any other ideas?
eekk… I’m VERY new to QNX.

TIA,
$Kevin

“Jeff Baker” <> jbaker@qnx.com> > wrote in message
news:afaak4$jm8$> 1@nntp.qnx.com> …
Sorry, I don’t have a 6.1.0 install for reference here. Lose the -Y
option
completely and see what happens.


“Jeff Baker” <> jbaker@qnx.com> > wrote in message
news:afa0qj$bip$> 1@nntp.qnx.com> …
Try this:





QCC -Vgcc_ntox86 -Y_gpp -DX86_PC_NTO_QNX -L/opt/x/c/lib -lxalan-c1_3 -L/opt/
xe/lib -lxerces-c1_6_0-O -DNDEBUG /opt/x/c/obj/TestXPath.o
/opt/x/c/obj/NodeNameTreeWalker.o -o /opt/x/c/bin/testXPath

This bombs with:
cc: unknown target ‘gcc_ntox86_gpp’
cc: targets available in /etc/qcc:
gcc_ntox86 (GNU C, default)
make: *** [/opt/x/c/obj/XalanAttr.o] Error 1

I must be missing some definition or .conf file?? Where do i find the
correct one?
Thanks!


You should also be sure they your .o files have been properly
compiled
as
well.

QCC -Vgcc_ntox86 -Y_gpp -c .c <.cc, *.cpp, whatever, + all the
other
libs
and defines you need

You shouldn’t have to specify -lc, or -lstdc++, the qcc conf files
will
handle that.
If you want to use the Dinkum C++ libs instead of the GNU C++ libs
change -Y_gpp to -Y_cpp.


Kris,
I am seeing that linking problem with cout, cerr again, this time,
with
QCC –
Here’s the compile line and a few of the linking errors follow:
There are others but I figured this was reasonable sampling.

QCC -DX86_PC_NTO_QNX




-lc -L/opt/x/c/lib -lxalan-c1_3 -L/usr/lib -L/opt/xe/lib -lxerces-c1_6_0
-O
-DNDEBUG /o
pt/x/c/obj/TestXPath.o /opt/x/c/obj/NodeNameTreeWalker.o -o
/opt/x/c/bin/testXPath


/opt/x/c/obj/TestXPath.o: In function main': /opt/x/c/obj/TestXPath.o(.text+0x5baf): undefined reference to cout’
/opt/x/c/obj/TestXPath.o: In function
__static_initialization_and_destruction_0': /opt/x/c/obj/TestXPath.o(.text+0x5eca): undefined reference to ios_base::Init::Init(void)

/opt/x/c/obj/TestXPath.o(.text+0x5eda): undefined reference to
_Winit::_Winit(void)' /opt/x/c/obj/TestXPath.o(.text+0x5eeb): undefined reference to _Winit::~_Winit(void)’
/opt/x/c/obj/TestXPath.o(.text+0x5efd): undefined reference to
`ios_base::Init::~Init(void
)’

TIA,
$Kevin




“Kris Warkentin” <> kewarken@qnx.com> > wrote in message
news:af7ci1$911$> 1@nntp.qnx.com> …
How are you compiling? The normal way would be to use ‘QCC’
(note
the
case)
or ‘qcc -lang-c++’ which should give you the proper linkage.

cheers,

Kris

“Kevin Caporaso” <> kcaporaso@pillardata.com> > wrote in message
news:af7af7$6vd$> 1@nntp.qnx.com> …

Hello,
I am pulling my hair out on this one…
I am getting undefined references to cerr, cout and other
ostream
type
calls.
I assumed they were always in libc and libstdc++ but I’m
linking
against
those
libraries.

Which library contains cerr, cout under QNX 6.1 ?

TIA,
$Kevin













\

If you can compile a simple case then the problem must be somewhere in the
compilation of your project. Have you tried a complete recompile? You
shouldn’t have to specify any system libraries manually.

QCC -DX86_PC_NTO_QNX -DNDEBUG -L/opt/x/c/lib -L/opt/xe/lib -lxerces-c1_6_0-O
-lxalan-c1_3 -c
QCC -DX86_PC_NTO_QNX -DNDEBUG -L/opt/x/c/lib -L/opt/xe/lib -lxerces-c1_6_0-O
-lxalan-c1_3 -o

That really should be all that’s required.

As an experiment, try adding ‘-Bstatic’ to the link line. Also, can you
post the output if you add ‘-Wl,–verbose | grep succeeded’ to the end (the
very end) of the link line?

What’s strange is that I can create a very simple cpp program
and cout, cerr link in just fine.

#include <iostream

using namespace std;

int main()
{
cerr << “ouch!\n”;
cout << “bye!\n”;
return 0;
}



“Kevin Caporaso” <> kcaporaso@pillardata.com> > wrote in message
news:afac30$l73$> 1@nntp.qnx.com> …
Ya, I did that and I got the same linking errors.
Any other ideas?
eekk… I’m VERY new to QNX.

TIA,
$Kevin

“Jeff Baker” <> jbaker@qnx.com> > wrote in message
news:afaak4$jm8$> 1@nntp.qnx.com> …
Sorry, I don’t have a 6.1.0 install for reference here. Lose the -Y
option
completely and see what happens.


“Jeff Baker” <> jbaker@qnx.com> > wrote in message
news:afa0qj$bip$> 1@nntp.qnx.com> …
Try this:






QCC -Vgcc_ntox86 -Y_gpp -DX86_PC_NTO_QNX -L/opt/x/c/lib -lxalan-c1_3 -L/opt/
xe/lib -lxerces-c1_6_0-O -DNDEBUG /opt/x/c/obj/TestXPath.o
/opt/x/c/obj/NodeNameTreeWalker.o -o /opt/x/c/bin/testXPath

This bombs with:
cc: unknown target ‘gcc_ntox86_gpp’
cc: targets available in /etc/qcc:
gcc_ntox86 (GNU C, default)
make: *** [/opt/x/c/obj/XalanAttr.o] Error 1

I must be missing some definition or .conf file?? Where do i find
the
correct one?
Thanks!


You should also be sure they your .o files have been properly
compiled
as
well.

QCC -Vgcc_ntox86 -Y_gpp -c .c <.cc, *.cpp, whatever, + all the
other
libs
and defines you need

You shouldn’t have to specify -lc, or -lstdc++, the qcc conf files
will
handle that.
If you want to use the Dinkum C++ libs instead of the GNU C++ libs
change -Y_gpp to -Y_cpp.


Kris,
I am seeing that linking problem with cout, cerr again, this
time,
with
QCC –
Here’s the compile line and a few of the linking errors follow:
There are others but I figured this was reasonable sampling.

QCC -DX86_PC_NTO_QNX





-lc -L/opt/x/c/lib -lxalan-c1_3 -L/usr/lib -L/opt/xe/lib -lxerces-c1_6_0
-O
-DNDEBUG /o
pt/x/c/obj/TestXPath.o /opt/x/c/obj/NodeNameTreeWalker.o -o
/opt/x/c/bin/testXPath


/opt/x/c/obj/TestXPath.o: In function main': /opt/x/c/obj/TestXPath.o(.text+0x5baf): undefined reference to cout’
/opt/x/c/obj/TestXPath.o: In function
__static_initialization_and_destruction_0': /opt/x/c/obj/TestXPath.o(.text+0x5eca): undefined reference to ios_base::Init::Init(void)

/opt/x/c/obj/TestXPath.o(.text+0x5eda): undefined reference to
_Winit::_Winit(void)' /opt/x/c/obj/TestXPath.o(.text+0x5eeb): undefined reference to _Winit::~_Winit(void)’
/opt/x/c/obj/TestXPath.o(.text+0x5efd): undefined reference to
`ios_base::Init::~Init(void
)’

TIA,
$Kevin




“Kris Warkentin” <> kewarken@qnx.com> > wrote in message
news:af7ci1$911$> 1@nntp.qnx.com> …
How are you compiling? The normal way would be to use ‘QCC’
(note
the
case)
or ‘qcc -lang-c++’ which should give you the proper linkage.

cheers,

Kris

“Kevin Caporaso” <> kcaporaso@pillardata.com> > wrote in message
news:af7af7$6vd$> 1@nntp.qnx.com> …

Hello,
I am pulling my hair out on this one…
I am getting undefined references to cerr, cout and other
ostream
type
calls.
I assumed they were always in libc and libstdc++ but I’m
linking
against
those
libraries.

Which library contains cerr, cout under QNX 6.1 ?

TIA,
$Kevin















\

Jeff,
Here’s the latest: I added the -Bstatic to the link line for building
libxalan-c1_3 and did a complete rebuild.
It builds and links cleanly, I get the .so like I should, and always have,
it was when I tried to link in that library
into another executable that the link errors would occur.
Here’s what I’ve discovered though, when I tried to link in that just built
library into a simple program, (like I
posted last time – hello world type with just a cerr and cout) I get
undefined references in the libxalan-c1_3.so.

The commands and output are as follows:

#QCC -Vgcc_ntox86 -DX86_PC_NTO_QNX -L/opt/x/c/lib -lxalan-c1_3 -L/opt/xe/lib
-lxerces-c1_
6_0 -c testme.cpp

… looks good testme.o was created …

QCC -Vgcc_ntox86 -DX86_PC_NTO_QNX -L/opt/x/c/lib -lxalan-c1_3 -L/opt/xe/lib
-lxerces-c1_
6_0 testme.o -o testme 2> errors

more errors

/opt/x/c/lib/libxalan-c1_3.so: undefined reference to cerr' /opt/x/c/lib/libxalan-c1_3.so: undefined reference to _Mutex::~_Mutex(void)’
/opt/x/c/lib/libxalan-c1_3.so: undefined reference to
_String_base::_Xlen(void) const' /opt/x/c/lib/libxalan-c1_3.so: undefined reference to locale::_Init(void)’
/opt/x/c/lib/libxalan-c1_3.so: undefined reference to
ostrstream::~ostrstream(void)' /opt/x/c/lib/libxalan-c1_3.so: undefined reference to _Locinfo::~_Locinfo(void)’
/opt/x/c/lib/libxalan-c1_3.so: undefined reference to strstreambuf virtual table' /opt/x/c/lib/libxalan-c1_3.so: undefined reference to locale::id::_Id_cnt’
/opt/x/c/lib/libxalan-c1_3.so: undefined reference to
_Lockit::_Lockit(int)' /opt/x/c/lib/libxalan-c1_3.so: undefined reference to ctype::id’
/opt/x/c/lib/libxalan-c1_3.so: undefined reference to ios_base type_info node' /opt/x/c/lib/libxalan-c1_3.so: undefined reference to _Mutex::_Unlock(void)’
/opt/x/c/lib/libxalan-c1_3.so: undefined reference to
strstreambuf::_Init(int, char *, ch ar *, int)' /opt/x/c/lib/libxalan-c1_3.so: undefined reference to ios_base::clear(_Iosb::_Iostat
e, bool)’
/opt/x/c/lib/libxalan-c1_3.so: undefined reference to
_Winit::~_Winit(void)' /opt/x/c/lib/libxalan-c1_3.so: undefined reference to ostrstream::basic_ios<char, char_tr
aits > virtual table’

… and more… but I left them off as it’s more repeats of the above…

I’m not sure if this helps or just confuses things?
Maybe this will give us some clue as to what’s happening?
It’s almost as if the libxalan-c1_3 isn’t really building correctly, but I’m
not sure how to prove that
other than these undefined references.
BTW, the libxalan-c1_3 takes about 25 minutes to build.

Thanks for any more help you can provide… You’ve been very kind so far.
$Kevin



“Jeff Baker” <jbaker@qnx.com> wrote in message
news:afaec4$mqp$1@nntp.qnx.com

If you can compile a simple case then the problem must be somewhere in the
compilation of your project. Have you tried a complete recompile? You
shouldn’t have to specify any system libraries manually.


QCC -DX86_PC_NTO_QNX -DNDEBUG -L/opt/x/c/lib -L/opt/xe/lib -lxerces-c1_6_0-O
-lxalan-c1_3 -c <input files

QCC -DX86_PC_NTO_QNX -DNDEBUG -L/opt/x/c/lib -L/opt/xe/lib -lxerces-c1_6_0-O
-lxalan-c1_3 -o <output file

That really should be all that’s required.

As an experiment, try adding ‘-Bstatic’ to the link line. Also, can you
post the output if you add ‘-Wl,–verbose | grep succeeded’ to the end
(the
very end) of the link line?

What’s strange is that I can create a very simple cpp program
and cout, cerr link in just fine.

#include <iostream

using namespace std;

int main()
{
cerr << “ouch!\n”;
cout << “bye!\n”;
return 0;
}



“Kevin Caporaso” <> kcaporaso@pillardata.com> > wrote in message
news:afac30$l73$> 1@nntp.qnx.com> …
Ya, I did that and I got the same linking errors.
Any other ideas?
eekk… I’m VERY new to QNX.

TIA,
$Kevin

“Jeff Baker” <> jbaker@qnx.com> > wrote in message
news:afaak4$jm8$> 1@nntp.qnx.com> …
Sorry, I don’t have a 6.1.0 install for reference here. Lose the -Y
option
completely and see what happens.


“Jeff Baker” <> jbaker@qnx.com> > wrote in message
news:afa0qj$bip$> 1@nntp.qnx.com> …
Try this:







QCC -Vgcc_ntox86 -Y_gpp -DX86_PC_NTO_QNX -L/opt/x/c/lib -lxalan-c1_3 -L/opt/
xe/lib -lxerces-c1_6_0-O -DNDEBUG /opt/x/c/obj/TestXPath.o
/opt/x/c/obj/NodeNameTreeWalker.o -o /opt/x/c/bin/testXPath

This bombs with:
cc: unknown target ‘gcc_ntox86_gpp’
cc: targets available in /etc/qcc:
gcc_ntox86 (GNU C, default)
make: *** [/opt/x/c/obj/XalanAttr.o] Error 1

I must be missing some definition or .conf file?? Where do i find
the
correct one?
Thanks!


You should also be sure they your .o files have been properly
compiled
as
well.

QCC -Vgcc_ntox86 -Y_gpp -c .c <.cc, *.cpp, whatever, + all
the
other
libs
and defines you need

You shouldn’t have to specify -lc, or -lstdc++, the qcc conf
files
will
handle that.
If you want to use the Dinkum C++ libs instead of the GNU C++
libs
change -Y_gpp to -Y_cpp.


Kris,
I am seeing that linking problem with cout, cerr again, this
time,
with
QCC –
Here’s the compile line and a few of the linking errors
follow:
There are others but I figured this was reasonable sampling.

QCC -DX86_PC_NTO_QNX






-lc -L/opt/x/c/lib -lxalan-c1_3 -L/usr/lib -L/opt/xe/lib -lxerces-c1_6_0
-O
-DNDEBUG /o
pt/x/c/obj/TestXPath.o /opt/x/c/obj/NodeNameTreeWalker.o -o
/opt/x/c/bin/testXPath


/opt/x/c/obj/TestXPath.o: In function main': /opt/x/c/obj/TestXPath.o(.text+0x5baf): undefined reference to cout’
/opt/x/c/obj/TestXPath.o: In function
__static_initialization_and_destruction_0': /opt/x/c/obj/TestXPath.o(.text+0x5eca): undefined reference to ios_base::Init::Init(void)

/opt/x/c/obj/TestXPath.o(.text+0x5eda): undefined reference to
_Winit::_Winit(void)' /opt/x/c/obj/TestXPath.o(.text+0x5eeb): undefined reference to _Winit::~_Winit(void)’
/opt/x/c/obj/TestXPath.o(.text+0x5efd): undefined reference to
`ios_base::Init::~Init(void
)’

TIA,
$Kevin




“Kris Warkentin” <> kewarken@qnx.com> > wrote in message
news:af7ci1$911$> 1@nntp.qnx.com> …
How are you compiling? The normal way would be to use ‘QCC’
(note
the
case)
or ‘qcc -lang-c++’ which should give you the proper linkage.

cheers,

Kris

“Kevin Caporaso” <> kcaporaso@pillardata.com> > wrote in message
news:af7af7$6vd$> 1@nntp.qnx.com> …

Hello,
I am pulling my hair out on this one…
I am getting undefined references to cerr, cout and other
ostream
type
calls.
I assumed they were always in libc and libstdc++ but I’m
linking
against
those
libraries.

Which library contains cerr, cout under QNX 6.1 ?

TIA,
$Kevin

















\

How about an ‘objdump -x libxalan-c1_3.so | grep NEEDED’?

Jeff,
Here’s the latest: I added the -Bstatic to the link line for building
libxalan-c1_3 and did a complete rebuild.
It builds and links cleanly, I get the .so like I should, and always have,
it was when I tried to link in that library
into another executable that the link errors would occur.
Here’s what I’ve discovered though, when I tried to link in that just
built
library into a simple program, (like I
posted last time – hello world type with just a cerr and cout) I get
undefined references in the libxalan-c1_3.so.

The commands and output are as follows:


#QCC -Vgcc_ntox86 -DX86_PC_NTO_QNX -L/opt/x/c/lib -lxalan-c1_3 -L/opt/xe/lib
-lxerces-c1_
6_0 -c testme.cpp

… looks good testme.o was created …

QCC -Vgcc_ntox86 -DX86_PC_NTO_QNX -L/opt/x/c/lib -lxalan-c1_3 -L/opt/xe/lib
-lxerces-c1_
6_0 testme.o -o testme 2> errors

more errors

/opt/x/c/lib/libxalan-c1_3.so: undefined reference to cerr' /opt/x/c/lib/libxalan-c1_3.so: undefined reference to _Mutex::~_Mutex(void)’
/opt/x/c/lib/libxalan-c1_3.so: undefined reference to
_String_base::_Xlen(void) const' /opt/x/c/lib/libxalan-c1_3.so: undefined reference to locale::_Init(void)’
/opt/x/c/lib/libxalan-c1_3.so: undefined reference to
ostrstream::~ostrstream(void)' /opt/x/c/lib/libxalan-c1_3.so: undefined reference to _Locinfo::~_Locinfo(void)’
/opt/x/c/lib/libxalan-c1_3.so: undefined reference to strstreambuf virtual table' /opt/x/c/lib/libxalan-c1_3.so: undefined reference to locale:> :id:> :_Id_cnt’
/opt/x/c/lib/libxalan-c1_3.so: undefined reference to
_Lockit::_Lockit(int)' /opt/x/c/lib/libxalan-c1_3.so: undefined reference to ctype::id’
/opt/x/c/lib/libxalan-c1_3.so: undefined reference to ios_base type_info node' /opt/x/c/lib/libxalan-c1_3.so: undefined reference to _Mutex::_Unlock(void)’
/opt/x/c/lib/libxalan-c1_3.so: undefined reference to
strstreambuf::_Init(int, char *, ch ar *, int)' /opt/x/c/lib/libxalan-c1_3.so: undefined reference to ios_base::clear(_Iosb::_Iostat
e, bool)’
/opt/x/c/lib/libxalan-c1_3.so: undefined reference to
_Winit::~_Winit(void)' /opt/x/c/lib/libxalan-c1_3.so: undefined reference to ostrstream::basic_ios<char, char_tr
aits > virtual table’

… and more… but I left them off as it’s more repeats of the above…

I’m not sure if this helps or just confuses things?
Maybe this will give us some clue as to what’s happening?
It’s almost as if the libxalan-c1_3 isn’t really building correctly, but
I’m
not sure how to prove that
other than these undefined references.
BTW, the libxalan-c1_3 takes about 25 minutes to build.

Thanks for any more help you can provide… You’ve been very kind so far.
$Kevin



“Jeff Baker” <> jbaker@qnx.com> > wrote in message
news:afaec4$mqp$> 1@nntp.qnx.com> …
If you can compile a simple case then the problem must be somewhere in
the
compilation of your project. Have you tried a complete recompile? You
shouldn’t have to specify any system libraries manually.



QCC -DX86_PC_NTO_QNX -DNDEBUG -L/opt/x/c/lib -L/opt/xe/lib -lxerces-c1_6_0-O
-lxalan-c1_3 -c <input files


QCC -DX86_PC_NTO_QNX -DNDEBUG -L/opt/x/c/lib -L/opt/xe/lib -lxerces-c1_6_0-O
-lxalan-c1_3 -o <output file

That really should be all that’s required.

As an experiment, try adding ‘-Bstatic’ to the link line. Also, can you
post the output if you add ‘-Wl,–verbose | grep succeeded’ to the end
(the
very end) of the link line?

What’s strange is that I can create a very simple cpp program
and cout, cerr link in just fine.

#include <iostream

using namespace std;

int main()
{
cerr << “ouch!\n”;
cout << “bye!\n”;
return 0;
}



“Kevin Caporaso” <> kcaporaso@pillardata.com> > wrote in message
news:afac30$l73$> 1@nntp.qnx.com> …
Ya, I did that and I got the same linking errors.
Any other ideas?
eekk… I’m VERY new to QNX.

TIA,
$Kevin

“Jeff Baker” <> jbaker@qnx.com> > wrote in message
news:afaak4$jm8$> 1@nntp.qnx.com> …
Sorry, I don’t have a 6.1.0 install for reference here. Lose
the -Y
option
completely and see what happens.


“Jeff Baker” <> jbaker@qnx.com> > wrote in message
news:afa0qj$bip$> 1@nntp.qnx.com> …
Try this:








QCC -Vgcc_ntox86 -Y_gpp -DX86_PC_NTO_QNX -L/opt/x/c/lib -lxalan-c1_3 -L/opt/
xe/lib -lxerces-c1_6_0-O -DNDEBUG /opt/x/c/obj/TestXPath.o
/opt/x/c/obj/NodeNameTreeWalker.o -o /opt/x/c/bin/testXPath

This bombs with:
cc: unknown target ‘gcc_ntox86_gpp’
cc: targets available in /etc/qcc:
gcc_ntox86 (GNU C, default)
make: *** [/opt/x/c/obj/XalanAttr.o] Error 1

I must be missing some definition or .conf file?? Where do i
find
the
correct one?
Thanks!


You should also be sure they your .o files have been properly
compiled
as
well.

QCC -Vgcc_ntox86 -Y_gpp -c .c <.cc, *.cpp, whatever, + all
the
other
libs
and defines you need

You shouldn’t have to specify -lc, or -lstdc++, the qcc conf
files
will
handle that.
If you want to use the Dinkum C++ libs instead of the GNU C++
libs
change -Y_gpp to -Y_cpp.


Kris,
I am seeing that linking problem with cout, cerr again, this
time,
with
QCC –
Here’s the compile line and a few of the linking errors
follow:
There are others but I figured this was reasonable
sampling.

QCC -DX86_PC_NTO_QNX







-lc -L/opt/x/c/lib -lxalan-c1_3 -L/usr/lib -L/opt/xe/lib -lxerces-c1_6_0
-O
-DNDEBUG /o
pt/x/c/obj/TestXPath.o /opt/x/c/obj/NodeNameTreeWalker.o -o
/opt/x/c/bin/testXPath


/opt/x/c/obj/TestXPath.o: In function main': /opt/x/c/obj/TestXPath.o(.text+0x5baf): undefined reference to cout’
/opt/x/c/obj/TestXPath.o: In function
__static_initialization_and_destruction_0': /opt/x/c/obj/TestXPath.o(.text+0x5eca): undefined reference to ios_base::Init::Init(void)

/opt/x/c/obj/TestXPath.o(.text+0x5eda): undefined reference
to
_Winit::_Winit(void)' /opt/x/c/obj/TestXPath.o(.text+0x5eeb): undefined reference to _Winit::~_Winit(void)’
/opt/x/c/obj/TestXPath.o(.text+0x5efd): undefined reference
to
`ios_base::Init::~Init(void
)’

TIA,
$Kevin




“Kris Warkentin” <> kewarken@qnx.com> > wrote in message
news:af7ci1$911$> 1@nntp.qnx.com> …
How are you compiling? The normal way would be to use
‘QCC’
(note
the
case)
or ‘qcc -lang-c++’ which should give you the proper
linkage.

cheers,

Kris

“Kevin Caporaso” <> kcaporaso@pillardata.com> > wrote in
message
news:af7af7$6vd$> 1@nntp.qnx.com> …

Hello,
I am pulling my hair out on this one…
I am getting undefined references to cerr, cout and
other
ostream
type
calls.
I assumed they were always in libc and libstdc++ but I’m
linking
against
those
libraries.

Which library contains cerr, cout under QNX 6.1 ?

TIA,
$Kevin



















\

Oh, that’s a sweet command!!
Does that mean, those are libraries it relies on when linking into other
binaries?
Or are those libraries it can’t find and still needs in order to be
complete?

got 4 ‘NEEDED’ items:
libxerces (which I also build and it seem to build Ok)
libcpp.so.2
libm.so.2
libc.so.2




“Jeff Baker” <jbaker@qnx.com> wrote in message
news:afcfht$ao8$1@nntp.qnx.com

How about an ‘objdump -x libxalan-c1_3.so | grep NEEDED’?

Jeff,
Here’s the latest: I added the -Bstatic to the link line for building
libxalan-c1_3 and did a complete rebuild.
It builds and links cleanly, I get the .so like I should, and always
have,
it was when I tried to link in that library
into another executable that the link errors would occur.
Here’s what I’ve discovered though, when I tried to link in that just
built
library into a simple program, (like I
posted last time – hello world type with just a cerr and cout) I get
undefined references in the libxalan-c1_3.so.

The commands and output are as follows:



#QCC -Vgcc_ntox86 -DX86_PC_NTO_QNX -L/opt/x/c/lib -lxalan-c1_3 -L/opt/xe/lib
-lxerces-c1_
6_0 -c testme.cpp

… looks good testme.o was created …



QCC -Vgcc_ntox86 -DX86_PC_NTO_QNX -L/opt/x/c/lib -lxalan-c1_3 -L/opt/xe/lib
-lxerces-c1_
6_0 testme.o -o testme 2> errors

more errors

/opt/x/c/lib/libxalan-c1_3.so: undefined reference to cerr' /opt/x/c/lib/libxalan-c1_3.so: undefined reference to _Mutex::~_Mutex(void)’
/opt/x/c/lib/libxalan-c1_3.so: undefined reference to
_String_base::_Xlen(void) const' /opt/x/c/lib/libxalan-c1_3.so: undefined reference to locale::_Init(void)’
/opt/x/c/lib/libxalan-c1_3.so: undefined reference to
ostrstream::~ostrstream(void)' /opt/x/c/lib/libxalan-c1_3.so: undefined reference to _Locinfo::~_Locinfo(void)’
/opt/x/c/lib/libxalan-c1_3.so: undefined reference to strstreambuf virtual table' /opt/x/c/lib/libxalan-c1_3.so: undefined reference to locale:> :id:> :_Id_cnt’
/opt/x/c/lib/libxalan-c1_3.so: undefined reference to
_Lockit::_Lockit(int)' /opt/x/c/lib/libxalan-c1_3.so: undefined reference to ctype::id’
/opt/x/c/lib/libxalan-c1_3.so: undefined reference to ios_base type_info node' /opt/x/c/lib/libxalan-c1_3.so: undefined reference to _Mutex::_Unlock(void)’
/opt/x/c/lib/libxalan-c1_3.so: undefined reference to
strstreambuf::_Init(int, char *, ch ar *, int)' /opt/x/c/lib/libxalan-c1_3.so: undefined reference to ios_base::clear(_Iosb::_Iostat
e, bool)’
/opt/x/c/lib/libxalan-c1_3.so: undefined reference to
_Winit::~_Winit(void)' /opt/x/c/lib/libxalan-c1_3.so: undefined reference to ostrstream::basic_ios<char, char_tr
aits > virtual table’

… and more… but I left them off as it’s more repeats of the above…

I’m not sure if this helps or just confuses things?
Maybe this will give us some clue as to what’s happening?
It’s almost as if the libxalan-c1_3 isn’t really building correctly, but
I’m
not sure how to prove that
other than these undefined references.
BTW, the libxalan-c1_3 takes about 25 minutes to build.

Thanks for any more help you can provide… You’ve been very kind so
far.
$Kevin



“Jeff Baker” <> jbaker@qnx.com> > wrote in message
news:afaec4$mqp$> 1@nntp.qnx.com> …
If you can compile a simple case then the problem must be somewhere in
the
compilation of your project. Have you tried a complete recompile?
You
shouldn’t have to specify any system libraries manually.




QCC -DX86_PC_NTO_QNX -DNDEBUG -L/opt/x/c/lib -L/opt/xe/lib -lxerces-c1_6_0-O
-lxalan-c1_3 -c <input files



QCC -DX86_PC_NTO_QNX -DNDEBUG -L/opt/x/c/lib -L/opt/xe/lib -lxerces-c1_6_0-O
-lxalan-c1_3 -o <output file

That really should be all that’s required.

As an experiment, try adding ‘-Bstatic’ to the link line. Also, can
you
post the output if you add ‘-Wl,–verbose | grep succeeded’ to the end
(the
very end) of the link line?

What’s strange is that I can create a very simple cpp program
and cout, cerr link in just fine.

#include <iostream

using namespace std;

int main()
{
cerr << “ouch!\n”;
cout << “bye!\n”;
return 0;
}



“Kevin Caporaso” <> kcaporaso@pillardata.com> > wrote in message
news:afac30$l73$> 1@nntp.qnx.com> …
Ya, I did that and I got the same linking errors.
Any other ideas?
eekk… I’m VERY new to QNX.

TIA,
$Kevin

“Jeff Baker” <> jbaker@qnx.com> > wrote in message
news:afaak4$jm8$> 1@nntp.qnx.com> …
Sorry, I don’t have a 6.1.0 install for reference here. Lose
the -Y
option
completely and see what happens.


“Jeff Baker” <> jbaker@qnx.com> > wrote in message
news:afa0qj$bip$> 1@nntp.qnx.com> …
Try this:









QCC -Vgcc_ntox86 -Y_gpp -DX86_PC_NTO_QNX -L/opt/x/c/lib -lxalan-c1_3 -L/opt/
xe/lib -lxerces-c1_6_0-O -DNDEBUG /opt/x/c/obj/TestXPath.o
/opt/x/c/obj/NodeNameTreeWalker.o -o /opt/x/c/bin/testXPath

This bombs with:
cc: unknown target ‘gcc_ntox86_gpp’
cc: targets available in /etc/qcc:
gcc_ntox86 (GNU C, default)
make: *** [/opt/x/c/obj/XalanAttr.o] Error 1

I must be missing some definition or .conf file?? Where do i
find
the
correct one?
Thanks!


You should also be sure they your .o files have been
properly
compiled
as
well.

QCC -Vgcc_ntox86 -Y_gpp -c .c <.cc, *.cpp, whatever, +
all
the
other
libs
and defines you need

You shouldn’t have to specify -lc, or -lstdc++, the qcc conf
files
will
handle that.
If you want to use the Dinkum C++ libs instead of the GNU
C++
libs
change -Y_gpp to -Y_cpp.


Kris,
I am seeing that linking problem with cout, cerr again,
this
time,
with
QCC –
Here’s the compile line and a few of the linking errors
follow:
There are others but I figured this was reasonable
sampling.

QCC -DX86_PC_NTO_QNX








-lc -L/opt/x/c/lib -lxalan-c1_3 -L/usr/lib -L/opt/xe/lib -lxerces-c1_6_0
-O
-DNDEBUG /o
pt/x/c/obj/TestXPath.o
/opt/x/c/obj/NodeNameTreeWalker.o -o
/opt/x/c/bin/testXPath


/opt/x/c/obj/TestXPath.o: In function main': /opt/x/c/obj/TestXPath.o(.text+0x5baf): undefined reference to cout’
/opt/x/c/obj/TestXPath.o: In function
__static_initialization_and_destruction_0': /opt/x/c/obj/TestXPath.o(.text+0x5eca): undefined reference to ios_base::Init::Init(void)

/opt/x/c/obj/TestXPath.o(.text+0x5eda): undefined
reference
to
_Winit::_Winit(void)' /opt/x/c/obj/TestXPath.o(.text+0x5eeb): undefined reference to _Winit::~_Winit(void)’
/opt/x/c/obj/TestXPath.o(.text+0x5efd): undefined
reference
to
`ios_base::Init::~Init(void
)’

TIA,
$Kevin




“Kris Warkentin” <> kewarken@qnx.com> > wrote in message
news:af7ci1$911$> 1@nntp.qnx.com> …
How are you compiling? The normal way would be to use
‘QCC’
(note
the
case)
or ‘qcc -lang-c++’ which should give you the proper
linkage.

cheers,

Kris

“Kevin Caporaso” <> kcaporaso@pillardata.com> > wrote in
message
news:af7af7$6vd$> 1@nntp.qnx.com> …

Hello,
I am pulling my hair out on this one…
I am getting undefined references to cerr, cout and
other
ostream
type
calls.
I assumed they were always in libc and libstdc++ but
I’m
linking
against
those
libraries.

Which library contains cerr, cout under QNX 6.1 ?

TIA,
$Kevin





















\

That is a list of shared object dependencies of your object. That tells me
that it’s depending on the Dinkum C++ lib. Check that the source is
including <iostream.h>, not in all cases.

Oh, that’s a sweet command!!
Does that mean, those are libraries it relies on when linking into other
binaries?
Or are those libraries it can’t find and still needs in order to be
complete?

got 4 ‘NEEDED’ items:
libxerces (which I also build and it seem to build Ok)
libcpp.so.2
libm.so.2
libc.so.2




“Jeff Baker” <> jbaker@qnx.com> > wrote in message
news:afcfht$ao8$> 1@nntp.qnx.com> …
How about an ‘objdump -x libxalan-c1_3.so | grep NEEDED’?

Jeff,
Here’s the latest: I added the -Bstatic to the link line for building
libxalan-c1_3 and did a complete rebuild.
It builds and links cleanly, I get the .so like I should, and always
have,
it was when I tried to link in that library
into another executable that the link errors would occur.
Here’s what I’ve discovered though, when I tried to link in that just
built
library into a simple program, (like I
posted last time – hello world type with just a cerr and cout) I get
undefined references in the libxalan-c1_3.so.

The commands and output are as follows:




#QCC -Vgcc_ntox86 -DX86_PC_NTO_QNX -L/opt/x/c/lib -lxalan-c1_3 -L/opt/xe/lib
-lxerces-c1_
6_0 -c testme.cpp

… looks good testme.o was created …




QCC -Vgcc_ntox86 -DX86_PC_NTO_QNX -L/opt/x/c/lib -lxalan-c1_3 -L/opt/xe/lib
-lxerces-c1_
6_0 testme.o -o testme 2> errors

more errors

/opt/x/c/lib/libxalan-c1_3.so: undefined reference to cerr' /opt/x/c/lib/libxalan-c1_3.so: undefined reference to _Mutex::~_Mutex(void)’
/opt/x/c/lib/libxalan-c1_3.so: undefined reference to
_String_base::_Xlen(void) const' /opt/x/c/lib/libxalan-c1_3.so: undefined reference to locale::_Init(void)’
/opt/x/c/lib/libxalan-c1_3.so: undefined reference to
ostrstream::~ostrstream(void)' /opt/x/c/lib/libxalan-c1_3.so: undefined reference to _Locinfo::~_Locinfo(void)’
/opt/x/c/lib/libxalan-c1_3.so: undefined reference to strstreambuf virtual table' /opt/x/c/lib/libxalan-c1_3.so: undefined reference to locale:> :id:> :_Id_cnt’
/opt/x/c/lib/libxalan-c1_3.so: undefined reference to
_Lockit::_Lockit(int)' /opt/x/c/lib/libxalan-c1_3.so: undefined reference to ctype::id’
/opt/x/c/lib/libxalan-c1_3.so: undefined reference to ios_base type_info node' /opt/x/c/lib/libxalan-c1_3.so: undefined reference to _Mutex::_Unlock(void)’
/opt/x/c/lib/libxalan-c1_3.so: undefined reference to
strstreambuf::_Init(int, char *, ch ar *, int)' /opt/x/c/lib/libxalan-c1_3.so: undefined reference to ios_base::clear(_Iosb::_Iostat
e, bool)’
/opt/x/c/lib/libxalan-c1_3.so: undefined reference to
_Winit::~_Winit(void)' /opt/x/c/lib/libxalan-c1_3.so: undefined reference to ostrstream::basic_ios<char, char_tr
aits > virtual table’

… and more… but I left them off as it’s more repeats of the
above…

I’m not sure if this helps or just confuses things?
Maybe this will give us some clue as to what’s happening?
It’s almost as if the libxalan-c1_3 isn’t really building correctly,
but
I’m
not sure how to prove that
other than these undefined references.
BTW, the libxalan-c1_3 takes about 25 minutes to build.

Thanks for any more help you can provide… You’ve been very kind so
far.
$Kevin



“Jeff Baker” <> jbaker@qnx.com> > wrote in message
news:afaec4$mqp$> 1@nntp.qnx.com> …
If you can compile a simple case then the problem must be somewhere
in
the
compilation of your project. Have you tried a complete recompile?
You
shouldn’t have to specify any system libraries manually.





QCC -DX86_PC_NTO_QNX -DNDEBUG -L/opt/x/c/lib -L/opt/xe/lib -lxerces-c1_6_0-O
-lxalan-c1_3 -c <input files




QCC -DX86_PC_NTO_QNX -DNDEBUG -L/opt/x/c/lib -L/opt/xe/lib -lxerces-c1_6_0-O
-lxalan-c1_3 -o <output file

That really should be all that’s required.

As an experiment, try adding ‘-Bstatic’ to the link line. Also, can
you
post the output if you add ‘-Wl,–verbose | grep succeeded’ to the
end
(the
very end) of the link line?

What’s strange is that I can create a very simple cpp program
and cout, cerr link in just fine.

#include <iostream

using namespace std;

int main()
{
cerr << “ouch!\n”;
cout << “bye!\n”;
return 0;
}



“Kevin Caporaso” <> kcaporaso@pillardata.com> > wrote in message
news:afac30$l73$> 1@nntp.qnx.com> …
Ya, I did that and I got the same linking errors.
Any other ideas?
eekk… I’m VERY new to QNX.

TIA,
$Kevin

“Jeff Baker” <> jbaker@qnx.com> > wrote in message
news:afaak4$jm8$> 1@nntp.qnx.com> …
Sorry, I don’t have a 6.1.0 install for reference here. Lose
the -Y
option
completely and see what happens.


“Jeff Baker” <> jbaker@qnx.com> > wrote in message
news:afa0qj$bip$> 1@nntp.qnx.com> …
Try this:










QCC -Vgcc_ntox86 -Y_gpp -DX86_PC_NTO_QNX -L/opt/x/c/lib -lxalan-c1_3 -L/opt/
xe/lib -lxerces-c1_6_0-O -DNDEBUG /opt/x/c/obj/TestXPath.o
/opt/x/c/obj/NodeNameTreeWalker.o -o
/opt/x/c/bin/testXPath

This bombs with:
cc: unknown target ‘gcc_ntox86_gpp’
cc: targets available in /etc/qcc:
gcc_ntox86 (GNU C, default)
make: *** [/opt/x/c/obj/XalanAttr.o] Error 1

I must be missing some definition or .conf file?? Where do
i
find
the
correct one?
Thanks!


You should also be sure they your .o files have been
properly
compiled
as
well.

QCC -Vgcc_ntox86 -Y_gpp -c .c <.cc, *.cpp, whatever, +
all
the
other
libs
and defines you need

You shouldn’t have to specify -lc, or -lstdc++, the qcc
conf
files
will
handle that.
If you want to use the Dinkum C++ libs instead of the GNU
C++
libs
change -Y_gpp to -Y_cpp.


Kris,
I am seeing that linking problem with cout, cerr again,
this
time,
with
QCC –
Here’s the compile line and a few of the linking errors
follow:
There are others but I figured this was reasonable
sampling.

QCC -DX86_PC_NTO_QNX









-lc -L/opt/x/c/lib -lxalan-c1_3 -L/usr/lib -L/opt/xe/lib -lxerces-c1_6_0
-O
-DNDEBUG /o
pt/x/c/obj/TestXPath.o
/opt/x/c/obj/NodeNameTreeWalker.o -o
/opt/x/c/bin/testXPath


/opt/x/c/obj/TestXPath.o: In function main': /opt/x/c/obj/TestXPath.o(.text+0x5baf): undefined reference to cout’
/opt/x/c/obj/TestXPath.o: In function
__static_initialization_and_destruction_0': /opt/x/c/obj/TestXPath.o(.text+0x5eca): undefined reference to ios_base::Init::Init(void)

/opt/x/c/obj/TestXPath.o(.text+0x5eda): undefined
reference
to
_Winit::_Winit(void)' /opt/x/c/obj/TestXPath.o(.text+0x5eeb): undefined reference to _Winit::~_Winit(void)’
/opt/x/c/obj/TestXPath.o(.text+0x5efd): undefined
reference
to
`ios_base::Init::~Init(void
)’

TIA,
$Kevin




“Kris Warkentin” <> kewarken@qnx.com> > wrote in message
news:af7ci1$911$> 1@nntp.qnx.com> …
How are you compiling? The normal way would be to use
‘QCC’
(note
the
case)
or ‘qcc -lang-c++’ which should give you the proper
linkage.

cheers,

Kris

“Kevin Caporaso” <> kcaporaso@pillardata.com> > wrote in
message
news:af7af7$6vd$> 1@nntp.qnx.com> …

Hello,
I am pulling my hair out on this one…
I am getting undefined references to cerr, cout and
other
ostream
type
calls.
I assumed they were always in libc and libstdc++ but
I’m
linking
against
those
libraries.

Which library contains cerr, cout under QNX 6.1 ?

TIA,
$Kevin























\

I’m confident that it’s including … is that wrong?
I must be confused… I thought everything was going to non ‘.h’ ??
Are you saying that I should be using <iostream.h> ?


“Jeff Baker” <jbaker@qnx.com> wrote in message
news:afcidf$d7d$1@nntp.qnx.com

That is a list of shared object dependencies of your object. That tells
me
that it’s depending on the Dinkum C++ lib. Check that the source is
including <iostream.h>, not in all cases.


Oh, that’s a sweet command!!
Does that mean, those are libraries it relies on when linking into other
binaries?
Or are those libraries it can’t find and still needs in order to be
complete?

got 4 ‘NEEDED’ items:
libxerces (which I also build and it seem to build Ok)
libcpp.so.2
libm.so.2
libc.so.2




“Jeff Baker” <> jbaker@qnx.com> > wrote in message
news:afcfht$ao8$> 1@nntp.qnx.com> …
How about an ‘objdump -x libxalan-c1_3.so | grep NEEDED’?

Jeff,
Here’s the latest: I added the -Bstatic to the link line for
building
libxalan-c1_3 and did a complete rebuild.
It builds and links cleanly, I get the .so like I should, and always
have,
it was when I tried to link in that library
into another executable that the link errors would occur.
Here’s what I’ve discovered though, when I tried to link in that
just
built
library into a simple program, (like I
posted last time – hello world type with just a cerr and cout) I
get
undefined references in the libxalan-c1_3.so.

The commands and output are as follows:





#QCC -Vgcc_ntox86 -DX86_PC_NTO_QNX -L/opt/x/c/lib -lxalan-c1_3 -L/opt/xe/lib
-lxerces-c1_
6_0 -c testme.cpp

… looks good testme.o was created …





QCC -Vgcc_ntox86 -DX86_PC_NTO_QNX -L/opt/x/c/lib -lxalan-c1_3 -L/opt/xe/lib



-lxerces-c1_
6_0 testme.o -o testme 2> errors

more errors

/opt/x/c/lib/libxalan-c1_3.so: undefined reference to cerr' /opt/x/c/lib/libxalan-c1_3.so: undefined reference to _Mutex::~_Mutex(void)’
/opt/x/c/lib/libxalan-c1_3.so: undefined reference to
_String_base::_Xlen(void) const' /opt/x/c/lib/libxalan-c1_3.so: undefined reference to locale::_Init(void)’
/opt/x/c/lib/libxalan-c1_3.so: undefined reference to
ostrstream::~ostrstream(void)' /opt/x/c/lib/libxalan-c1_3.so: undefined reference to _Locinfo::~_Locinfo(void)’
/opt/x/c/lib/libxalan-c1_3.so: undefined reference to strstreambuf virtual table' /opt/x/c/lib/libxalan-c1_3.so: undefined reference to locale:> :id:> :_Id_cnt’
/opt/x/c/lib/libxalan-c1_3.so: undefined reference to
_Lockit::_Lockit(int)' /opt/x/c/lib/libxalan-c1_3.so: undefined reference to ctype::id’
/opt/x/c/lib/libxalan-c1_3.so: undefined reference to ios_base type_info node' /opt/x/c/lib/libxalan-c1_3.so: undefined reference to _Mutex::_Unlock(void)’
/opt/x/c/lib/libxalan-c1_3.so: undefined reference to
strstreambuf::_Init(int, char *, ch ar *, int)' /opt/x/c/lib/libxalan-c1_3.so: undefined reference to ios_base::clear(_Iosb::_Iostat
e, bool)’
/opt/x/c/lib/libxalan-c1_3.so: undefined reference to
_Winit::~_Winit(void)' /opt/x/c/lib/libxalan-c1_3.so: undefined reference to ostrstream::basic_ios<char, char_tr
aits > virtual table’

… and more… but I left them off as it’s more repeats of the
above…

I’m not sure if this helps or just confuses things?
Maybe this will give us some clue as to what’s happening?
It’s almost as if the libxalan-c1_3 isn’t really building correctly,
but
I’m
not sure how to prove that
other than these undefined references.
BTW, the libxalan-c1_3 takes about 25 minutes to build.

Thanks for any more help you can provide… You’ve been very kind so
far.
$Kevin



“Jeff Baker” <> jbaker@qnx.com> > wrote in message
news:afaec4$mqp$> 1@nntp.qnx.com> …
If you can compile a simple case then the problem must be
somewhere
in
the
compilation of your project. Have you tried a complete recompile?
You
shouldn’t have to specify any system libraries manually.






QCC -DX86_PC_NTO_QNX -DNDEBUG -L/opt/x/c/lib -L/opt/xe/lib -lxerces-c1_6_0-O
-lxalan-c1_3 -c <input files





QCC -DX86_PC_NTO_QNX -DNDEBUG -L/opt/x/c/lib -L/opt/xe/lib -lxerces-c1_6_0-O
-lxalan-c1_3 -o <output file

That really should be all that’s required.

As an experiment, try adding ‘-Bstatic’ to the link line. Also,
can
you
post the output if you add ‘-Wl,–verbose | grep succeeded’ to the
end
(the
very end) of the link line?

What’s strange is that I can create a very simple cpp program
and cout, cerr link in just fine.

#include <iostream

using namespace std;

int main()
{
cerr << “ouch!\n”;
cout << “bye!\n”;
return 0;
}



“Kevin Caporaso” <> kcaporaso@pillardata.com> > wrote in message
news:afac30$l73$> 1@nntp.qnx.com> …
Ya, I did that and I got the same linking errors.
Any other ideas?
eekk… I’m VERY new to QNX.

TIA,
$Kevin

“Jeff Baker” <> jbaker@qnx.com> > wrote in message
news:afaak4$jm8$> 1@nntp.qnx.com> …
Sorry, I don’t have a 6.1.0 install for reference here.
Lose
the -Y
option
completely and see what happens.


“Jeff Baker” <> jbaker@qnx.com> > wrote in message
news:afa0qj$bip$> 1@nntp.qnx.com> …
Try this:











QCC -Vgcc_ntox86 -Y_gpp -DX86_PC_NTO_QNX -L/opt/x/c/lib -lxalan-c1_3 -L/opt/
xe/lib -lxerces-c1_6_0-O -DNDEBUG
/opt/x/c/obj/TestXPath.o
/opt/x/c/obj/NodeNameTreeWalker.o -o
/opt/x/c/bin/testXPath

This bombs with:
cc: unknown target ‘gcc_ntox86_gpp’
cc: targets available in /etc/qcc:
gcc_ntox86 (GNU C, default)
make: *** [/opt/x/c/obj/XalanAttr.o] Error 1

I must be missing some definition or .conf file?? Where
do
i
find
the
correct one?
Thanks!


You should also be sure they your .o files have been
properly
compiled
as
well.

QCC -Vgcc_ntox86 -Y_gpp -c .c <.cc, *.cpp, whatever,
+
all
the
other
libs
and defines you need

You shouldn’t have to specify -lc, or -lstdc++, the qcc
conf
files
will
handle that.
If you want to use the Dinkum C++ libs instead of the
GNU
C++
libs
change -Y_gpp to -Y_cpp.


Kris,
I am seeing that linking problem with cout, cerr
again,
this
time,
with
QCC –
Here’s the compile line and a few of the linking
errors
follow:
There are others but I figured this was reasonable
sampling.

QCC -DX86_PC_NTO_QNX










-lc -L/opt/x/c/lib -lxalan-c1_3 -L/usr/lib -L/opt/xe/lib -lxerces-c1_6_0
-O
-DNDEBUG /o
pt/x/c/obj/TestXPath.o
/opt/x/c/obj/NodeNameTreeWalker.o -o
/opt/x/c/bin/testXPath


/opt/x/c/obj/TestXPath.o: In function main': /opt/x/c/obj/TestXPath.o(.text+0x5baf): undefined reference to cout’
/opt/x/c/obj/TestXPath.o: In function
__static_initialization_and_destruction_0': /opt/x/c/obj/TestXPath.o(.text+0x5eca): undefined reference to ios_base::Init::Init(void)

/opt/x/c/obj/TestXPath.o(.text+0x5eda): undefined
reference
to
_Winit::_Winit(void)' /opt/x/c/obj/TestXPath.o(.text+0x5eeb): undefined reference to _Winit::~_Winit(void)’
/opt/x/c/obj/TestXPath.o(.text+0x5efd): undefined
reference
to
`ios_base::Init::~Init(void
)’

TIA,
$Kevin




“Kris Warkentin” <> kewarken@qnx.com> > wrote in message
news:af7ci1$911$> 1@nntp.qnx.com> …
How are you compiling? The normal way would be to
use
‘QCC’
(note
the
case)
or ‘qcc -lang-c++’ which should give you the proper
linkage.

cheers,

Kris

“Kevin Caporaso” <> kcaporaso@pillardata.com> > wrote in
message
news:af7af7$6vd$> 1@nntp.qnx.com> …

Hello,
I am pulling my hair out on this one…
I am getting undefined references to cerr, cout
and
other
ostream
type
calls.
I assumed they were always in libc and libstdc++
but
I’m
linking
against
those
libraries.

Which library contains cerr, cout under QNX 6.1 ?

TIA,
$Kevin

























\

I’m confident that it’s including … is that wrong?
I must be confused… I thought everything was going to non ‘.h’ ??
Are you saying that I should be using <iostream.h> ?

When using the Dinkum libs, you should use <iostream.h>.

“Jeff Baker” <> jbaker@qnx.com> > wrote in message
news:afcidf$d7d$> 1@nntp.qnx.com> …
That is a list of shared object dependencies of your object. That tells
me
that it’s depending on the Dinkum C++ lib. Check that the source is
including <iostream.h>, not in all cases.


Oh, that’s a sweet command!!
Does that mean, those are libraries it relies on when linking into
other
binaries?
Or are those libraries it can’t find and still needs in order to be
complete?

got 4 ‘NEEDED’ items:
libxerces (which I also build and it seem to build Ok)
libcpp.so.2
libm.so.2
libc.so.2




“Jeff Baker” <> jbaker@qnx.com> > wrote in message
news:afcfht$ao8$> 1@nntp.qnx.com> …
How about an ‘objdump -x libxalan-c1_3.so | grep NEEDED’?

Jeff,
Here’s the latest: I added the -Bstatic to the link line for
building
libxalan-c1_3 and did a complete rebuild.
It builds and links cleanly, I get the .so like I should, and
always
have,
it was when I tried to link in that library
into another executable that the link errors would occur.
Here’s what I’ve discovered though, when I tried to link in that
just
built
library into a simple program, (like I
posted last time – hello world type with just a cerr and cout) I
get
undefined references in the libxalan-c1_3.so.

The commands and output are as follows:






#QCC -Vgcc_ntox86 -DX86_PC_NTO_QNX -L/opt/x/c/lib -lxalan-c1_3 -L/opt/xe/lib
-lxerces-c1_
6_0 -c testme.cpp

… looks good testme.o was created …






QCC -Vgcc_ntox86 -DX86_PC_NTO_QNX -L/opt/x/c/lib -lxalan-c1_3 -L/opt/xe/lib

-lxerces-c1_
6_0 testme.o -o testme 2> errors

more errors

/opt/x/c/lib/libxalan-c1_3.so: undefined reference to cerr' /opt/x/c/lib/libxalan-c1_3.so: undefined reference to _Mutex::~_Mutex(void)’
/opt/x/c/lib/libxalan-c1_3.so: undefined reference to
_String_base::_Xlen(void) const' /opt/x/c/lib/libxalan-c1_3.so: undefined reference to locale::_Init(void)’
/opt/x/c/lib/libxalan-c1_3.so: undefined reference to
ostrstream::~ostrstream(void)' /opt/x/c/lib/libxalan-c1_3.so: undefined reference to _Locinfo::~_Locinfo(void)’
/opt/x/c/lib/libxalan-c1_3.so: undefined reference to
strstreambuf virtual table' /opt/x/c/lib/libxalan-c1_3.so: undefined reference to locale:> :id:> :_Id_cnt’
/opt/x/c/lib/libxalan-c1_3.so: undefined reference to
_Lockit::_Lockit(int)' /opt/x/c/lib/libxalan-c1_3.so: undefined reference to ctype::id’
/opt/x/c/lib/libxalan-c1_3.so: undefined reference to ios_base type_info node' /opt/x/c/lib/libxalan-c1_3.so: undefined reference to _Mutex::_Unlock(void)’
/opt/x/c/lib/libxalan-c1_3.so: undefined reference to
strstreambuf::_Init(int, char *, ch ar *, int)' /opt/x/c/lib/libxalan-c1_3.so: undefined reference to ios_base::clear(_Iosb::_Iostat
e, bool)’
/opt/x/c/lib/libxalan-c1_3.so: undefined reference to
_Winit::~_Winit(void)' /opt/x/c/lib/libxalan-c1_3.so: undefined reference to ostrstream::basic_ios<char, char_tr
aits > virtual table’

… and more… but I left them off as it’s more repeats of the
above…

I’m not sure if this helps or just confuses things?
Maybe this will give us some clue as to what’s happening?
It’s almost as if the libxalan-c1_3 isn’t really building
correctly,
but
I’m
not sure how to prove that
other than these undefined references.
BTW, the libxalan-c1_3 takes about 25 minutes to build.

Thanks for any more help you can provide… You’ve been very kind
so
far.
$Kevin



“Jeff Baker” <> jbaker@qnx.com> > wrote in message
news:afaec4$mqp$> 1@nntp.qnx.com> …
If you can compile a simple case then the problem must be
somewhere
in
the
compilation of your project. Have you tried a complete
recompile?
You
shouldn’t have to specify any system libraries manually.







QCC -DX86_PC_NTO_QNX -DNDEBUG -L/opt/x/c/lib -L/opt/xe/lib -lxerces-c1_6_0-O
-lxalan-c1_3 -c <input files






QCC -DX86_PC_NTO_QNX -DNDEBUG -L/opt/x/c/lib -L/opt/xe/lib -lxerces-c1_6_0-O
-lxalan-c1_3 -o <output file

That really should be all that’s required.

As an experiment, try adding ‘-Bstatic’ to the link line. Also,
can
you
post the output if you add ‘-Wl,–verbose | grep succeeded’ to
the
end
(the
very end) of the link line?

What’s strange is that I can create a very simple cpp program
and cout, cerr link in just fine.

#include <iostream

using namespace std;

int main()
{
cerr << “ouch!\n”;
cout << “bye!\n”;
return 0;
}



“Kevin Caporaso” <> kcaporaso@pillardata.com> > wrote in message
news:afac30$l73$> 1@nntp.qnx.com> …
Ya, I did that and I got the same linking errors.
Any other ideas?
eekk… I’m VERY new to QNX.

TIA,
$Kevin

“Jeff Baker” <> jbaker@qnx.com> > wrote in message
news:afaak4$jm8$> 1@nntp.qnx.com> …
Sorry, I don’t have a 6.1.0 install for reference here.
Lose
the -Y
option
completely and see what happens.


“Jeff Baker” <> jbaker@qnx.com> > wrote in message
news:afa0qj$bip$> 1@nntp.qnx.com> …
Try this:












QCC -Vgcc_ntox86 -Y_gpp -DX86_PC_NTO_QNX -L/opt/x/c/lib -lxalan-c1_3 -L/opt/
xe/lib -lxerces-c1_6_0-O -DNDEBUG
/opt/x/c/obj/TestXPath.o
/opt/x/c/obj/NodeNameTreeWalker.o -o
/opt/x/c/bin/testXPath

This bombs with:
cc: unknown target ‘gcc_ntox86_gpp’
cc: targets available in /etc/qcc:
gcc_ntox86 (GNU C, default)
make: *** [/opt/x/c/obj/XalanAttr.o] Error 1

I must be missing some definition or .conf file?? Where
do
i
find
the
correct one?
Thanks!


You should also be sure they your .o files have been
properly
compiled
as
well.

QCC -Vgcc_ntox86 -Y_gpp -c .c <.cc, *.cpp,
whatever,
+
all
the
other
libs
and defines you need

You shouldn’t have to specify -lc, or -lstdc++, the
qcc
conf
files
will
handle that.
If you want to use the Dinkum C++ libs instead of the
GNU
C++
libs
change -Y_gpp to -Y_cpp.


Kris,
I am seeing that linking problem with cout, cerr
again,
this
time,
with
QCC –
Here’s the compile line and a few of the linking
errors
follow:
There are others but I figured this was reasonable
sampling.

QCC -DX86_PC_NTO_QNX











-lc -L/opt/x/c/lib -lxalan-c1_3 -L/usr/lib -L/opt/xe/lib -lxerces-c1_6_0
-O
-DNDEBUG /o
pt/x/c/obj/TestXPath.o
/opt/x/c/obj/NodeNameTreeWalker.o -o
/opt/x/c/bin/testXPath


/opt/x/c/obj/TestXPath.o: In function main': /opt/x/c/obj/TestXPath.o(.text+0x5baf): undefined reference to cout’
/opt/x/c/obj/TestXPath.o: In function
__static_initialization_and_destruction_0': /opt/x/c/obj/TestXPath.o(.text+0x5eca): undefined reference to ios_base::Init::Init(void)

/opt/x/c/obj/TestXPath.o(.text+0x5eda): undefined
reference
to
_Winit::_Winit(void)' /opt/x/c/obj/TestXPath.o(.text+0x5eeb): undefined reference to _Winit::~_Winit(void)’
/opt/x/c/obj/TestXPath.o(.text+0x5efd): undefined
reference
to
`ios_base::Init::~Init(void
)’

TIA,
$Kevin




“Kris Warkentin” <> kewarken@qnx.com> > wrote in message
news:af7ci1$911$> 1@nntp.qnx.com> …
How are you compiling? The normal way would be to
use
‘QCC’
(note
the
case)
or ‘qcc -lang-c++’ which should give you the
proper
linkage.

cheers,

Kris

“Kevin Caporaso” <> kcaporaso@pillardata.com> > wrote
in
message
news:af7af7$6vd$> 1@nntp.qnx.com> …

Hello,
I am pulling my hair out on this one…
I am getting undefined references to cerr, cout
and
other
ostream
type
calls.
I assumed they were always in libc and libstdc++
but
I’m
linking
against
those
libraries.

Which library contains cerr, cout under QNX 6.1
?

TIA,
$Kevin



























\