0

I am linking dll with my app. It seems that there are no errors and it's being recognised in a good way.

but I am having an error of LINK 1181:

Error   3   error LNK1181: cannot open input file 'c:\users\xxx\Project\Release\mydll.lib   

What could be the problem for that?

Update: I am getting a new message now which says the program can't start because tulips.dll is missing from your computer. Try reinstalling the program to fix this problem!!!!

MelMed
  • 1,702
  • 5
  • 17
  • 25
  • I do not understand the question. Does mydll.lib exist in the exact path that the linker is asking about? And what do you mean by a tulips file? BTW, through project settings you can control where your library is created. – drescherjm Oct 03 '13 at 14:43
  • @drescherjm the dll file is existing in the same path which is included in the error file. – MelMed Oct 03 '13 at 14:57
  • The dll file does not count. You do not link against dll files. Does the file c:\users\xxx\Project\Release\mydll.lib" exist? – drescherjm Oct 03 '13 at 15:03
  • If the file does exist are you mixing 32 / 64 bit? You can not link a 32 bit lib to a 64 bit application or a 64 bit lib to a 32 bit application. – drescherjm Oct 03 '13 at 15:06

1 Answers1

0

It seems that mydll.lib can not be found by the project. LNK1181: The linker could not find filename because it does not exist or the path was not found. => From the project, can you 2x click on it and see if VS2010 finds it?

lolando
  • 1,721
  • 1
  • 18
  • 22
  • I don't understand: which project shall I double click on? the dll or the app? – MelMed Oct 03 '13 at 14:55
  • please check on the project referring to the `mydll.lib` – lolando Oct 03 '13 at 14:57
  • Just open up explorer and see if the file "c:\users\xxx\Project\Release\mydll.lib" exists – drescherjm Oct 03 '13 at 15:04
  • can you see the mydll.lib in the Solution explorer? if yes, 2x click on it: if found, VS will show you the binary representation. If not found, VS will display you a message similar to "lib not found" – lolando Oct 03 '13 at 15:05
  • @aah the mydll.lib is not existing. Only the .dll is existing!! – MelMed Oct 03 '13 at 15:08
  • @drescherjm how can I generate then the .lib file? – MelMed Oct 03 '13 at 15:09
  • 1
    @MelMed [answered here](http://stackoverflow.com/questions/9360280/how-to-make-a-lib-file-when-have-a-dll-file-and-a-header-file) – lolando Oct 03 '13 at 15:10
  • Visual Studio does create an import lib if you export your functions / classes correctly. I believe you do not get an import lib if nothing is exported. – drescherjm Oct 03 '13 at 15:31