I was just wondering if anyone had come across this. I've been testing a new engine I'm writing under Linux and have encoundered a few problems.
The core os the system is a core shared object which sets up the shared memory manager. To accomplish sharing the memory manager (and creating the log files etc) I have a bunch of code in the initialization section of various units e.g
[pascal]
initialization
GetMemoryManager(MemManager);
end.
[/pascal]
Now I was getting a weird access violation so I put in a whole bunch of Writeln statements in the initialization sections to check they were being called. And guess what, they weren't :!:
This appears to be different behavior from Free Pascal under windows at the engine works fine in windows under Delphi 5 and 2006 and Free Pascal 2.0.2.
Anyone come across this before :?:
I could work around this but my current design relys on these initialization sections being called.
BTW Initialization sections are called in exe's under linux as the Logger class I am using is a modified one from the JEDI-SDL packed which we know works under Windows, Linux and OSX.
Bookmarks