linking .o files in Kdevelop

Danny Nedelko dan at genuinemedia.com
Wed May 31 05:37:13 BST 2000


Robert,

thank you for your help! You have the other prgrammers in the office laughing
currently, since the stupid mistake I was making was adding my object file to
the project root directory.

A nasty thing called 'make clean' was killing the object file before it had a
chance to link it.

=)

Anyhow thanks again for your help.

Dan Nedelko
Research Programmer
Wilfrid Laurier University
dan at genuinemedia.com

Robert Wheat wrote:

> On Tue, 30 May 2000, Dan Nedelko wrote:
>
> > Here's for hoping  that someone might be able to help me out.
> > I have a project...which compiles just fine.
> > have an object file
> > I need to link the object to the main project on execution
> > Should I:
>
> > b) edit some option from within KDevelop to add the linking of the
> > object file. Again, some clarification would be helpful.
>
> Dan,
>
> If I understand your question, "b)" would be the most logical method.
>
> Using the menu option 'Project' -> 'Options' click the 'Linker Options'
> tab.  In the Additional Libraries Line Edit window type the name of the
> *.o file you want to be linked with your project.
>
> For example, I have a function that tesselates a complex polygon, but
> because I was having other problems I couldn't solve, I had to compile
> this function as 'C' source code separate from my project.  In my project
> directory, that is the source code directory, I have created a directory
> called 'extern'.  In this directory I have the source code for my
> triangulation function, and at the command prompt I compile this source
> code to an object code file as such: "gcc -c tess1c.c -o tess1c.o".
>
> So.....from KDevelop and my project, using the 'Project' -> 'Options'
> menu item, and clicking on the 'Linker Options' tab, in the 'Additional
> Libraries' line I add 'extern/tess1c.o', and all is well.  Of course, in one
> of the header files for my project I have to declare this function as an
> 'extern' 'C' function, etc.
>
> Hope this helps.....
>
> Bob Wheat
> belran at worldnet.att.net





More information about the KDevelop mailing list