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

../src/node_jsvmapi.cc:192:3: error: ‘interface’ does not name a type #69

Closed
gabrielschulhof opened this issue Jan 30, 2017 · 7 comments

Comments

@gabrielschulhof
Copy link
Collaborator

The error handling modifications fail to build with GCC.

@gabrielschulhof
Copy link
Collaborator Author

@boingoing ^

@boingoing
Copy link

This line is:

interface CallbackWrapper {
...

Does the 'interface' keyword not exist in GCC? Is 'interface' an ISO standard keyword? I'm actually not sure. Looks like it might be an MSVC-specific #define. Maybe we should replace this with class or struct for compliance sake?

@gabrielschulhof
Copy link
Collaborator Author

I think so. It certainly doesn't build out of the box.

@boingoing
Copy link

@jasongin
Seems like replacing 'interface' with 'struct' should solve the issue. Is there a reason to use 'interface'? I'm actually not super familiar with it.

boingoing added a commit to boingoing/abi-stable-node that referenced this issue Jan 30, 2017
First, GCC doesn't seem to implement an interface keyword. Workaround here is to use struct instead of interface. This is nodejs#69

Second, GCC doesn't support the flavor of static_assert which takes a single parameter. Just added a second parameter message here.
@boingoing
Copy link

There is another build issue on gcc, too, so I started a PR. #70

@jasongin
Copy link
Member

Yes, interface is just an alias for struct, supported by MSVC but not GCC. I had a habit of using interface from Windows programming, since it explicitly declares the intent for the struct to only have abstract methods. But it's certainly not required.

jasongin pushed a commit that referenced this issue Jan 30, 2017
First, GCC doesn't seem to implement an interface keyword. Workaround here is to use struct instead of interface. This is #69

Second, GCC doesn't support the flavor of static_assert which takes a single parameter. Just added a second parameter message here.
@jasongin
Copy link
Member

Fixed by 5ae919a

jasongin pushed a commit that referenced this issue Feb 1, 2017
First, GCC doesn't seem to implement an interface keyword. Workaround here is to use struct instead of interface. This is #69

Second, GCC doesn't support the flavor of static_assert which takes a single parameter. Just added a second parameter message here.
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

3 participants