View Gen~ C++ source code message in Max 8
Hi,
There was a message one can send to gen~ object to view C++ source code. I'm pretty sure it was in Max 6. And now I'm on Max 8 facing a problem, which needs to open C++ source code. The message just like exportcode message with an exception that it opens internal Max text editor.
The reason I need it is that I have an error in Max window and it references the line number, which is apparently different when exporting code, so I need to view an original source code.
Can someone write this message to me so I can view a source code?
Best regards,
Ruslan
full_source_code shows you the generated .cpp file in a popup window in Max -- if you need to see the headers etc, you might prefer to use exportcode where you can view all the .cpp and .h files using a more full-featured code editor. In either case, every edit to the gen~ patch will update the .cpp and .h files.
Thank you very much Graham, now I can file a Gen~ bug report :)
Graham, I get this, when trying to use this message with gen~ object:
gen~: doesn't understand "fullsourcecode"
Is there any other way to see the exact line where the error happens? Here is an error:
gen~: 11805:54:use of undeclared identifier 'bch'
I guess you used the message with no underscore: "fullsourcecode" instead of "full_source_code
full_source_code seem to be working, but in my case I got:
gen.patcher: no fullcode found
I think the reason of it is that I got a compilation error:
gen~: 11805:54:use of undeclared identifier 'bch'
The codex compilation went fine, but this one appears when I turn audio processing on. So I even don't know what happens on the line 11805.
Don't know about compilation error, but the usual procedure is to exportcode first and then the full_source_code message. If you can generate the right .h and .cpp files you can open them with an editor or see directly with the message.
Riccardo, but to see the exported code it should compile inside Max first. That's why I need to view the source code, because the line of code that error refers to in exported code contains only a bracket in it. I assume I need to view a precompiled full_source_code, as it is the only way I can diagnose the issue.
Ok, now I understand the logic, I should export code first and then use full_source_code message. Thank you!
The reason I was confused is that the error is on the other line than reported by Max window. I compiled an erroneous code and the error appears on the line 9382 and not on the line 11805. It states:
/Users/ruslanyusipov/Developer/macOS/SampleProjects/saser/misc/exported-code/C74_GENPLUGIN.cpp:9382:54: error: use of undeclared identifier 'bch'
t_sample Fc = safediv(((t_sample)2978.9090909091), bch);
It seems a bug in Max 8.