Silviu-Marian
Silviu-Marian

Reputation: 10927

Dll compiled under Windows 7 doesn't work in Windows XP

I'm building an addon for NodeJS.

Works just right in Windows 7. But in Windows XP it won't load, doesn't open it no matter what I do. ERROR: Unable to load shared library c:\tst\tst.node

I'm compiling the DLL from VS2010 with the following options:

What's wrong? Is this UTF-8 related?

Upvotes: 1

Views: 2665

Answers (2)

Scott Langham
Scott Langham

Reputation: 60431

Before including windows headers (usually in stdafx.h), try setting the windows version macros to ensure you're not using api's that are only available after XP.

http://msdn.microsoft.com/en-us/library/windows/desktop/aa383745(v=vs.85).aspx#setting_winver_or__win32_winnt

Upvotes: 2

Stefan
Stefan

Reputation: 43575

The best tool to diagnose such problems is the dependency walker. Open your dll in dw and you'll immediately see why it won't load: most likely there are some dlls/libs missing your dll depends upon.

Upvotes: 3

Related Questions