Jump to content


Photo

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


2 replies to this topic

#1 Christopher

Christopher

    Newbrie

  • Members
  • 1 posts

Posted 12 October 2007 - 01:02 AM

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)

Attached Files


Edited by Christopher, 16 October 2007 - 06:10 PM.


#2 djwilliams

djwilliams

    Newbrie

  • EstablishedMember
  • 9 posts

Posted 02 November 2007 - 09:41 AM

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

#3 Pavel

Pavel

    Super Maniac

  • Administrators
  • PipPipPipPipPip
  • 1,446 posts
  • Gender:Male
  • Location:Melbourne, Australia

Posted 03 November 2007 - 12:02 AM

Thanks for posting. This is a compiler problem that has been fixed in our working copy. Fix will be available in the next release. Meanwhile you can use patch available from http://www.sourceboo...Fixes/bc682.zip


Regards,
Pavel



Reply to this topic



  


0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users