Import vanilla (platform-independent) C++ namespace to Node.js

41 Views Asked by At

I'm completely new to C and C++, so I made this simple application to test things out:

#ifndef TOOLS_WEATHER_HPP
#define TOOLS_WEATHER_HPP

#include <iostream>

using namespace std;

namespace tools {
namespace weather {

class Temperature
{
public:
    bool test();
};

bool Temperature::test() {
    return true;
}


} // Namespace Weather
} // Namespace Tools

#endif // TOOLS_WEATHER_HPP

Now I have a Node.js server, to which I want to import the c++ namespace.

My question is: How can I import a c++ header file with namespace, so I can use it with the namespace (tools::weather).

Note: I need to import vanilla C/C++ not n-api or nan C++.

0

There are 0 best solutions below