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

Omitting curly braces breaks the #pragma export #140

Open
cjmalloy opened this issue Sep 3, 2020 · 2 comments
Open

Omitting curly braces breaks the #pragma export #140

cjmalloy opened this issue Sep 3, 2020 · 2 comments

Comments

@cjmalloy
Copy link

cjmalloy commented Sep 3, 2020

If you skip curly braces like so:

    for (int i = 0; i < 3; i += 2)
    for (int j = 0; j < 3; j += 2) {
        // code
    }

this will prevent #pragma glslify: export(f) from name mangling f. Instead of being renamed to f_0 in the output, it is left as just f. Later when you try to use it in an import, it gives you an error saying no matching overloaded function found. Adding the braces is a workaround:

    for (int i = 0; i < 3; i += 2) {
    for (int j = 0; j < 3; j += 2) {
        // code
    }}
@thebiltheory
Copy link

I am running into the following issue. Is there a chance this might be related @cjmalloy ?

WARNING: 0:24: 'glslify' : unrecognized pragma
ERROR: 0:46: 'snoise' : no matching overloaded function found
ERROR: 0:58: 'snoise' : no matching overloaded function found

@cjmalloy
Copy link
Author

cjmalloy commented Mar 7, 2023

Could be, you need to post code.

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