Hello.
I'm trying the following scenario:
- StartNewModule();
- CompileGlobalVar("Foo@ gFoo;");
- AddScriptSection(); with minimal script like `void main() { gFoo.bar(); }`
- BuildModule();
I receive build error Error = No matching symbol 'gFoo'
I tried using both single section/multiple sections, I tried changing order of the global var/script file and I tried calling Build() in between. The result is always the same. Did I miss anything? Of course I checked each single function return and the logfile written by the log callback, no indication of a problem. I was also running under Debug.
I encountered this while working on project https://github.com/RigsOfRods/rigs-of-rods which had successfully used AngelScript for years. All other systems function normally, there is already one running module at the time of trying this. For what it's worth, the code change is here: https://github.com/only-a-ptr/rigs-of-rods/commit/b62281b23f4a7a3bf3bc653060d25cfe1f3240a2 .
I searched the internet and this forum, but got very little hits. I found and heeded https://www.gamedev.net/forums/topic/644188-angelscript-2263-global-property-issues-solved/5069638/ but I don't think it's relevant here.
UPDATE: I tried to bypass our customized CScriptLoader and call AddScriptSection() directly with a test code snippet. Same result.