Helping linking to a DLL

I've been using the older Intel math library with a plugin just fine but when I try and use it in a standalone build, I get the "not a valid Win32 application" error.

In Introjucer, I add a line to the Extra Compiler Flags:

   /I"C:\Progam Files\Inel\plsuite\Include"

and also to Extra Linker Flags:

  /DLL nsp.lib

This is on WinXP and a VS2008 target (using Express).

Again, the method has been working fine with my VST build (DLL has to be in host directory of course) so my operation with the library is fine. It's just that the act of linking the lib when building an exe is producing an invalid exe.

I confirmed with a fresh build of the Juce Hello World project. exe runs when fresh, complains when I just add the above.

Any tips?

FYI the introjucer has a place specially for adding include paths - there's no need to use /I directly. And personally, I always prefer to use the "#pragma comment lib" syntax for adding a .lib file, rather than putting it in the project.

(Don't know why it'd not work for you though)

Ah, include paths down in each target instead a generic compiler flag at the platform level, got it. Looks much cleaner thanks.

For some reason, switching to the #pragma comment(lib, "nsp") form solved the problem! So, thanks again:)