Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update HMMoC to work with g++ v.>=4.5 AND test on SUSE linux #1

Open
tedholzman opened this issue Nov 2, 2011 · 0 comments
Open

Update HMMoC to work with g++ v.>=4.5 AND test on SUSE linux #1

tedholzman opened this issue Nov 2, 2011 · 0 comments

Comments

@tedholzman
Copy link
Collaborator

The HMMoC-BFloat-Algebra library failed to compile under SUSE linux g++ v. 4.5.0 The current version under OSX 10.6.2 appears to be g++ v. 4.2.1. This URL details some of the problems to be expected in upgrading from 4.2 to 4.5:

http://lists.debian.org/debian-devel-announce/2011/02/msg00012.html

The code in Algebra.hpp exercised one of the problems documented above.

In Algebra.hpp there are four operator overload functions (starting on line 1560) defined like this:

/* old style */
inline
BFloat::BFload&
BFloat::
operator= ...

This fails with error message:
‘hmmoc::BFloat::BFloat’ names the constructor, not the type

It turns out that the initial BFloat:: is unnecessary and confusing. This syntax works:

/* new style */
inline
BFloat&
BFloat::operator= ...


Another problem: starting on line 1653 is a somewhat misleading error message: "declaration of ‘operator=’ as non-function "

This derives from the fact that uint32_t is not defined by default (under SUSE g++). It can be repaired by adding

include <stdint.h>

near the top of the .hpp file.


Linkage problem. In the Makefile, when creating the "tests" executable, it seems to work better to include the libHMMoC-BFloat-Algebra library AFTER including the Tests.o object file on the g++ or ld command.

These changes allow compilation, linking and running the tests executable on both the Mac and SUSE platforms, with identical results.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant