Skip to content
This repository was archived by the owner on Jun 24, 2022. It is now read-only.

No C++ 'new project' #393

Open
LoganDark opened this issue Nov 29, 2018 · 12 comments
Open

No C++ 'new project' #393

LoganDark opened this issue Nov 29, 2018 · 12 comments

Comments

@LoganDark
Copy link

C++ support is advertised, however there are no issues/pull requests about it, there is no 'empty' project in the app itself, and there is no documentation regarding it anywhere.

What's going on? Is C++ actually supported, or are you just assuming it's the same as C?

@yurydelendik
Copy link
Collaborator

What's going on? Is C++ actually supported, or are you just assuming it's the same as C?

C++ and C are using the same clang service. Minor changes will be required in the build.ts code of C 'empty' project. Having an 'empty' project for C++ may be useful.

@LoganDark
Copy link
Author

What changes would be required? Sorry, I'm not well-versed in this sort of thing.

@yurydelendik
Copy link
Collaborator

file names

@LoganDark
Copy link
Author

That's it?

@yurydelendik
Copy link
Collaborator

screen shot 2018-11-29 at 12 21 22 pm

@LoganDark
Copy link
Author

Ty!

@LoganDark LoganDark changed the title C++ support No C++ 'new project' Nov 29, 2018
@rabbitHX
Copy link

@yurydelendik Hi, only single c(c++) file compile is workable now, how to compile project with header files? I read source code of clang-heroku-slug and WebAssemblyStudio but didn't find support for header file.

@yurydelendik
Copy link
Collaborator

The "headers" work is done at #365

@LoganDark
Copy link
Author

#include is literally copy-paste why do you need a separate fix for it wtf

@yurydelendik
Copy link
Collaborator

#include is literally copy-paste why do you need a separate fix for it wtf

copy-paste of what? what's a separate fix?

@LoganDark
Copy link
Author

LoganDark commented Dec 17, 2018

#include "filename" is (and always has been) replaced by the preprocessor with the contents of filename

The separate fix that I don't know why you need is #365, which supposedly makes #includes work.

The reason why I don't know why you need it is that, if one file works, #includes should too, since it just compiles (or puts) all the code into one file (not to be confused by the actual compilation step) like copy-paste...

edit: Wait, is that fix just 'supporting' .hpp files in the editor? How was that not already supported? I'm really confused now...

@yurydelendik
Copy link
Collaborator

#include "filename" is (and always has been) replaced by the preprocessor with the contents of filename

Not that simple: #include works in combination with #ifdef to stop recursions. Also, the proposed copy'n'paste hack does not provide debug information: original file line numbers.

@LoganDark In the future we also need to support "inclusion" of custom libraries (headers files + wasm objects/libs), so #365 will be needed.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants