![]() |
| | #1 | |
| Registered User Join Date: Jun 2009
Posts: 31
| add a file.c in a program. 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" ./configure ........... ok but the "make" return with: Quote:
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. | |
| Dedalus is offline | |
| | #2 |
| and the Hat of Guessing Join Date: Nov 2007
Posts: 8,740
| If you look at your makefile, is new_function.c or new_function.o mentioned anywhere? (How did you set up configure?) |
| tabstop is offline | |
| | #3 |
| Registered User Join Date: Jun 2009
Posts: 31
| You are right, the makefile doesn't contain "new_function.o". I'm not the author of the program, I've written just a function. So I have to add some reference in the configure file? Thanks D. |
| Dedalus is offline | |
| | #4 |
| and the Hat of Guessing Join Date: Nov 2007
Posts: 8,740
| Right. I've never used configure scripts, so I don't know where it would go, but whatever or whoever builds the makefile would need to know what all the files are. (Does the person/people who did write the program know or expect you to write an additional function? If so, they would probably have left same in the configure file.) |
| tabstop is offline | |
| | #5 | |
| Registered User Join Date: Jun 2009
Posts: 31
| Quote:
Thanks for your help, now I know where the problem is. D. | |
| Dedalus is offline | |
| | #6 |
| and the hat of vanishing Join Date: Aug 2001 Location: The edge of the known universe
Posts: 21,214
| IIRC, it's something like makefile.in which is read by configure to produce a customised makefile for your environment. It's the input file(s) to configure which you need to look at changing.
__________________ If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut. Up to 8Mb PlusNet broadband from only £5.99 a month! |
| Salem is offline | |
| | #7 |
| Registered User Join Date: Jun 2009
Posts: 31
| Yes there is a makefile.in, I'm reading it. it is very long file, I'm looking for the configure input files. thanks D. |
| Dedalus is offline | |
| | #8 |
| Registered User Join Date: Jun 2009
Posts: 31
| Hi i found the solution. I've added to Makefile.in and Makefile.source the file i created. Now it works!! Thanks D |
| Dedalus is offline | |
![]() |
| Tags |
| function, new module |
| Thread Tools | |
| Display Modes | |
|
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Issue with program that's calling a function and has a loop | tigerfansince84 | C++ Programming | 9 | 11-12-2008 01:38 PM |
| add your program to start menu ? | Anddos | Windows Programming | 6 | 04-17-2008 04:15 AM |
| Dikumud | maxorator | C++ Programming | 1 | 10-01-2005 06:39 AM |
| insufficient memory for tsr | manmohan | C Programming | 8 | 01-02-2004 09:48 AM |
| My program, anyhelp | @licomb | C Programming | 14 | 08-14-2001 10:04 PM |