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.
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
Copyrightę 2004-2007 Pavel Baranov
Copyrightę 2004-2007 David Hobday
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)
Edited by Christopher, 16 October 2007 - 06:10 PM.