Christopher 0 Posted October 12, 2007 Report Share Posted October 12, 2007 (edited) 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 October 16, 2007 by Christopher Quote Link to post Share on other sites
djwilliams 0 Posted November 2, 2007 Report Share Posted November 2, 2007 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 Quote Link to post Share on other sites
Pavel 0 Posted November 3, 2007 Report Share Posted November 3, 2007 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.sourceboost.com/CommonDownload/Fixes/bc682.zip Regards, Pavel Quote Link to post Share on other sites
Recommended Posts
Join the conversation
You are posting as a guest. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.