#86945 - agentq - Sat Jun 10, 2006 9:55 pm
I may have found a problem with DevkitPro r19. It involves static initialised objects.
If I have an object such as this:
Then later print out the contents of foo.a, it's value is 0 rather than 123, as you might expect.
It seems as if the global object constructors are not being called.
I discovered this which trying to build ScummVM with r19. Could this be an issue with my installation? Could I have bits of an older version of DevkitPro around? I installed it using the Windows installer and it seemed to go fine, and it's definately calling the new compiler.
If I have an object such as this:
Code: |
class Test {
public: int a; Test(int a) { this->a = a; } }; Test foo(123); |
Then later print out the contents of foo.a, it's value is 0 rather than 123, as you might expect.
It seems as if the global object constructors are not being called.
I discovered this which trying to build ScummVM with r19. Could this be an issue with my installation? Could I have bits of an older version of DevkitPro around? I installed it using the Windows installer and it seemed to go fine, and it's definately calling the new compiler.