Project Home
Project Home
Trackers
Trackers
Documents
Documents
Wiki
Wiki
Discussion Forums
Discussions
Project Information
Project Info
Forum Topic - compilation error in QNX: (6 Items)
   
compilation error in QNX  
I'm running QNX 6.3.2 in VMWare, and building C++ libraries built using Unix scripts.

But when I try to build my QNX C++ project with this library, libbdb_cxx-4.7.a, I get the below compilation errors.  

Any ideas on how to resolve this? I've tried adding #include <stdio.h>, using std::cout in the source files but no luck.


Thanks for any help you can provide.

===================================== 
 

D:/QNX632/ide4-workspace/MyRecord/lib/libdb_cxx-4.7.a(cxx_db.o): In function `_verify_callback_c':

cxx_db.o(.text+0x14d2): undefined reference to `ostream::operator<<(char const *)'

D:/QNX632/ide4-workspace/MyRecord/lib/libdb_cxx-4.7.a(cxx_env.o): In function `DbEnv::_stream_error_function(__db_env 
const *, char const *, char const *)':

cxx_env.o(.text+0x1cc2): undefined reference to `ostream::operator<<(char const *)'

cxx_env.o(.text+0x1cd2): undefined reference to `ostream::operator<<(char const *)'

cxx_env.o(.text+0x1ce5): undefined reference to `ostream::operator<<(char const *)'

cxx_env.o(.text+0x1cf8): undefined reference to `ostream::operator<<(char const *)'

D:/QNX632/ide4-workspace/MyRecord/lib/libdb_cxx-4.7.a(cxx_env.o)(.text+0x1d56): more undefined references to `ostream::
operator<<(char const *)' follow

cc: D:/QNX632/host/win32/x86/usr/bin/ntox86-ld caught signal 1

make[2]: *** [D:/QNX632/ide4-workspace/MyRecord/x86/o/MyRecord] Error 1

make[2]: Target `all' not remade because of errors.

make[2]: Leaving directory `D:/QNX632/ide4-workspace/MyRecord/x86/o'

make[1]: [all] Error 2 (ignored)

make[1]: Leaving directory `D:/QNX632/ide4-workspace/MyRecord/x86'


Any ideas on why I'm getting these errors in the cxx_db.cpp and also the cx_env.cpp (and other) files?
Re: compilation error in QNX  
In you linker line do you have -lang-c++ option?


Steven Thompson wrote:
> I'm running QNX 6.3.2 in VMWare, and building C++ libraries built using
Unix scripts.
>
> But when I try to build my QNX C++ project with this library,
libbdb_cxx-4.7.a, I get the below compilation errors.  
>
> Any ideas on how to resolve this? I've tried adding #include <stdio.h>,
using std::cout in the source files but no luck.
>
> Thanks for any help you can provide.
>
> ===================================== 
>  
>
> D:/QNX632/ide4-workspace/MyRecord/lib/libdb_cxx-4.7.a(cxx_db.o): In
function `_verify_callback_c':
>
> cxx_db.o(.text+0x14d2): undefined reference to `ostream::operator<<(char
const *)'
>
> D:/QNX632/ide4-workspace/MyRecord/lib/libdb_cxx-4.7.a(cxx_env.o): In
function `DbEnv::_stream_error_function(__db_env const *, char const *, char
const *)':
>
> cxx_env.o(.text+0x1cc2): undefined reference to `ostream::operator<<(char
const *)'
>
> cxx_env.o(.text+0x1cd2): undefined reference to `ostream::operator<<(char
const *)'
>
> cxx_env.o(.text+0x1ce5): undefined reference to `ostream::operator<<(char
const *)'
>
> cxx_env.o(.text+0x1cf8): undefined reference to `ostream::operator<<(char
const *)'
>
>
D:/QNX632/ide4-workspace/MyRecord/lib/libdb_cxx-4.7.a(cxx_env.o)(.text+0x1d5
6): more undefined references to `ostream::operator<<(char const *)' follow
>
> cc: D:/QNX632/host/win32/x86/usr/bin/ntox86-ld caught signal 1
>
> make[2]: *** [D:/QNX632/ide4-workspace/MyRecord/x86/o/MyRecord] Error 1
>
> make[2]: Target `all' not remade because of errors.
>
> make[2]: Leaving directory `D:/QNX632/ide4-workspace/MyRecord/x86/o'
>
> make[1]: [all] Error 2 (ignored)
>
> make[1]: Leaving directory `D:/QNX632/ide4-workspace/MyRecord/x86'
>
>
> Any ideas on why I'm getting these errors in the cxx_db.cpp and also the
cx_env.cpp (and other) files?
>
> _______________________________________________
> QNX Momentics Getting Started
> http://community.qnx.com/sf/go/post8615
>
>   
Re: compilation error in QNX  
Yes I have that option in the linker.
Re: compilation error in QNX  
I just commented out the few lines of code containing "<<" and am now able to build my library and can run my C++ 
application on QNX Neutrino RTOS now.

thanks.
Re: compilation error in QNX  
What is your compile/link line like?

What sort of stream operators were not linking?

Steven Thompson wrote:
> I just commented out the few lines of code containing "<<" and am now able
to build my library and can run my C++ application on QNX Neutrino RTOS now.
> 
> thanks.
> 
> _______________________________________________
> QNX Momentics Getting Started
> http://community.qnx.com/sf/go/post8624
> 

-- 
cburgess@qnx.com
Re: compilation error in QNX  
I just tried the -lang-c++ addition to the linker line and it fixed my problem.
Thanks!