jbagel2 / libfixmath

Automatically exported from code.google.com/p/libfixmath
0 stars 0 forks source link

compiler error after setting #define FIXMATH_NO_OVERFLOW #19

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Use the Wiring  IDE
2. Copy the libfixmath source code to a folder named libfixmath
2b. Copy the libfixmath folder to the 'libraries' folder in your Wiring 
Sketches folder.
3. Add the header file: compilerSettings.h (see attachment) to the libfixmath 
folder.
4. Add #include "compilerSettings.h" to the beginning of every header file in 
the lib math source code
(You ask why? Because I don't know how else to set these compiler options in 
Wiring. To my knowledge this should work)
6. Start a new wiring sketch and add #include <fixmath.h> at the top
7. uncomment the compiler setting //#define FIXMATH_NO_OVERFLOW in 
compilerSettings.h
8. Click Verify in The Wiring IDE

What is the expected output?
Successful compilation

What do you see instead?
error: libfixmath/fix16.hpp: In member function 'const Fix16 Fix16::sadd(const 
Fix16&) const':
libfixmath/fix16.hpp:57: error: 'fix16_sadd' was not declared in this scope

plus similar errors for fix16_smul and fix16_sdiv.

What version of the product are you using? On what operating system?
Wiring version 100. Libfixmath version: can not find version info. downloaded 
the zip end of januari. OS: OSX

Please provide any additional information below.

Original issue reported on code.google.com by mozzarel...@lycos.com on 18 Jan 2013 at 2:13

Attachments:

GoogleCodeExporter commented 9 years ago
The issue seems to be that fix16.hpp always has the sdiv/smul operations in it. 
They should be put inside #ifndef FIXMATH_NO_OVERFLOW

Original comment by Petteri.Aimonen on 18 Jan 2013 at 5:37

GoogleCodeExporter commented 9 years ago
This issue was closed by revision r87.

Original comment by Petteri.Aimonen on 28 Jan 2013 at 3:56