Project Home
Project Home
Trackers
Trackers
Documents
Documents
Wiki
Wiki
Discussion Forums
Discussions
Project Information
Project Info
Forum Topic - Linker Properties weirdness then Undefined references: (12 Items)
   
Linker Properties weirdness then Undefined references  
Hi,

I'm using IDE version:
Version: 4.5.0
Build id: I20080717

Out of the blue, the linker started ignoring the library paths placed in the Linker Properties.  I noticed that the "All
 Options" box under QCC Linker had become empty.  The only way to get it to show the command line for the linker was to 
click "Restore Defaults" and re-enter all the project setup data for all the tools (Compiler, Assembler and Linker).

Right before this happened, it was building just fine.  When the Linker's All Option box emptied itself and after I 
restored the settings, I began to get the following undefined references when I started to link.  It seems like it is 
missing a runtime library or path to a library?  I'm not sure because there isn't a diagnostic message indicating 
anything amiss.

Below is the output from the build console (partial, hopefully it gives a good idea of what is going on.

Thanks,
Kevin

*** Rebuild of configuration Debug for project server_ut ****

**** Internal Builder is used for build               ****
qcc -V3.3.5,gcc_ntox86_cpp -w1 -IC:\ARI\ARICommon\tns\Reflection -IC:\ARI\ARICommon\include -IC:\ARI\ARICommon\tns\
Server -IC:\ARI\ARICommon\utils -IC:\ARI\ARICommon\tns\QnxResmgr -c -g -osrc\server_ut.o ..\src\server_ut.cpp
qcc -V3.3.5,gcc_ntox86_cpp -w1 -IC:\ARI\ARICommon\tns\Reflection -IC:\ARI\ARICommon\include -IC:\ARI\ARICommon\tns\
Server -IC:\ARI\ARICommon\utils -IC:\ARI\ARICommon\tns\QnxResmgr -c -g -osrc\MyClass.o ..\src\MyClass.cpp
qcc -o server_ut src\server_ut.o src\MyClass.o -ltnsResmgr -ltnsReflection -ltnsServer -lutils -V3.3.5,gcc_ntox86_cpp -
w1 -LC:\ARI\ARICommon\tns\Server\Debug -LC:\ARI\ARICommon\tns\Reflection\Debug -LC:\ARI\ARICommon\tns\QnxResmgr\ntox86-
gcc-3.3.5-debug -LC:\ARI\ARICommon\utils\ntox86-gcc-3.3.5-debug
src\server_ut.o: In function `__static_initialization_and_destruction_0(int, int)':
C:/QNX632/target/qnx6/usr/include/cpp/xlocnum:1109: undefined reference to `std::ios_base::Init::Init()'
C:/QNX632/target/qnx6/usr/include/cpp/xlocnum:1113: undefined reference to `std::_Winit::_Winit()'
C:/QNX632/target/qnx6/usr/include/cpp/xlocnum:1169: undefined reference to `std::_Winit::~_Winit()'
C:/QNX632/target/qnx6/usr/include/cpp/xlocnum:1169: undefined reference to `std::ios_base::Init::~Init()'
src\server_ut.o: In function `TNSTypeDefT<void>::~TNSTypeDefT()':
C:/QNX632/target/qnx6/usr/include/cpp/xlocale:899: undefined reference to `operator delete(void*)'
src\server_ut.o: In function `TNSTypeDefT<MyClass>::~TNSTypeDefT()':
C:/QNX632/target/qnx6/usr/include/cpp/xlocale:899: undefined reference to `operator delete(void*)'
src\server_ut.o: In function `TNSTypeDefT<MyClass (*)()>::~TNSTypeDefT()':
C:/QNX632/target/qnx6/usr/include/cpp/xlocale:899: undefined reference to `operator delete(void*)'
src\server_ut.o: In function `TNSTypeDefT<MyClass (*)(int)>::~TNSTypeDefT()':
C:/QNX632/target/qnx6/usr/include/cpp/xlocale:899: undefined reference to `operator delete(void*)'
src\server_ut.o: In function `TNSTypeDefT<int (MyClass::*)(int, int)>::~TNSTypeDefT()':
C:/QNX632/target/qnx6/usr/include/cpp/xlocale:899: undefined reference to `operator delete(void*)'
src\server_ut.o: In function `TNSExportedClassGateway<MyClass, TNSQnxResmgrCommLayer, TNSQNX_SRR_Marshaller>::
TNSExportedClassGateway()':
C:/ARI/ARICommon/utils/Mutex.h:65: undefined reference to `std::cerr'
src\server_ut.o: In function `TNSQnxResmgrCommLayer* TNSServer::RegisterCommLayer<TNSQnxResmgrCommLayer, 
TNSQNX_SRR_Marshaller>()':
C:/QNX632/target/qnx6/usr/include/cpp/xstring:615: undefined reference to `__dynamic_cast'
src\server_ut.o: In function `TNSQnxResmgrCommLayer* TNSServer::RegisterCommLayer<TNSQnxResmgrCommLayer, 
TNSQNX_SRR_Marshaller>()':
C:/QNX632/target/qnx6/usr/include/cpp/xlocnum:1109: undefined reference to `operator new(unsigned)'
C:/QNX632/target/qnx6/usr/include/cpp/xlocnum:1113: undefined reference to `operator...
View Full Message
RE: Linker Properties weirdness then Undefined references  
Try to add -lang-c++ 

-----Original Message-----
From: Kevin Stallard [mailto:community-noreply@qnx.com] 
Sent: September 22, 2008 8:54 PM
To: general-ide
Subject: Linker Properties weirdness then Undefined references

Hi,

I'm using IDE version:
Version: 4.5.0
Build id: I20080717

Out of the blue, the linker started ignoring the library paths placed in
the Linker Properties.  I noticed that the "All Options" box under QCC
Linker had become empty.  The only way to get it to show the command
line for the linker was to click "Restore Defaults" and re-enter all the
project setup data for all the tools (Compiler, Assembler and Linker).

Right before this happened, it was building just fine.  When the
Linker's All Option box emptied itself and after I restored the
settings, I began to get the following undefined references when I
started to link.  It seems like it is missing a runtime library or path
to a library?  I'm not sure because there isn't a diagnostic message
indicating anything amiss.

Below is the output from the build console (partial, hopefully it gives
a good idea of what is going on.

Thanks,
Kevin

*** Rebuild of configuration Debug for project server_ut ****

**** Internal Builder is used for build               ****
qcc -V3.3.5,gcc_ntox86_cpp -w1 -IC:\ARI\ARICommon\tns\Reflection
-IC:\ARI\ARICommon\include -IC:\ARI\ARICommon\tns\Server
-IC:\ARI\ARICommon\utils -IC:\ARI\ARICommon\tns\QnxResmgr -c -g
-osrc\server_ut.o ..\src\server_ut.cpp qcc -V3.3.5,gcc_ntox86_cpp -w1
-IC:\ARI\ARICommon\tns\Reflection -IC:\ARI\ARICommon\include
-IC:\ARI\ARICommon\tns\Server -IC:\ARI\ARICommon\utils
-IC:\ARI\ARICommon\tns\QnxResmgr -c -g -osrc\MyClass.o
..\src\MyClass.cpp qcc -o server_ut src\server_ut.o src\MyClass.o
-ltnsResmgr -ltnsReflection -ltnsServer -lutils -V3.3.5,gcc_ntox86_cpp
-w1 -LC:\ARI\ARICommon\tns\Server\Debug
-LC:\ARI\ARICommon\tns\Reflection\Debug
-LC:\ARI\ARICommon\tns\QnxResmgr\ntox86-gcc-3.3.5-debug
-LC:\ARI\ARICommon\utils\ntox86-gcc-3.3.5-debug
src\server_ut.o: In function
`__static_initialization_and_destruction_0(int, int)':
C:/QNX632/target/qnx6/usr/include/cpp/xlocnum:1109: undefined reference
to `std::ios_base::Init::Init()'
C:/QNX632/target/qnx6/usr/include/cpp/xlocnum:1113: undefined reference
to `std::_Winit::_Winit()'
C:/QNX632/target/qnx6/usr/include/cpp/xlocnum:1169: undefined reference
to `std::_Winit::~_Winit()'
C:/QNX632/target/qnx6/usr/include/cpp/xlocnum:1169: undefined reference
to `std::ios_base::Init::~Init()'
src\server_ut.o: In function `TNSTypeDefT<void>::~TNSTypeDefT()':
C:/QNX632/target/qnx6/usr/include/cpp/xlocale:899: undefined reference
to `operator delete(void*)'
src\server_ut.o: In function `TNSTypeDefT<MyClass>::~TNSTypeDefT()':
C:/QNX632/target/qnx6/usr/include/cpp/xlocale:899: undefined reference
to `operator delete(void*)'
src\server_ut.o: In function `TNSTypeDefT<MyClass
(*)()>::~TNSTypeDefT()':
C:/QNX632/target/qnx6/usr/include/cpp/xlocale:899: undefined reference
to `operator delete(void*)'
src\server_ut.o: In function `TNSTypeDefT<MyClass
(*)(int)>::~TNSTypeDefT()':
C:/QNX632/target/qnx6/usr/include/cpp/xlocale:899: undefined reference
to `operator delete(void*)'
src\server_ut.o: In function `TNSTypeDefT<int (MyClass::*)(int,
int)>::~TNSTypeDefT()':
C:/QNX632/target/qnx6/usr/include/cpp/xlocale:899: undefined reference
to `operator delete(void*)'
src\server_ut.o: In function `TNSExportedClassGateway<MyClass,
TNSQnxResmgrCommLayer,
TNSQNX_SRR_Marshaller>::TNSExportedClassGateway()':
C:/ARI/ARICommon/utils/Mutex.h:65: undefined reference to `std::cerr'
src\server_ut.o: In function `TNSQnxResmgrCommLayer*
TNSServer::RegisterCommLayer<TNSQnxResmgrCommLayer,
TNSQNX_SRR_Marshaller>()':
C:/QNX632/target/qnx6/usr/include/cpp/xstring:615: undefined reference
to `__dynamic_cast'
src\server_ut.o: In function...
View Full Message
Re: RE: Linker Properties weirdness then Undefined references  
> Try to add -lang-c++ 
> 

Thanks, yes, I see that it is missing from the QCC Linker All options box, however, using the IDE, I can't seem to 
figure out how to add it back.  I've reviewed other projects where the option is present, but can't seem to figure out 
how to get it to show up....

Thanks
Kevin
Re: RE: Linker Properties weirdness then Undefined references  
As a point of reference, below are the currently contents of my QCC Linker All options box.  

-V3.3.5,gcc_ntox86_cpp -w1 -L"C:\ARI\ARICommon\tns\Server\Debug" -L"C:\ARI\ARICommon\tns\Reflection\Debug" -L"C:\ARI\
ARICommon\tns\QnxResmgr\ntox86-gcc-3.3.5-debug" -L"C:\ARI\ARICommon\utils\ntox86-gcc-3.3.5-debug"

As it is read-only, I can't make changes to it directly....

Thanks
Kevin


> > Try to add -lang-c++ 
> > 
> 
> Thanks, yes, I see that it is missing from the QCC Linker All options box, 
> however, using the IDE, I can't seem to figure out how to add it back.  I've 
> reviewed other projects where the option is present, but can't seem to figure 
> out how to get it to show up....
> 
> Thanks
> Kevin


RE: RE: Linker Properties weirdness then Undefined references  
Is it qnx project? You can just add in Other option in Linker tab
I think something happened with your setting and it does not think it is
C++ anymore 

-----Original Message-----
From: Kevin Stallard [mailto:community-noreply@qnx.com] 
Sent: September 23, 2008 8:48 AM
To: general-ide
Subject: Re: RE: Linker Properties weirdness then Undefined references

> Try to add -lang-c++
> 

Thanks, yes, I see that it is missing from the QCC Linker All options
box, however, using the IDE, I can't seem to figure out how to add it
back.  I've reviewed other projects where the option is present, but
can't seem to figure out how to get it to show up....

Thanks
Kevin

_______________________________________________
General
http://community.qnx.com/sf/go/post13830
RE: Linker Properties weirdness then Undefined references  
> Is it qnx project? You can just add in Other option in Linker tab
> I think something happened with your setting and it does not think it is
> C++ anymore 
> 

Thanks Elena,

It's a managed make project (building for qnx).  Unfortunately, I don't have a linker tab, it's a tree, and there is no 
'Other' option that I can see.  I've included a picture below.

It's under C/C++ Build->Settings.  Then on the 'Tool Settings' tab I have QCC Linker selected.

Kevin
Attachment: Image ManagedMake.PNG 49.85 KB
Re: RE: Linker Properties weirdness then Undefined references  
I recreated the project, and the -lang-c++ re-appeared.  

While I haven't had this particular problem before, this version of the IDE has lost the linker settings in the past 
(contents of the All options text box disappear).  Anyway, this is offered as a potential problem report...

Thanks for your help Elena,
Kevin
RE: RE: Linker Properties weirdness then Undefined references  
Can you check your .log file (in workspace/.metadata/.log to see what
exceptions are there - that can help us to see what happened. 

-----Original Message-----
From: Kevin Stallard [mailto:community-noreply@qnx.com] 
Sent: September 23, 2008 9:20 AM
To: general-ide
Subject: Re: RE: Linker Properties weirdness then Undefined references

I recreated the project, and the -lang-c++ re-appeared.  

While I haven't had this particular problem before, this version of the
IDE has lost the linker settings in the past (contents of the All
options text box disappear).  Anyway, this is offered as a potential
problem report...

Thanks for your help Elena,
Kevin

_______________________________________________
General
http://community.qnx.com/sf/go/post13844
Re: RE: RE: Linker Properties weirdness then Undefined references  
> Can you check your .log file (in workspace/.metadata/.log to see what
> exceptions are there - that can help us to see what happened. 
> 

Attached...
Kevin

Re: RE: RE: Linker Properties weirdness then Undefined references  
> Can you check your .log file (in workspace/.metadata/.log to see what
> exceptions are there - that can help us to see what happened. 

Having trouble attaching the log file...I've tried a number of things...here is the error information from Foundry27

Project: IDE     
A Foundry27 system error has occurred. An unexpected system error has occurred
If you feel you have received this message in error, please contact the Foundry27 administrator and reference this 
tracking number: exid20A801DC011C90F5D9DFBA9B

Re: RE: RE: Linker Properties weirdness then Undefined references  
> Can you check your .log file (in workspace/.metadata/.log to see what
> exceptions are there - that can help us to see what happened. 

Okay....lets see if this works.  I'm using IE instead of Google's Chrome...

Here (hopefully) the log file.

Kevin
Attachment: Text .log 67.84 KB
Re: RE: RE: Linker Properties weirdness then Undefined references  
> > Can you check your .log file (in workspace/.metadata/.log to see what
> > exceptions are there - that can help us to see what happened. 
> 
> Okay....lets see if this works.  I'm using IE instead of Google's Chrome...
> 
> Here (hopefully) the log file.
> 
> Kevin


There is a backup log file there...here it is....
Attachment: Text .bak_0.log 1.01 MB