Solved

Which compiler?

Posted on 1998-07-03
10
218 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
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

  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 …
C++ Properties One feature missing from standard C++ that you will find in many other Object Oriented Programming languages is something called a Property (http://www.experts-exchange.com/Programming/Languages/CPP/A_3912-Object-Properties-in-C.ht…
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 use the return statement in functions in C++. The video will also teach the user how to pass data to a function and have the function return data back for further processing.

895 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

16 Experts available now in Live!

Get 1:1 Help Now