|
What can happen if I compile my application with lua statically linked, and load a lua module that is dynamically linked to lua.dll? Should (or must) both be linked the same way?"Must" is the answer.
Nah... I don't believe so, and here's why: Problems occur if (and only if) there's somehow any double admin. So, unless Lua itself contains any static data - which I don't believe it does - you could actually get away with a system that has Lua statically linked (for its own purposes) and also uses another module dynamically linked to Lua as long as the double admin situation is avoided. You can do this if the module that is dynamically linked to lua.dll uses a dynamically linked runtime, and your app (with the statically linked Lua) does the same thing. In this case both parties would be running on the same (shared) runtime dll and everything should be alright. Having said that, I agree it's probably best to either go for an all-out dynamically or an all-out statically linked scenario. Simply because it's probably a bit easier on the brain [:-)]. Ashwin. -- no signature is a signature.