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

C language seems to be using a cpp compiler? #9

Closed
justlucdewit opened this issue Jul 28, 2022 · 4 comments
Closed

C language seems to be using a cpp compiler? #9

justlucdewit opened this issue Jul 28, 2022 · 4 comments

Comments

@justlucdewit
Copy link

When I try to compile my C code using the CodeX C compiler, i get a lot of errors complaining about casting a void* to something else, which is fine in C however forbidden in CPP (source: https://stackoverflow.com/a/22744183/11804669)

Which is really weird because that would mean the C language for CodeX is actually compiled as if it was C++

So as a test I tried copy pasting a C++ Hello World script into it (which should not AT ALL) compile if it was really C

and that worked

@justlucdewit
Copy link
Author

Also it seems that in the code, there is a file for c_or_cpp instead of seperate files, which further implies it is just blindly compiling C with a cpp compiler https://github.com/Jaagrav/CodeX-API/tree/master/executeCode

@justlucdewit
Copy link
Author

Infact, here is the line that is the problem: https://github.com/Jaagrav/CodeX-API/blob/master/executeCode/c_or_cpp.js#L8

It is using g++ even when the language is C, while I would expect it to use gcc instead

@justlucdewit
Copy link
Author

I created a pull request for ya, hopefully this works, but please review carefully #10

@Jaagrav
Copy link
Owner

Jaagrav commented Dec 31, 2022

The API is back live, check out this release. I have made the changes based on your PR, thanks for your contribution.

https://github.com/Jaagrav/CodeX-API/releases/tag/v1-alpha

@Jaagrav Jaagrav closed this as completed Dec 31, 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