mikegashler / waffles

A toolkit of machine learning algorithms.
http://gashler.com/mike/waffles/
86 stars 33 forks source link

Compile problems on hello_ml demo #37

Closed wduminy closed 7 years ago

wduminy commented 7 years ago

I get errors when running make in the hello_ml demo. Using macOS. Some of the errors are shown below:

In file included from main.cpp:22:
/usr/local/include/GClasses/GApp.h:190:20: error: expected ';' at end of declaration list
        ~GPassiveConsole() noexcept(false);
                        ^
main.cpp:46:2: error: unknown type name 'GLayerLinear'
        GLayerLinear* pLay1 = new GLayerLinear(FLEXIBLE_SIZE, 3);
mikegashler commented 7 years ago

Hmm, g++ 6.2 requires "noexcept(false)" to be specified whenever a destructor throws an exception. It looks like clang doesn't like that. I guess I'll just have to avoid throwing exceptions in destructors at all. Fortunately, there are not very many places where we do that, so I just changed them to call "exit(1);" instead. Did that fix it for you?

wduminy commented 7 years ago

The first problem is solved. But the others remain.

main.cpp:46:2: error: unknown type name 'GLayerLinear'
        GLayerLinear* pLay1 = new GLayerLinear(FLEXIBLE_SIZE, 3);
        ^
main.cpp:46:28: error: unknown type name 'GLayerLinear'
        GLayerLinear* pLay1 = new GLayerLinear(FLEXIBLE_SIZE, 3);
                                  ^
main.cpp:47:2: error: unknown type name 'GLayerActivation'; did you mean 'GBlockActivation'?
        GLayerActivation* pLay2 = new GLayerActivation();

I cannot find the header file that contains the definition for GLayerLinear.

StephenAshmore commented 7 years ago

Yes, this is an issue with the latest build of waffles. We have switched from using GLayer's to using a new block functionality to handle interesting cases (Issue #32). We will fix these as soon as we can. In the meantime, you can download release 1.0 and you should not see any of these compiler issues.

mikegashler commented 7 years ago

Fixed.