Getting undefined reference to error while linking the program

When i try to compile program i get error Undefined reference to while linking program .
Can anyone tell me why i am getting this error(in general why would we get such kind of error)
Also same code compiled fine with solaris platform(GCC compiler)..

sample code:
cursor.c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#include "dsybase.h"
#include "sqlbind.h"


DBCURSOR *DB_cursor_open(DBPROCESS *open_dbproc, 
                         char *select_stmt, 
                         DBINT *status, 
                         DBINT fetch_buf_size)
{
   DBCURSOR *cursor;
.....
....



dsybase.h
1
2
3
4
5
6
7
extern "C" {
include <sybfront.h>
#include <sybdb.h>

....
....


sybdeb.h
1
2
3
4
5
6
7
8
9
10
11
...
...
...
void DBFAR * CS_PUBLIC dbcursoropen  PROTOTYPE((
	DBPROCESS DBFAR *dbproc,
	BYTE DBFAR *stmt,
	DBINT scrollopt,
	DBINT concuropt,
	DBINT nrows,
	DBINT DBFAR *pstat
	));



/home1/local/release/build/release/uma_4.11.0/source/lib/brass/libbrass.a(cursor.o)(.text+0x17): In function `DB_cursor_open':
: undefined reference to `dbcursoropen'


I am getting too many similar error like above ..
Please anyone help...



You're getting this error because your makefile probably doesn't include a reference to the library where dbcursoropen() is defined, or the library is in another location.
Thanks Kooth you are right libraries are kept at another location........
Topic archived. No new replies allowed.