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

ssize_t rv was not decleared #36

Closed
skeyvin opened this issue Feb 3, 2022 · 1 comment
Closed

ssize_t rv was not decleared #36

skeyvin opened this issue Feb 3, 2022 · 1 comment

Comments

@skeyvin
Copy link

skeyvin commented Feb 3, 2022

#include "plthook.h"

ssize_t recv(){
ssize_t rv = main();
return rv;
};

int main(){
    plthook_t *hook;
    plthook_open(&hook, "vulkan.elf");
   recv();

};

i compile it with g++ main.cpp
and on the vulkan.elf i have everything in extern "C"{}
all plhook stuff is in the same directory as main.cpp
how do i solve this?
compiler error =

main.cpp: In function ‘ssize_t recv()’:
main.cpp:12:14: error: ‘main’ was not declared in this scope
   12 | ssize_t rv = main();
      |              ^~~~

@kubo
Copy link
Owner

kubo commented Feb 4, 2022

The error itself is solved if int main(void); is added before ssize_t recv(){.
But even though it is solved, your code is useless. It calls main() and recv() alternately until the process crashes.

@skeyvin skeyvin closed this as completed Feb 5, 2022
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

2 participants