Jump to content
Sign in to follow this  
Christopher

Error: Trying To Add Bank Switching For Var That Has No Memory Allocated

Recommended Posts

Christopher    0

Hello,

 

I am evaluating your C++ compiler to see if it will meet the needs for the projects I am going to be developing. I have come across an interesting error that I cannot seem to resolve. Can you tell me whether this is a compiler/linker bug or am I just not doing something right.

 

Attached are two zip files that illustrate the problem. Both tests contain the same code which involves two simple classes and the main program function. Target is the PIC16F917. I have tried this test with both version 6.80 and 6.81 of the compiler and linker.

 

I'd really appreciate your help.

Christopher

 

 

 

 

Test2: Class A, Class B, and the main function are all located in the same source code file. The program compiles and links successfully.

 

 

Test1: Class A is contained in its own header and source code file. Class B is in the same source code file as the main function. After the files are compiled, the linker consistently reports the following error:

 

Executing: "C:\Program Files\SourceBoost\boostlink.pic.exe" "P:\Projects\MicroChip\Test\Test1.obj" "P:\Projects\MicroChip\Test\ClassA.obj" -O1 -p "Test1" -t 16F917

BoostLink Optimizing Linker Version 6.81

http://www.sourceboost.com

Copyright© 2004-2007 Pavel Baranov

Copyright© 2004-2007 David Hobday

 

 

Optimisation level:1

Warning unreferenced functions removed:

~ClassB in: P:\Projects\MicroChip\Test\Test1.c

 

Internal Error: Trying to add bank switching for var that has no memory allocated:'this' ('ClassA_00000_arg_this',0x100001CB)

Test1.zip

Test2.zip

Edited by Christopher

Share this post


Link to post
Share on other sites
djwilliams    0
Hello,

 

I am evaluating your C++ compiler to see if it will meet the needs for the projects I am going to be developing. I have come across an interesting error that I cannot seem to resolve. Can you tell me whether this is a compiler/linker bug or am I just not doing something right.

 

Attached are two zip files that illustrate the problem. Both tests contain the same code which involves two simple classes and the main program function. Target is the PIC16F917. I have tried this test with both version 6.80 and 6.81 of the compiler and linker.

 

I'd really appreciate your help.

Christopher

 

 

 

 

Test2: Class A, Class B, and the main function are all located in the same source code file. The program compiles and links successfully.

 

 

Test1: Class A is contained in its own header and source code file. Class B is in the same source code file as the main function. After the files are compiled, the linker consistently reports the following error:

 

Executing: "C:\Program Files\SourceBoost\boostlink.pic.exe" "P:\Projects\MicroChip\Test\Test1.obj" "P:\Projects\MicroChip\Test\ClassA.obj" -O1 -p "Test1" -t 16F917

BoostLink Optimizing Linker Version 6.81

http://www.sourceboost.com

Copyright© 2004-2007 Pavel Baranov

Copyright© 2004-2007 David Hobday

 

 

Optimisation level:1

Warning unreferenced functions removed:

~ClassB in: P:\Projects\MicroChip\Test\Test1.c

 

Internal Error: Trying to add bank switching for var that has no memory allocated:'this' ('ClassA_00000_arg_this',0x100001CB)

 

Hi Christopher

 

I was just about to send a post I have just started using the boostC++ compiler, and I am getting the same problems. I tried to create some .h files with corresponding .CPP files and I got problems with the name not being valid for one of the classes. I then left the base class in its own .h, and CPP file and all seemed to compile okay until I tried to implement polymorphism then I received the message you have reported above.

 

The question I have is: Is it possible to have multiple header and source files for each new class, or does the bulk of the code need to be in a single file. I have used C++ quite a bit and I am used to seperating the classes into their own files. I will be in contact if I get to the bottom of this. By the way do you know if there are any tutorials on using the compiler?

cheers

Dave

Share this post


Link to post
Share on other sites

Your content will need to be approved by a moderator

Guest
You are commenting as a guest. If you have an account, please sign in.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoticons maximum are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
Sign in to follow this  

×