0

My client provide me a dll file without any lib file for the project, so I create a lib file from this link.

Now after successfully generating a lib file I follow the answer of this link

Now after following these two links, I simply build my code in which I have not define any thing till now.My code build successfully, but when I build my code after calling a function from my lib file I got this:-

error C3861: 'upgStop': identifier not found

where upgStop is the function that I call.

It seems something went wrong while linking the lib file. So, guys please tell the exact solution of this problem.

Community
  • 1
  • 1

1 Answers1

0

'Identifier not found' is a compiler error (not linker error) which implies the header file which specifies upgStop() hasn't been #included in the file from which the function is being called.

Do you have a header file which contains the declaration/prototype of ugpStop()?

Once this is resolved, you may have linker errors isntead - as you either need to link against the dll/lib, or load it dynamically using "LoadLibrary()" (and then find functions within the loaded library by their string name.

parade
  • 106
  • 3
  • potentially, you could declare the ugpStop() at the top of your file (prefaced with "extern"), then let the linker go and find it in the DLL that you're linking against (via the .lib and def file). i.e. add "extern void ugpStop();" to the top of your file. – parade Aug 07 '14 at 07:42
  • user 3916531:- I apply your suggestion , but even after putting extern void ugpStop(); at top nothing changes. I am still getting same error – Tabish Saifullah Aug 07 '14 at 08:41
  • Igot only dll nothing alse from my client – Tabish Saifullah Aug 07 '14 at 08:47