LinuxQuestions.org
Visit Jeremy's Blog.
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 04-27-2004, 11:28 AM   #1
CrimsonBane
LQ Newbie
 
Registered: Apr 2004
Posts: 1

Rep: Reputation: 0
KDevelop 3.0 Adding external object file


Hi,

I have used flex and bison to generate a parser. When I compile it I get two object files lex.yy.o and y.tab.o. I would like to link the two object files in another program I am writting with KDevelop. But I can't for the life of me figure out how to do it.

Any help is greatly appreciated,
CrimsonBane
 
Old 12-08-2004, 07:38 AM   #2
davewatts
LQ Newbie
 
Registered: Dec 2004
Location: uk
Posts: 3

Rep: Reputation: 0
Any Joy?

I really would like to know the answer to this question as well, as i have to link against some C code from my C++ project. I was adding the files to the end of the text box in "project-options->configure-options->c++->compiler-flags" edit box but the object file was not being recognised. If i try to add the object files to the automake managekdevelop complains that it doenst know how to build the source. I suppose i could being a lib file (.a) and use the -L and -I flags to tell the compiler about it. but this is not really the way I want to do it.

Cheers

Dave
 
Old 12-08-2004, 08:45 AM   #3
davewatts
LQ Newbie
 
Registered: Dec 2004
Location: uk
Posts: 3

Rep: Reputation: 0
suggestion

This is my guess, try putting the object files in the start of the configure-options->cppflags edit box. The compiler messages indicates where the files will be in terms of the g++ comand line.
 
Old 12-08-2004, 11:02 AM   #4
davewatts
LQ Newbie
 
Registered: Dec 2004
Location: uk
Posts: 3

Rep: Reputation: 0
done it!

only way it seems to do it is add it to go into the automake manager click on the target icon and select tools,other and then add the object files to the "other" edit box. however these files are looked for in the project/debug/src ddirectory and get deleted when the a clean project is performed. However they do appear in the right place in the g++ command line in the output window and do compile ok. There is probably a better way to do this, please tell!

Dave
 
  


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
libtermcap.so.2: cannot open shared object file: No such file or directory tcma Linux - Software 11 02-24-2012 03:00 AM
Object file problem in C Josh328 Programming 2 10-31-2004 12:57 PM
libawt.so: libXp.so.6: cannot open shared object file: No such file or directory man26 *BSD 0 09-10-2004 08:34 AM
about running c++ object file glee4ever Programming 2 03-02-2004 10:26 PM
Event driven object-to-object: C++ template class mecanism ( NOT STL or STDC++) bretzeltux Programming 2 12-23-2003 02:45 PM

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

All times are GMT -5. The time now is 07:17 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