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

Option to specify code file extension #1297

Open
tomsons26 opened this issue Jul 12, 2024 · 1 comment
Open

Option to specify code file extension #1297

tomsons26 opened this issue Jul 12, 2024 · 1 comment

Comments

@tomsons26
Copy link
Contributor

tomsons26 commented Jul 12, 2024

There are compilers on decomp.me that do support C++ code but rely on file extension to determine if they should use the C++ compiler.
For example, this seems to be the case for most PSX compilers.
Only two 2.8.x versions have -x c++ or -language=c++ flag support.

Being able to specify the extension to use for code would probably be the simplest solution opposed to figuring out the language flags for various compiler versions.
This could be a dropdown? in scratch'es Options tab with options like .c, .cpp

@ethteck
Copy link
Member

ethteck commented Jul 12, 2024

some info here: all gccs seem to accept -xc++, but we hard-code -lang c for many of the ps1 gcc compilers when we run the system c preprocessor. for c scratches, this seems necessary, at least on older GCCs. more investigation may need to be done there, but a "quick" fix is to just create additional Compilers for any case we need C++ support for these

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