?
Solved

Which compiler?

Posted on 1998-07-03
10
Medium Priority
?
223 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

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

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

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

Errors will happen. It is a fact of life for the programmer. How and when errors are detected have a great impact on quality and cost of a product. It is better to detect errors at compile time, when possible and practical. Errors that make their wa…
Introduction This article is a continuation of the C/C++ Visual Studio Express debugger series. Part 1 provided a quick start guide in using the debugger. Part 2 focused on additional topics in breakpoints. As your assignments become a little more …
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 goal of the video will be to teach the user the difference and consequence of passing data by value vs passing data by reference in C++. An example of passing data by value as well as an example of passing data by reference will be be given. Bot…
Suggested Courses

771 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