abcdefgqwerty2

In vs2005 .net im trying to use 3 unmanaged plain .dlls written in c++ in a plani win32 app.
Ok I have a folder at the path c:\folder and inside there i have folder\include and folder\lib. I added c:\folder\lib to the vc++ library references, and the c:\folder\include to the include references. Then in the c++ additional includes I have c:\folder\includes. In linker general additional library directories I have c:\folder\lib. input additional dependencies I have say file1.dll file2.dll file3.dll just like that. Finally I #include the 3 .h files for those.
When I compile it everything is ok, but when it runs it says dll not found. Any clue why
Linker compiler errors with .dlls suck.
Any good tutorials for setting up .dll in .net


Re: Visual C++ Language compiler cant find dll

Mike Danes

It's not enough to add the lib folder in project settings. You also need to add the lib files to Additional Dependencies field on the Linker Input page.

Now the question is: do you have 3 lib files like file1.lib, file2.lib and file3.lib because all you are mentioning is dll files. You need lib files.





Re: Visual C++ Language compiler cant find dll

abcdefgqwerty2

Yeah I have file1 file2 and file3. I have the .dll and the .lib. I have the .libs included in the additional dependencies field already.
Thanks for trying to help getting these to work is turning out to be harder then writing the program will be.




Re: Visual C++ Language compiler cant find dll

abcdefgqwerty2

I also have the .h files which I #included. The linker is not liking me and I dont know what I did thats wrong.




Re: Visual C++ Language compiler cant find dll

Mike Danes

What errors are you getting from linker





Re: Visual C++ Language compiler cant find dll

abcdefgqwerty2

At execution time it says application has failed to start because file .dll was not found. Reinstalling application might fix the problem. I dont understand why its not finding them.




Re: Visual C++ Language compiler cant find dll

Mike Danes

So it's not a linker error. You need to put the dll files in the same directory with the exe file.





Re: Visual C++ Language compiler cant find dll

abcdefgqwerty2

Ah I figured it out. If anyone has same problem make sure in debugger menu you add .dll folder location to your environment.