954,499 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

Trouble when adding a library in borland C++(undefined symbol "fct_name" ...)

I tried using a lib (svgacc) in Borland C++ both from source directory(i.e. bin) and lib and include directories(ofcourse after previously copying the in those dirs D:).
The error is :
Linker error: undefined symbol _videomodeget in module main.cpp .
I tried building in a project of modules as well as a stand-alone "*.cpp" file.
I used the #include "svgacc.h" statement for source dir and <> statement for the lib&include dirs Co.Ltd :D. The error didn't change.

P.S.: I tested to see if the header is "seen" by putting some wrong args to the functions I called in the module (i.e. main cause it was a test module ),and compiler reacted naturally: "Extra parameters ...".
Searched for a way to make the linker see it...but i can't find any...

Please help with some clues so that I know there is hope :D ...
I'm out of ideas.

dczet
Newbie Poster
2 posts since Mar 2009
Reputation Points: 10
Solved Threads: 0
 

You may have physically placed the libraries in those directories, but did you tell your compiler that it needs to look for those libraries ? I don't use Borland compilers so I don't know how to do that. Maybe in project setting somewhere.

Ancient Dragon
Retired & Loving It
Team Colleague
30,049 posts since Aug 2005
Reputation Points: 5,662
Solved Threads: 2,343
 

K...thanks....I managed to add it now. It works.

dczet
Newbie Poster
2 posts since Mar 2009
Reputation Points: 10
Solved Threads: 0
 

I tried using a lib (svgacc) in Borland C++ both from source directory(i.e. bin) and lib and include directories(ofcourse after previously copying the in those dirs D:). The error is : Linker error: undefined symbol _videomodeget in module main.cpp . I tried building in a project of modules as well as a stand-alone "*.cpp" file. I used the #include "svgacc.h" statement for source dir and <> statement for the lib&include dirs Co.Ltd :D. The error didn't change.

P.S.: I tested to see if the header is "seen" by putting some wrong args to the functions I called in the module (i.e. main cause it was a test module ),and compiler reacted naturally: "Extra parameters ...". Searched for a way to make the linker see it...but i can't find any...

Please help with some clues so that I know there is hope :D ... I'm out of ideas.

reply:::I got same problem.I resolve it........

1.Save the required file as cpp file.(eg...code.cpp)
2.Include graphics header files
#include
#include
3.see ur main() (important step)
int gd=DETECT,gm;
initgraph(&gd,&gm,"C:\\Tc\\BGI");
(after installation of turboc++3,u got BGI file.u have to provide path as in ur system)
4.Last step
Goto options->Linkers->Libraries->put ''X'(click) for Graphics library and standard run time. others should be blank.
5.Now execute the program,it really works.
---sagar reply

hsagar22
Newbie Poster
2 posts since Feb 2010
Reputation Points: 5
Solved Threads: 0
 

This question has already been solved

Post: Markdown Syntax: Formatting Help
You