Solved

Which compiler?

Posted on 1998-07-03
10
220 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
Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
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
 
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

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Find Visual Studio Tools 2 111
C++ question 3 70
Add values of each row in an array 3 64
How to Correctly derive class from CWinThread in MFC 4 64
  Included as part of the C++ Standard Template Library (STL) is a collection of generic containers. Each of these containers serves a different purpose and has different pros and cons. It is often difficult to decide which container to use and …
This article will show you some of the more useful Standard Template Library (STL) algorithms through the use of working examples.  You will learn about how these algorithms fit into the STL architecture, how they work with STL containers, and why t…
The goal of the video will be to teach the user the concept of local variables and scope. An example of a locally defined variable will be given as well as an explanation of what scope is in C++. The local variable and concept of scope will be relat…
The viewer will learn how to clear a vector as well as how to detect empty vectors in C++.

861 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