|
|
View previous topic :: View next topic |
Author |
Message |
jecottrell
Joined: 16 Jan 2005 Posts: 559 Location: Tucson, AZ
|
UNION Problem when Porting from 3.236 to 3.249 |
Posted: Thu Jun 07, 2007 9:27 am |
|
|
3.249 (using UltraEdit)
I have code that compiles fine in 3.236 on a desktop w/ PCWH. I'm getting ready to travel and will be using my laptop w/ 3.249 & PCH and UltraEdit.
When I try to compile: (the following code I added to the device header)
Code: | // SSPCON1------------------
extern struct {
unsigned SSPM0:1;
unsigned SSPM1:1;
unsigned SSPM2:1;
unsigned SSPM3:1;
unsigned CKP:1;
unsigned SSPEN:1;
unsigned SSPOV:1;
unsigned WCOL:1;
} SSPCON1;
#byte SSPCON1 = 0xFC6
//------------------------ |
I get a "EXTERNal symbol not found SSPCON1" error and it points to a line number beyond that of the MAIN file. By commenting lines I've figured that it is a problem with the above code in the header.
I'm I missing something that changed between versions?
Any suggestions would be appreciated.
Thanks,
John |
|
|
Ttelmah Guest
|
|
Posted: Thu Jun 07, 2007 9:38 am |
|
|
Extern, _does nothing_ on the older compilers. Support for 'extern', is added in the V4 compiler, and 3.249, _started_to get ready for this.
If you read the manual for 3.236, it will say that the 'extern' keyword, is allowed, but does nothing. In 3.249, is didn't work, but the compiler 'understood' the word enough to kow that it implies an external declaration, which has to be loaded. Hence the error message.
get rid of the extern declaration. It is not needed (you are dealing with a structure that is not 'external' to the program), and is causing your problem.
Best Wishes |
|
|
jecottrell
Joined: 16 Jan 2005 Posts: 559 Location: Tucson, AZ
|
|
Posted: Thu Jun 07, 2007 9:46 am |
|
|
Bingo.
Thanks, I would have never figured that one out!
John |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|