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

Build Error in Objective-c++ #57

Closed
iOkay opened this issue Mar 11, 2019 · 1 comment
Closed

Build Error in Objective-c++ #57

iOkay opened this issue Mar 11, 2019 · 1 comment

Comments

@iOkay
Copy link

iOkay commented Mar 11, 2019

Env: xcode 10.1
c++ setting:
image

I added the test code to main.mm file, and builded failed. Error as follow:
"Cannot initialize a member subobject of type 'void *' with an lvalue of type 'int (int)'"
image

@iOkay
Copy link
Author

iOkay commented Mar 11, 2019

Should wrote like this:

{"close", (void *)my_close, (void **)&orig_close},
{"open", (void *)my_open, (void **)&orig_open},

Converting type must be explicit.

@iOkay iOkay closed this as completed Mar 11, 2019
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

1 participant