300x250 AD TOP

Search This Blog

Paling Dilihat

Powered by Blogger.

Saturday, February 25, 2017

Node js C++ Addon Overload Resolution - v1.0.0

Module compiles and all tests are passing cross platform, windows/linux/arm (raspberry pi) were tested!




Lessons learned:
- gcc is a lot less forgiving than visual c++, cryptic error messages when there are circular references between header files.
- gcc 6 is missing some minor c++17 implementations (std::size for example).
- c++ 11 (and up) - windows header includes some headers by default, in gcc you have to include them explicitly, like cmath.
- node-gyp adds c++11 compilation flag which kills gcc's ability to compile c++ 14. it can be removed but why was it even there...?

edit 2017-02-26:
- gcc multi-line comment warning makes sense when you realize the backslash at the end ( \ ) might be used to comment the line following the comment.
- gcc doesn't like extra (and useless) typename keyword
- gcc doesn't like you not using typename where it should be clear its a type definition. 
- gcc doesn't like to mix definitions from headers and code files. 

and many more... 

I guess gcc makes you write better code :-)

Tags:

1 comments:

  1. It’s a very informative and helpful article, thank you for sharing!


    melbourne seo services

    ReplyDelete