View previous topic :: View next topic |
Author |
Message |
Mike Jennings
Joined: 02 Jun 2006 Posts: 3 Location: Aberdeen; UK
|
EXTERNal symbol not found flash_led |
Posted: Fri Jun 02, 2006 1:17 pm |
|
|
Hi,
Something really strange is happening. Last week I had successfully compiled and run my code but today I get an "EXTERNal symbol not found flash_led" but have no idea why.
Nothing in the code has changed since I last successfully compiled.
The function flash_led comes after the main function and has a function prototype at the tope of the file and is in the same file as main which calls it. There are no other calles to this function from any other file.
What it happening????
The compiler version is PCWH 3.238
I would greatly appreciate if anyone can offer any suggestions or reasons.
Thanks
Mike |
|
|
PCM programmer
Joined: 06 Sep 2003 Posts: 21708
|
|
Posted: Fri Jun 02, 2006 1:28 pm |
|
|
Quote: | "EXTERNal symbol not found flash_led
there are no other calles to to this function |
In your post, you switch case within a word,
and you also misspell "calls".
I don't want to sound mean, but if mysterious errors
start to appear into your program, it might be caused by
this problem. For example, if you have the #case
directive at the top of your file, and then you type
even one character in a symbol name with a different
case than the declaration, you will get a compiler error. |
|
|
Mike Jennings
Joined: 02 Jun 2006 Posts: 3 Location: Aberdeen; UK
|
|
Posted: Sat Jun 03, 2006 4:17 am |
|
|
The "EXTERNal symbol not found flash_led" is the actual error the compiler throws up; flash_led is one of my functions within my code.
My spelling is not great but there are no other colpiler errors and the code is currently working. However, I require to make a change but when trying to recompile without changing anything I got this error.
One this that has changed is that I on a new PC and have therefore reinstalled the PCWH software which had been updated but have rolled back to 3.238 as I no longer have support agreement.
Thanks
Mike |
|
|
PCM programmer
Joined: 06 Sep 2003 Posts: 21708
|
|
Posted: Sat Jun 03, 2006 11:42 am |
|
|
Can you post a small test program that shows the problem ?
Strip down the program so that it only contains the flash_led()
function, and the prototype, and the code to call it in main().
In other words, strip it down to the smallest possible program
that will still show the problem. Also post the #include and
#fuses statements so the program can be pasted into MPLAB
and will compile without errors. If you can do this, we can
probably find the problem. I have PCH vs. 3.238 and can
install it to check the problem. |
|
|
Mike Jennings
Joined: 02 Jun 2006 Posts: 3 Location: Aberdeen; UK
|
|
Posted: Sat Jun 03, 2006 12:04 pm |
|
|
I have found the problem, I had an external reference to led_flash in another file where of the project where I used a call to led_flash for testing purposes. I failed to remove the external prototype definition after I removed the calls.
The PCWH search feature failed to find it. It was when I did a search using windows file explorer that it appeared.
It is still strange that this code was in there for a good few compiles before it decided to throw the error.
Anyway, thanks for your interest and offer of assistance.
Mike |
|
|
Mahesh Guest
|
|
Posted: Wed May 09, 2007 7:20 am |
|
|
Hey i too am facing the same error. I dunno how u corrected this. pls explain in detail. Really urgent |
|
|
mjennings101 Guest
|
|
Posted: Wed May 09, 2007 7:34 am |
|
|
Mahesh wrote: | Hey i too am facing the same error. I dunno how u corrected this. pls explain in detail. Really urgent |
From what I can remember, it was when I had multiple source files and I had referenced a function from another file using a external function prototype definitions. I have removed the call and deleted the file (as it was for testing only) but left in the fuction prototype. Therefore the compiler threw the error as it could not find the source function.
Therefore, I would assume that you have a call to an external function or a prototype definition to an external function that does not exist.
I used file search facility in Windows File Explorer to find the definition in the source files as the CCS search function failed to do so.
If this does not help then you will need to supply more information such as the compiler version, number of source files (C and H). |
|
|
Mahesh Guest
|
|
Posted: Wed May 09, 2007 11:36 pm |
|
|
thanks for the speedy reply...
i've only one source file.. no other file is present.. is it ok if i don give the extern key word??
the problem is with prototype declaration of a variable,, its declared as extern byte s[12]
it compiles properly if i remove that extern key word.. so is it ok if i don use that key word??? |
|
|
ckielstra
Joined: 18 Mar 2004 Posts: 3680 Location: The Netherlands
|
|
|
|