> when you built your first dll, visual studio linker would have
> generated a .lib file as well.. you need to include this in your
> second dll through the project-settings->linker->input->additional
> dependencies
Thanks, it works.
But I have two more questions.
If I add *.lib file to additonal dependencies then __declspec( dllimport )
in the second project
isn't needed any more. What's more If I have *.lib file I don't need *.dll
file of first project.
It seems that your solution bases on static library not on dynamic one.
I am glad that you solved my problem but I am still curious how to get
the same effect but with dlls.
Once again thanks
Gawel
Vinayak Raghuvamshi - 28 Jun 2004 01:58 GMT
> > when you built your first dll, visual studio linker would have
> > generated a .lib file as well.. you need to include this in your
[quoted text clipped - 7 lines]
> isn't needed any more. What's more If I have *.lib file I don't need *.dll
> file of first project.
That is not correct. Why don't you try deleting the .dll and then see
if your application still launches?
> It seems that your solution bases on static library not on dynamic one.
Just because a file is a .lib does not mean you are using "static
linkage".
the .lib in this instance is just a skeleton that defines the entry
points that the loader will then load from the dll at runtime.
I would suggest that you read up on fundamentals of dlls, libs and how
they work. MSDN has a few good links that you can pursue....
-Vinayak