c58_4311 0 Posted February 11, 2006 Report Share Posted February 11, 2006 I have used the new boostbasic compiler and have found that the compiler generates following error and aborts the compilation process: Building... BoostBasic Optimizing Basic Compiler Version 6.31 Beta (for PIC16 architecture) http://www.picant.com/c2c/c.html Copyright© 2004-2006 Pavel Baranov Copyright© 2004-2006 David Hobday Beta version. No limitations. Expire date: 2006.05.01 _.bas success BoostLink Optimizing Linker Version 6.31 http://www.picant.com/c2c/c.html Copyright© 2004-2006 Pavel Baranov Copyright© 2004-2006 David Hobday Error: function and prototype differ in return type:'__mul_8u_8u(unsigned char,unsigned char)' Failure Error: function and prototype differ in return type:'__mul_8u_8u(unsigned char,unsigned char)' Error: function and prototype differ in return type:'__mul_8u_8u(unsigned char,unsigned char)' Internal Error:Unable to find function ID:0x100003A3 Exit code was -2. Removing target: interrupt.pic16.hex Failed to locate output file 'interrupt.pic16.hex' Done Failed the programe listing is: Sub main() Dim x as integer Dim z as byte trisb = 0 'configure port B portb = 0 'clear port B z = 10 x = z * 200 Do while 1 Loop End Sub I have also checked that if I replace the variable z with the constant value like - x = 140 * 200, then everything gets ok. I have also tried the example code from the hep given in the sourceboost ide, the same problem is also there - from the sourceboost help : Sub MySub (x As Integer) Dim v as integer v = x * 10 End Sub this also gives the following error Failure Error: Unresolved external function:'__mul_16s_16u__16(signed short,signed short)' Error: Unresolved external symbol, function:__mul_16s_16u__16 Exit code was -2. I am using the 6.31 version of sourceboost under windows xp. is this a bug or am I doing something wrong. I want to multiply two integers. Quote Link to post Share on other sites
Dave 0 Posted February 11, 2006 Report Share Posted February 11, 2006 c58_4311, Looks like a bug in BASIC compiler Fix is to not use constant in the mul expression. See below. sub main() Dim x as integer Dim z as byte dim y as integer y = 200 trisb = 0 'configure port B portb = 0 'clear port B z = 10 x = z * y Do while 1 Loop end sub Regards Dave Quote Link to post Share on other sites
c58_4311 0 Posted February 11, 2006 Author Report Share Posted February 11, 2006 Thanks for the prompt reply. I will manage anyhow. But if we change the 'z' variable to byte then also the same problem arrises Dim x as integer Dim z as byte dim y as integer changed to Dim x as integer Dim z as byte dim y as integer the error now is: Failure Error: function and prototype differ in return type:'__mul_8u_8u(unsigned char,unsigned char)' Error: function and prototype differ in return type:'__mul_8u_8u(unsigned char,unsigned char)' Error: function and prototype differ in return type:'__mul_8u_8u(unsigned char,unsigned char)' Internal Error:Unable to find function ID:0x100003A3 Exit code was -2. anyhow, the remedy you gave is good one. It will help me lot. Quote Link to post Share on other sites
Pavel 0 Posted February 25, 2006 Report Share Posted February 25, 2006 Bug fixed. Fix will be available in the next release. 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.