473,465 Members | 1,816 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Problems with function/header file, Undefined symbol

Hi,
I've been working on some software to control an older GPIB
card for the past couple of weeks. I have function prototypes in a
header file pc-mate2.h and the functions are defined in pc-mate2.c. I
am using the Borland Turbo C 2.01 compiler (it is the compiler that
the person I am writing this for uses) and when I compile the program
I am writing I get an error:

Turbo Link Version 2.0 Copyright (c) 1987, 1988 Borland
International
Undefined symbol '_readByte' in module enter2.c

a very similar error occurs if I try to compile with gcc. These
errors are strange as last year when they were first written these
problems did not occur.

I've made sure the header file is in my include directory, and that
the proper #include statements in pc-mate2.c where readByte is
defined, as well as the program I am writing that utilizes (at this
time I have other functions that are in pc-mate2.c commented out as
they cause the same error). I was wondering if anyone might have an
idea why this is happening.

Thanks for any help,
Travis
m0***@unb.ca
Nov 13 '05 #1
1 11962

"Travis Stewart" <m0***@unb.ca> wrote in message

Turbo Link Version 2.0 Copyright (c) 1987, 1988 Borland
International
Undefined symbol '_readByte' in module enter2.c

The linker, not the compiler, is producing this error. What it means is that
it can't find the function body for _readByte(). If the function is a
library function you need to tell the linker to link the library, if you
wrote it you need to include the object file in which it resides.

I have occasionally been trapped by the leading underscore nonsense.
Sometimes adding the underscore to the function when it is called will allow
it to link properly, even though it is documented without the underscore.

Nov 13 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: Andres Rosado-Sepulveda | last post by:
Hello, I'm having trouble compiling PHP 4.3.4 on Solaris 8. This is the error message it is showing: -- start -- Undefined first referenced symbol ...
3
by: Steven T. Hatton | last post by:
Scroll to the bottom and read the last part first. I've been trying very diligently to 'modularize' the code from TC++PL3E found here: http://www.research.att.com/~bs/matrix.c I keep getting...
2
by: stephen henry | last post by:
Hi all, Please help me... I have two projects: systemc (written in C++) and x264 (written in C). I would like to have a C++ project that that can call both systemc functions and x264...
0
by: Michael Yanowitz | last post by:
Hello: I am just trying out SWIG, but quickly ran into problems. Using Cygwin gcc, I tried the following: 1) Created example.c (as given on http://www.swig.org/tutorial.html ) /* File :...
1
by: enbulldog | last post by:
I am working on a program to "encrypt" a text file supplied by the user, and writing to another file also given by the user. I am very new to programming and am having trouble passing information...
1
by: yamitmehta | last post by:
When I compile to code using g++arm of VxWorks 5.5 and put it on my board i get the follwing undefined symbols:- Cpool and Csingleton are template classes. CPool has the static member...
8
by: mickey22 | last post by:
Hi all, I am trying to compile a VC++ project and it is win32 console application.When I try to compile it I get a lot of linking problems.I have included all the header files needed for the...
2
by: gopalverma | last post by:
first i create a header file name is sample.h and write with in it int sum(int x,int y); float average(float x,float y,float z); ...........................................................
8
by: Tim Frink | last post by:
Hi, I want to use a callback function together with templates. Let's say I've this code: File a.h: class A { private:
0
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...
0
Oralloy
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,...
0
jinu1996
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...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.