www.retrosoftware.co.uk
http://www.retrosoftware.co.uk/forum/

Error compiling beebasm latest on CentOS 5.9
http://www.retrosoftware.co.uk/forum/viewtopic.php?f=17&t=819
Page 1 of 1

Author:  sweh [ Sun Mar 24, 2013 6:43 pm ]
Post subject:  Error compiling beebasm latest on CentOS 5.9

The 1.06 archive link at http://www.retrosoftware.co.uk/wiki/ind ... #Downloads appears to point direct to hg tree and downloads something tagged as 1.08. When attempting to compile on CentOS 5.9 with "make code PLATFORM=linux" it runs and then aborts:
Code:
Compiling ... commands.cpp
cc1plus: warnings being treated as errors
sourcecode.h:33: warning: 'class SourceCode' has virtual functions but non-virtu
al destructor
make[1]: *** [objects/commands.o] Error 1
make: *** [objs] Error 2


I'm not a C++ person but the fix appears to be in just defining the destructor as virtual:
Code:
        virtual ~SourceCode();

Now it compiles without error and appears to run without failure.

Author:  DaveJ [ Mon Mar 25, 2013 8:03 am ]
Post subject:  Re: Error compiling beebasm latest on CentOS 5.9

That's really strange as it compiles fine without modification on Fedora 18 (which is basically a Beta version of RHEL). I'm going to have to compile BeebASM later today as I did a fresh install so I'll see what happens.

EDIT: I forgot - I did have a problem compiling BeebASM, the solution to it I used and Rich's explanation is here http://www.retrosoftware.co.uk/forum/viewtopic.php?f=17&t=589&start=20#p5518

Author:  RichTW [ Mon Mar 25, 2013 10:04 am ]
Post subject:  Re: Error compiling beebasm latest on CentOS 5.9

I've updated the wiki page to contain the (correct) reference to version 1.08 (which is indeed the latest version).

Your compiler is correct that the destructor should be marked as virtual, and your fix is exactly right. Compilers continue to get more pedantic, and these little mistakes of mine get noticed eventually :) I'll introduce that to the repository as a minor fix when I have a moment (not today though as I'm up to my neck in real work!).

Page 1 of 1 All times are UTC [ DST ]
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/