tags:

views:

777

answers:

1

I am trying to build a windows service that includes a Lua component, and links with Lua's shared libraries. I am building the code in Eclipse/CDT with MinGW. It builds fine, but when I run it, I get "Application failed to Initialize Properly (0x80000003). Click OK to terminate".

I am looking for clues as to what might be going on. A Hello World program compiles and runs fine, so there are no basic environment issues (I hope!). BTW, I am running on XP Home.

Update:

OK, I have figured out, by some guesswork, what was going on, and thought I'd post this for the benefit of others who might run into a similar problem - I think the lua DLL I was linking to, at runtime, was a different version than the one I built with. This caused the app initialization to fail I guess. When I made them to be the same file, things started working. I have not looked into why this would cause app init to fail, but I guess some symbol being at a different address or something? Or could it be that the DLLs were built with different tool chains?

+2  A: 

This might be caused by not having permissions to access the DLLs required by the application. Are you logged in as an Administrator or member of the Administrator group?

Try logging in as Administrator to see if the problem goes away. This will help determine if it's a permissions issue, and then you can explore that further.

You could also try using the Dependency Walker (depends.exe) to see if this highlights any problems.

LeopardSkinPillBoxHat
+1 for dependency walker. That has saved me a lot of frustration trying to solve these kinds of problems.
Adam Pierce