LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 05-30-2004, 11:23 PM   #1
sheenak
LQ Newbie
 
Registered: Apr 2004
Posts: 23

Rep: Reputation: 15
Linking error


Hi,

I am using Kdeveloper to port C++ code from windows to linux platform. all my c++ source file and headers files are kept in different folders.
All the files are compiling successfully. but i am geeting linking error on executing my project as follows:

gmake all-recursive
gmake[1]: Entering directory `/home/sheena/router'
Making all in router
gmake[2]: Entering directory `/home/sheena/router/router'
Making all in Include
gmake[3]: Entering directory `/home/sheena/router/router/Include'
Making all in DeviceModeling
gmake[4]: Entering directory `/home/sheena/router/router/Include/DeviceModeling'
gmake[4]: Nothing to be done for `all'.
gmake[4]: Leaving directory `/home/sheena/router/router/Include/DeviceModeling'
Making all in InputNetlistGenerator
gmake[4]: Entering directory `/home/sheena/router/router/Include/InputNetlistGenerator'
gmake[4]: Nothing to be done for `all'.
gmake[4]: Leaving directory `/home/sheena/router/router/Include/InputNetlistGenerator'
Making all in RFC
gmake[4]: Entering directory `/home/sheena/router/router/Include/RFC'
gmake[4]: Nothing to be done for `all'.
gmake[4]: Leaving directory `/home/sheena/router/router/Include/RFC'
gmake[4]: Entering directory `/home/sheena/router/router/Include'
gmake[4]: Nothing to be done for `all-am'.
gmake[4]: Leaving directory `/home/sheena/router/router/Include'
gmake[3]: Leaving directory `/home/sheena/router/router/Include'
Making all in Src
gmake[3]: Entering directory `/home/sheena/router/router/Src'
Making all in DeviceModeling
gmake[4]: Entering directory `/home/sheena/router/router/Src/DeviceModeling'
gmake[4]: Nothing to be done for `all'.
gmake[4]: Leaving directory `/home/sheena/router/router/Src/DeviceModeling'
Making all in InputNetlistGenerator
gmake[4]: Entering directory `/home/sheena/router/router/Src/InputNetlistGenerator'
gmake[4]: Nothing to be done for `all'.
gmake[4]: Leaving directory `/home/sheena/router/router/Src/InputNetlistGenerator'
gmake[4]: Nothing to be done for `all'.
gmake[4]: Leaving directory `/home/sheena/router/router/Src/Stub'
Making all in RFC
gmake[4]: Entering directory `/home/sheena/router/router/Src/RFC'
rm -f libRFC.a
ar cru libRFC.a RFC_CRoutingFlowController.o
ranlib libRFC.a
gmake[4]: Leaving directory `/home/sheena/router/router/Src/RFC'
gmake[4]: Entering directory `/home/sheena/router/router/Src'
gmake[4]: Nothing to be done for `all-am'.
gmake[4]: Leaving directory `/home/sheena/router/router/Src'
gmake[3]: Leaving directory `/home/sheena/router/router/Src'
gmake[3]: Entering directory `/home/sheena/router/router'
/bin/sh ../libtool --silent --mode=link gcc -ansi -W -Wall -pedantic -Wshadow -Wpointer-arith -Wmissing-prototypes -Wwrite-strings -D_XOPEN_SOURCE=500 -D_BSD_SOURCE -O2 -o router ./Src/DeviceModeling/libDeviceModeling.a ./Src/InputNetlistGenerator/libInputNetlistGenerator.a ./Src/Opex/libOpex.a ./Src/RoutingOptions/libRoutingOptions.a ./Src/RoutingSolution/libRoutingSolution.a ./Src/RoutingStatisticGenerator/libRoutingStatisticGenerator.a ./Src/Stub/libStub.a ./Src/RFC/libRFC.a
./Src/RFC/libRFC.a(RFC_CRoutingFlowController.o): In function `main':
/home/sheena/router/router/Src/RFC/RFC_CRoutingFlowController.cpp:116: undefined reference to `RING_PinNetlistin'
/home/sheena/router/router/Src/RFC/RFC_CRoutingFlowController.cpp:121: undefined reference to `std::basic_string<char, std::char_traits<char>, std::allocator<char> >::c_str() const'
/home/sheena/router/router/Src/RFC/RFC_CRoutingFlowController.cpp:121: undefined reference to `RING_PinNetlistin'
/home/sheena/router/router/Src/RFC/RFC_CRoutingFlowController.cpp:121: undefined reference to `RING_PinNetlistin'
/home/sheena/router/router/Src/RFC/RFC_CRoutingFlowController.cpp:123: undefined reference to `std::cout'
/home/sheena/router/router/Src/RFC/RFC_CRoutingFlowController.cpp:123: undefined reference to `std::basic_ostream<char, std::char_traits<char> >& std:perator<< <std::char_traits<char> >(std::basic_ostream<char, std::char_traits<char> >&, char const*)'
/home/sheena/router/router/Src/RFC/RFC_CRoutingFlowController.cpp:124: undefined reference to `std::basic_ostream<char, std::char_traits<char> >& std::endl<char, std::char_traits<char> >(std::basic_ostream<char, std::char_traits<char> >&)'
/home/sheena/router/router/Src/RFC/RFC_CRoutingFlowController.cpp:124: undefined reference to `std::basic_ostream<char, std::char_traits<char> >& std::endl<char, std::char_traits<char> >(std::basic_ostream<char, std::char_traits<char> >&)'
/home/sheena/router/router/Src/RFC/RFC_CRoutingFlowController.cpp:124: undefined reference to `std::cout'
/home/sheena/router/router/Src/RFC/RFC_CRoutingFlowController.cpp:124: undefined reference to `std::basic_ostream<char, std::char_traits<char> >:perator<<(std::basic_ostream<char, std::char_traits<char> >& (*)(std::basic_ostream<char, std::char_traits<char> >&))' ....etc.
------------------------------------------------------------------------------------------------

The same project is ported successfully when i didn't created directory structure.

Now want ur help in executing project arranged in a directory structure.
If anyone have solution, help me out.

Regards,
Sheena
 
Old 05-30-2004, 11:28 PM   #2
ashwinipahuja
Member
 
Registered: Mar 2004
Posts: 79

Rep: Reputation: 15
Yes I have a solution


Remove the directory structure...........
 
Old 05-31-2004, 07:04 AM   #3
sheenak
LQ Newbie
 
Registered: Apr 2004
Posts: 23

Original Poster
Rep: Reputation: 15
I want to know how to remove this linking error when files in project are arranged in some directory structure.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Linking Error sheenak Programming 1 07-11-2004 11:52 PM
error while linking... trouby Linux - Software 0 10-15-2003 05:18 PM
Linking error using g++ Musikolo Linux - Software 0 07-23-2003 12:54 PM
libpcap linking error Hammo Linux - Networking 5 02-20-2003 07:20 AM
gcc linking error. ugenn Linux - Software 0 01-22-2003 11:18 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 01:06 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration