Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Which compiler?

Posted on 1998-07-03
10
Medium Priority
?
225 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

Independent Software Vendors: 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!

Question has a verified solution.

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

What is C++ STL?: STL stands for Standard Template Library and is a part of standard C++ libraries. It contains many useful data structures (containers) and algorithms, which can spare you a lot of the time. Today we will look at the STL Vector. …
Article by: evilrix
Looking for a way to avoid searching through large data sets for data that doesn't exist? A Bloom Filter might be what you need. This data structure is a probabilistic filter that allows you to avoid unnecessary searches when you know the data defin…
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.
The viewer will learn additional member functions of the vector class. Specifically, the capacity and swap member functions will be introduced.

610 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