02-10-2006
That's not 'an error' - there are at least 2 problems:
1. You have not declared the main() function in any of the code blocks you've compiled.
2. You are not including all of the source in the -OR-
3. You are not telling cc where to look for libraries or .o files that have HandleUserTransaction, and the other functions shown. -OR-
2+3 you didn't compile all the source and you didn't tell cc where to look for special libraries or archives.
9 More Discussions You Might Find Interesting
1. Programming
I m writting code in c using another library(parapin) and making Makefile .but there is a error like
undefined reference to `sinf'
undefined reference to `ceilf'
although i have added math.h library in my code
. I tried to run simple programme using math.h
and it run.but in making Makefile it... (2 Replies)
Discussion started by: bharat suthar
2 Replies
2. Programming
Hi
I wanted to learn communication between threads and I used a simple example but
I faced with this error while I have a sofware that uses this functions without
any problem
so would you please help me to know the reason
thanks for your help and great favor.
#include <pthread.h>... (2 Replies)
Discussion started by: netman
2 Replies
3. Programming
when i compile my program, i meet the following error:
...
undefined reference to `__ctype_b'
...
anybody knows which shared library should be linked during make?
thanks a lot! (6 Replies)
Discussion started by: princelinux
6 Replies
4. Programming
Hi, i want to compile a code where fortran calls c . First I compiled C module ,it has pass by gcc. However, after generating .o file. I compiled C and fortran files together by intel fortran and it failed " undefined reference to 'vicerror'". vicerror is a function. I do not know why. (1 Reply)
Discussion started by: austinhsu
1 Replies
5. Programming
I try to compile a sample c code in fedora eclipse 3.2 as managed makefile using pthread library,it shows some error on pthread functions.Error is of undefined reference to pthread.Anybody guide me to solve this problem.
Thanking you (1 Reply)
Discussion started by: sujith4u87
1 Replies
6. Programming
Hi guys.
H was learning posix threads in C with anjuta IDE. it gives me
undefined reference to `pthread_create'
I know i should compile it like:
gcc -lpthread main.c
how should i import this configuration in anjuta so i can compile inside it? (2 Replies)
Discussion started by: majid.merkava
2 Replies
7. Homework & Coursework Questions
Use and complete the template provided. The entire template must be completed. If you don't, your post may be deleted!
1. The problem statement, all variables and given/known data:
i know when undefined reference shows up the program is saying it is not link to that function but the problem... (1 Reply)
Discussion started by: mgyeah
1 Replies
8. Homework & Coursework Questions
Use and complete the template provided. The entire template must be completed. If you don't, your post may be deleted!
1. The problem statement, all variables and given/known data:
The problem is a function which i typed although it kept saying that it is a undefined reference still. other... (1 Reply)
Discussion started by: mgyeah
1 Replies
9. Programming
I was trying to compile the following code in cygwin using g++:
------------------------------------------
#include <iostream>
using namespace std;
int identity(int input)
{
int output = input;
return output;
}
------------------------------------------
I get this error:
... (7 Replies)
Discussion started by: DyslexicChciken
7 Replies
INTRO(3) BSD Library Functions Manual INTRO(3)
NAME
intro -- introduction to the C libraries
DESCRIPTION
This section provides an overview of the C library functions, their error returns and other common definitions and concepts. Most of these
functions are available from the System library, libSystem. Other libraries must be indicated at compile time with the -l option of the com-
piler.
The various libraries (followed by the loader flag):
libSystem (-lSystem) Standard C library functions. When using the C compiler cc(1), it is not necessary to supply the loader flag -lSystem
for these functions. There are several `libraries' or groups of functions included inside of libSystem: the standard
I/O routines, database routines, bit operators, string operators, character tests and character operators, des encryp-
tion routines, storage allocation, time functions, signal handling and more.
For compatibility with other systems, which provide these capabilities in separate libraries (such as libc), symbolic
links are provided for -lc, -ldbm, -ldl, -linfo, -lm, -lpoll, -lpthread and -lrpcsvc; they all point to libSystem.
libcurses (-lcurses -ltermcap)
Terminal independent screen management routines for two dimensional non-bitmap display terminals. (See ncurses(3).)
libl (-ll) The library for lex(1).
libtermcap (-ltermcap)
The terminal independent operation library package. (See termcap(3).)
liby (-ly) The library for yacc(1).
FILES
/usr/lib/libSystem.dylib the main System library
/usr/lib/libSystem_debug.dylib the main System library compiled with debug support
/usr/lib/libSystem_profile.dylib the main System library compiled for profiling
SEE ALSO
cc(1), ld(1), nm(1), intro(2), stdio(3)
HISTORY
An intro manual appeared in Version 7 AT&T UNIX.
BSD
Aug 17, 2006 BSD