c - What is the correct way to add .dll file in a MSVC 2010 project -


i need use library libmpsse.dll in win32 console application project in msvc 2010. after writing code copied dll in folder .cpp file present. able compile issue having linking error:

libmpsse.dll : fatal error lnk1107: invalid or corrupt file: cannot read @ 0x308

is problem dll or there problem dll path. how add dll projects?

they have not provided .lib file. complete code here

these usual steps link dll:

  1. include dll's header file in of source files need use functions dll. you'll typically need make sure build environment's include path contains location of header file. in ide can using additional include directories configuration setting.
  2. pass dll's .lib file linker. in ide adding .lib file additional dependencies setting. , you'll typically need add path .lib file additional library directories setting.
  3. having done that, program should compile , link. make run, you'll need ensure dll can found @ runtime. simplest way make happen put in same directory executable file.

my guess, looking @ error message, in step 2 passed .dll linker rather passing .lib file.


Comments

Popular posts from this blog

php - Why I am getting the Error "Commands out of sync; you can't run this command now" -

linux - Does gcc have any options to add version info in ELF binary file? -

java - Are there any classes that implement javax.persistence.Parameter<T>? -