Solved

Which compiler?

Posted on 1998-07-03
10
217 Views
Last Modified: 2010-04-01
Hi, I am trying to compile source code and have a problem, I have changed the directory to search for a file but nothing happens, you see the interface let's me compile, link, make, build. but when i run the program lot's of linking errors come up, is there anyway out of this?

e.g #include <c:\graph3.h> // or " " which ever you like
    {
    code.....
    }


error: linker error undefind symbol _Sprite_display <filename>.

is there any way out of this????
0
Comment
Question by:GAMES_DREAMER
10 Comments
 

Author Comment

by:GAMES_DREAMER
ID: 1167118
Edited text of question
0
 
LVL 2

Expert Comment

by:rayb
ID: 1167119
You are either missing or not including a required library.  You need to find which module (library or object file) which implements or defines the symbol named and ensure that it is being included in the link.

0
 

Author Comment

by:GAMES_DREAMER
ID: 1167120
Sorry rayb nothing against you but, I wouldn't know about object files and how to link them since i don't use a command lines(and don't know how!), and i know i have the libary's because the .exe works fine.
0
 
LVL 22

Expert Comment

by:nietod
ID: 1167121
Its not linking fine and the exe does not work fine.  This is a linker error.  And rayb is proably right about the cause.  (although there are other possibilities.)

What IDE (integrated development environment) are you working with?  Like VC (Microsoft Vissual C++) or BC (Borland C++) or BCB (Borland C++ builder)?
0
 

Author Comment

by:GAMES_DREAMER
ID: 1167122
nietod i am using turbo borland c/c++ 3.1 under dos CCE.

the file i am trying to link are taken from the book TY game programming in 21 days.

and sorry (i wrote the last comment late at nite), when i said the .exe was working fine i meant the .exe supplied. I have checked the files .h and .c but nothing's missing.
0
Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

 
LVL 22

Expert Comment

by:nietod
ID: 1167123
There must be a library or object code file associated with the graph.h file.  This is proably called "graph3.lib" or "graph3.obj"  This might be in thje directory wjere you have graph3.h or a nearby directory.  This file needs to be included in your project.  I'm not usre how to do that in Borland, but you want some sort of menu option like "add files to project..."  Then select the .obj or .lib file.  (Note that the dialog box will probably not list .obj or .lib files, you will probably have to change the "file type" item to be able to see the .obj or .lib file.  

I hope that helps.  Let me know if not.
0
 

Accepted Solution

by:
softfgk earned 20 total points
ID: 1167124
u must specify all the include files
like<....> if it is like that then the compiler will search for that file in the directories u set as options in the compiler

if u r using it like"......h" then u use the exact path name where the file is located
i hope this will help    
0
 
LVL 22

Expert Comment

by:nietod
ID: 1167125
Sorry, softfgk, but that can't be the problem in this case..  The compiler is finding all the files it needs it there would be a compiler error.  (undefined something.)   He is getting a linker error so it has to be the files he is linking with.
0
 

Author Comment

by:GAMES_DREAMER
ID: 1167126
Sorry nietod, i have pointed to all the .obj and .lib files for the graph3.h but it is still giving me errors, about not being able to find it the same way. What compiler are you using? it might be that although i actually doubt it alot!
0
 
LVL 22

Expert Comment

by:nietod
ID: 1167127
Whnere is sprite_display defined?  is that in one of your files or on of the ones from the book?  What is sprite_display?  how is it defined?
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Often, when implementing a feature, you won't know how certain events should be handled at the point where they occur and you'd rather defer to the user of your function or class. For example, a XML parser will extract a tag from the source code, wh…
Go is an acronym of golang, is a programming language developed Google in 2007. Go is a new language that is mostly in the C family, with significant input from Pascal/Modula/Oberon family. Hence Go arisen as low-level language with fast compilation…
The goal of the tutorial is to teach the user how to use functions in C++. The video will cover how to define functions, how to call functions and how to create functions prototypes. Microsoft Visual C++ 2010 Express will be used as a text editor an…
The viewer will be introduced to the technique of using vectors in C++. The video will cover how to define a vector, store values in the vector and retrieve data from the values stored in the vector.

757 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

24 Experts available now in Live!

Get 1:1 Help Now