Hi,
In a file test1.c, in have the two functions f1 and f2. These are
declared in the header file t1.h. I want to call these functions in
another file subprog.c, which contains the function call_funcs. I have
included the header file t1.h in subprog.c. Using gcc, I can compile
and get subprog.o without any problems.
However, when I try to link subprog.o into the main application, I get
the errors
In function call_funcs undefined reference to f1
In function call_funcs undefined reference to f2
Anybody have any idea what could be causing this.
Many Thanks
Bob 6 27525
<st*****@yahoo.comschrieb im Newsbeitrag
news:11**********************@j4g2000prf.googlegro ups.com...
Hi,
In a file test1.c, in have the two functions f1 and f2. These are
declared in the header file t1.h. I want to call these functions in
another file subprog.c, which contains the function call_funcs. I have
included the header file t1.h in subprog.c. Using gcc, I can compile
and get subprog.o without any problems.
However, when I try to link subprog.o into the main application, I get
the errors
In function call_funcs undefined reference to f1
In function call_funcs undefined reference to f2
Anybody have any idea what could be causing this.
You need to compile test1.c too and link the resulting .o with the
subprog.o.
Bye, Jojo
On Jun 12, 6:13 pm, "Joachim Schmitz" <nospam.j...@schmitz-digital.de>
wrote:
<sten...@yahoo.comschrieb im Newsbeitragnews:11**********************@j4g2000pr f.googlegroups.com...Hi,
In a file test1.c, in have the two functions f1 and f2. These are
declared in the header file t1.h. I want to call these functions in
another file subprog.c, which contains the function call_funcs. I have
included the header file t1.h in subprog.c. Using gcc, I can compile
and get subprog.o without any problems.
However, when I try to link subprog.o into the main application, I get
the errors
In function call_funcs undefined reference to f1
In function call_funcs undefined reference to f2
Anybody have any idea what could be causing this.
You need to compile test1.c too and link the resulting .o with the
subprog.o.
Bye, Jojo
Thanks Jojo...that fixed it...I now get multiple definition
errors...you don't know how to solve that???
<st*****@yahoo.comschrieb im Newsbeitrag
news:11**********************@n15g2000prd.googlegr oups.com...
On Jun 12, 6:13 pm, "Joachim Schmitz" <nospam.j...@schmitz-digital.de>
wrote:
><sten...@yahoo.comschrieb im Newsbeitragnews:11**********************@j4g2000p rf.googlegroups.com...> Hi,
In a file test1.c, in have the two functions f1 and f2. These are
declared in the header file t1.h. I want to call these functions in
another file subprog.c, which contains the function call_funcs. I have
included the header file t1.h in subprog.c. Using gcc, I can compile
and get subprog.o without any problems.
However, when I try to link subprog.o into the main application, I get
the errors
In function call_funcs undefined reference to f1
In function call_funcs undefined reference to f2
Anybody have any idea what could be causing this.
You need to compile test1.c too and link the resulting .o with the subprog.o.
Bye, Jojo
Thanks Jojo...that fixed it...I now get multiple definition
errors...you don't know how to solve that???
Not without seeing the code...
Bye, Jojo st*****@yahoo.com wrote:
>
In a file test1.c, in have the two functions f1 and f2. These are
declared in the header file t1.h. I want to call these functions
in another file subprog.c, which contains the function call_funcs.
I have included the header file t1.h in subprog.c. Using gcc, I
can compile and get subprog.o without any problems.
However, when I try to link subprog.o into the main application,
I get the errors
In function call_funcs undefined reference to f1
In function call_funcs undefined reference to f2
Anybody have any idea what could be causing this.
Failure to link t1.o.
--
<http://www.cs.auckland.ac.nz/~pgut001/pubs/vista_cost.txt>
<http://www.securityfocus.com/columnists/423>
<http://www.aaxnet.com/editor/edit043.html>
<http://kadaitcha.cx/vista/dogsbreakfast/index.html>
cbfalconer at maineline dot net
--
Posted via a free Usenet account from http://www.teranews.com st*****@yahoo.com writes:
On Jun 12, 6:13 pm, "Joachim Schmitz" <nospam.j...@schmitz-digital.de>
wrote:
><sten...@yahoo.comschrieb im Newsbeitragnews:11**********************@j4g2000pr f.googlegroups.com...Hi,
In a file test1.c, in have the two functions f1 and f2. These are
declared in the header file t1.h. I want to call these functions in
another file subprog.c, which contains the function call_funcs. I have
included the header file t1.h in subprog.c. Using gcc, I can compile
and get subprog.o without any problems.
However, when I try to link subprog.o into the main application, I get
the errors
In function call_funcs undefined reference to f1
In function call_funcs undefined reference to f2
Anybody have any idea what could be causing this.
You need to compile test1.c too and link the resulting .o with the subprog.o.
Thanks Jojo...that fixed it...I now get multiple definition
errors...you don't know how to solve that???
A wild guess: t1.h defines (rather than declares) one or more global
variables. I.e. you have "int x;" rather than "extern int x;" in
t1.h. If this is the problem, you need to use the extern form in the
..h file and ensure that only one (you get to chose) compilation unit
contains the actual definition.
--
Ben.
On Jun 12, 8:55 pm, "Joachim Schmitz" <nospam.j...@schmitz-digital.de>
wrote:
<sten...@yahoo.comschrieb im Newsbeitragnews:11**********************@n15g2000p rd.googlegroups.com...
On Jun 12, 6:13 pm, "Joachim Schmitz" <nospam.j...@schmitz-digital.de>
wrote:
<sten...@yahoo.comschrieb im
Newsbeitragnews:11**********************@j4g2000pr f.googlegroups.com...>
Hi,
In a file test1.c, in have the two functions f1 and f2. These are
declared in the header file t1.h. I want to call these functions in
another file subprog.c, which contains the function call_funcs. I have
included the header file t1.h in subprog.c. Using gcc, I can compile
and get subprog.o without any problems.
However, when I try to link subprog.o into the main application, I get
the errors
In function call_funcs undefined reference to f1
In function call_funcs undefined reference to f2
Anybody have any idea what could be causing this.
You need to compile test1.c too and link the resulting .o with the
subprog.o.
Bye, Jojo
Thanks Jojo...that fixed it...I now get multiple definition
errors...you don't know how to solve that???
Not without seeing the code...
Bye, Jojo- Hide quoted text -
- Show quoted text -
Hi All,
Got it sorted...had to rename a few functions and that cleared
everything up.
Many Thanks to all that replied
Bob This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: RU |
last post by:
Hi,
I am working on a porting project to port C/C++ application from
unixware C++, AT&T Standard components to g++ with STL on Linux. This
application has been working properly on...
|
by: Ryan Liu |
last post by:
All,
Now I have meet a strange problems.
When all the files have been compiled and when linking, make always
recompiles some files. I don't know why. Would you mind giving some
suggestion?
The...
|
by: Kevin Burton |
last post by:
I am trying to use managed C++ but I am getting the
following link errors:
Metadata
file 'D:\Projects\Visa\AddressVerification\AddressVerificat...
|
by: lars.uffmann |
last post by:
Hi - since my Suse 10.1 didn't have netcdf support enabled by default,
I downloaded the sources from
http://www.unidata.ucar.edu/software/netcdf/ then did
../configure --prefix=/usr
make
make...
|
by: 7stud |
last post by:
test1.py:
--------------------
import shelve
s = shelve.open("/Users/me/2testing/dir1/aaa.txt")
s = "red"
s.close()
--------output:------
$ python test1.py
|
by: hivdb2 |
last post by:
Hi all, I have an app developed in Access 2000/2003 (2000
compatible). I have a routine to refresh table links. Both files are
MDB files (the front end and back end). The code I use is as...
|
by: Greg (codepug |
last post by:
If one converts that .mdb into an .mde the code is secure but the
tables can still be imported.
Just for Very Basic protection, I have placed a Password on the
database using the "Set Database...
|
by: coolsti |
last post by:
I have the task to set up an application at work,using MS Access as a front end to a MySQL database. This will be done using an appropriate ODBC driver, and linking the MySQL database to Access.
...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
by: emmanuelkatto |
last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud.
Please let me know.
Thanks!
Emmanuel
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
by: Sonnysonu |
last post by:
This is the data of csv file
1 2 3
1 2 3
1 2 3
1 2 3
2 3
2 3
3
the lengths should be different i have to store the data by column-wise with in the specific length.
suppose the i have to...
|
by: Hystou |
last post by:
There are some requirements for setting up RAID:
1. The motherboard and BIOS support RAID configuration.
2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers,...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
| |