The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Top Forums > High Level Programming
.
google unix.com



High Level Programming Post questions about C, C++, Java, SQL, and other programming languages here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
awk program for file comparison kbirde Shell Programming and Scripting 4 05-01-2009 06:37 AM
Run a program for every file with a given extension Phobos33 UNIX for Dummies Questions & Answers 5 06-01-2007 04:46 AM
AWK Program File Help ryangfm UNIX for Dummies Questions & Answers 10 02-16-2007 08:32 AM
Joining program to one batch file eynkesef Shell Programming and Scripting 2 10-10-2006 09:00 AM
program to rename file name randyzapata Windows & DOS: Issues & Discussions 1 05-10-2005 02:49 PM

Reply
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 06-19-2009
Dedalus Dedalus is offline
Registered User
  
 

Join Date: May 2009
Location: Italy/France
Posts: 60
add a file.c in a program.

Hi

I've written a new function for a program.
I have the new_function.c, new_function.h and the new_function.o and I've added those 3 files in the same directory of the others files.
Then in the file.c (that use the new_function.c), I added:
Code:
#include "new_function.h"
then i try to do:

./configure ........... ok

but the "make" return with:
Code:
926: undefined reference to `function_added'
where "function_added" is defined and implemented in new_function.h and new_function.c.

This is the first time for me, but i read that what i've done should be enough.
Any idea why doesn't work?
Thanks

D.

Last edited by Dedalus; 06-19-2009 at 09:58 AM..
  #2 (permalink)  
Old 06-19-2009
Corona688 Corona688 is offline
Registered User
  
 

Join Date: Aug 2005
Location: Saskatchewan
Posts: 1,937
It is not linking new_function.o in with the rest of the objects. I believe you need to edit Makefile.in, then run ./configure again to make the changes stick.
  #3 (permalink)  
Old 06-19-2009
Dedalus Dedalus is offline
Registered User
  
 

Join Date: May 2009
Location: Italy/France
Posts: 60
Hi
i found the solution.

I've added to Makefile.in and Makefile.source the files i created.

Now it works!!

Thanks

D
Reply

Bookmarks

Tags
configure, functions, make

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 12:20 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0