GIDForums  

Go Back   GIDForums > Computer Programming Forums > C++ Forum
User Name
Password
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

 
 
Thread Tools Search this Thread Rate Thread
  #1  
Old 03-May-2004, 12:21
ambeco ambeco is offline
New Member
 
Join Date: Feb 2004
Posts: 23
ambeco is on a distinguished road

Unresolved External


I tried to program a game similar to space invaders in C++ using my broland 5.5 compiler, but when I compile I get the message
Quote:
Error: Unresolved external 'substring(char *, char *)' refrenced from C:\CPP\SPACEINVADERS.OBJ
I've never had an error in the .obj file before, and I have NO idea what this means. I was going to post the substring function that I programmed in, but I don't think that the error would be in it, because I've used the exact same function flawlessly before. This comes after all the other errors, so it's not like I even have a line number to look at. Any ideas as to what could cause this?
  #2  
Old 03-May-2004, 12:28
machinated machinated is offline
Regular Member
 
Join Date: Mar 2004
Location: victoria, canada
Posts: 324
machinated has a spectacular aura aboutmachinated has a spectacular aura about
Quote:
Originally Posted by ambeco
I tried to program a game similar to space invaders in C++ using my broland 5.5 compiler, but when I compile I get the message

I've never had an error in the .obj file before, and I have NO idea what this means. I was going to post the substring function that I programmed in, but I don't think that the error would be in it, because I've used the exact same function flawlessly before. This comes after all the other errors, so it's not like I even have a line number to look at. Any ideas as to what could cause this?

i think you have declared that function as extern in your main file, and then when the linker tries to actually go look for it in one of your include files, it can't find it. sure you have it spelled same in both places? I haven't looked this error up or encountered it, but this is the first thing that came to my mind, so if it's not correct, my apologies
  #3  
Old 03-May-2004, 12:41
dsmith's Avatar
dsmith dsmith is offline
Senior Member
 
Join Date: Jan 2004
Location: Utah, USA
Posts: 1,351
dsmith is a glorious beacon of lightdsmith is a glorious beacon of lightdsmith is a glorious beacon of lightdsmith is a glorious beacon of lightdsmith is a glorious beacon of light
Quote:
Originally Posted by ambeco
I tried to program a game similar to space invaders in C++ using my broland 5.5 compiler, but when I compile I get the message

I've never had an error in the .obj file before, and I have NO idea what this means. I was going to post the substring function that I programmed in, but I don't think that the error would be in it, because I've used the exact same function flawlessly before. This comes after all the other errors, so it's not like I even have a line number to look at. Any ideas as to what could cause this?

This is actually a linker error that is caused by having substring defined but when the program is trying to link the obj files together it cannot find the implementation. If you are sure that the implementation is there, try to make sure that you have the exact same declarations as what your function is calling for.
  #4  
Old 03-May-2004, 12:46
aaroncohn's Avatar
aaroncohn aaroncohn is offline
Regular Member
 
Join Date: Feb 2004
Location: Bay Area, CA.
Posts: 564
aaroncohn is a jewel in the roughaaroncohn is a jewel in the roughaaroncohn is a jewel in the rough
This often happens to me when I am moving my function prototypes and function implementations around in my code to organize it or if I delete something in a function header and forget to rewrite it before I start the compile process. Check your function headers and make sure they're all there.
__________________
-Aaron
  #5  
Old 04-May-2004, 10:56
ambeco ambeco is offline
New Member
 
Join Date: Feb 2004
Posts: 23
ambeco is on a distinguished road

wow, dsmith is good...


You guys were right, there were three functions that I had changed, and forgot to change the declarations. Thanks guys! I'll keep that in mind for next time!
 
 

Recent GIDBlogUS Elections and the ?Voter?s Responsibility? by crystalattice

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Can somebody look at this and point out any errors to me soulfly C Programming Language 7 31-Mar-2004 10:45
MySQL Won't Work trs2988 C++ Forum 6 31-Mar-2004 09:48
including external libraries kenbrilliant C++ Forum 1 15-Dec-2003 14:06
External Stylesheet Question JdS Web Design Forum 3 07-Sep-2001 17:48

Network Sites: GIDNetwork · GIDWebHosts · GIDSearch · Learning Journal by J de Silva, The

All times are GMT -6. The time now is 01:39.


vBulletin, Copyright © 2000 - 2008, Jelsoft Enterprises Ltd.