Click here to Skip to main content
15,892,697 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi All,

How do I get a static link library to load a dynamic link library? :confused:

Eg.
The DirectX libs do that and I was wondering how I can do the same.

I am using visual studio 2010.
When I tried just linking to the generated lib I could delete the dll and there was no problem but when I just add reference to the project and then I try deleteing dll, there is a message saying the ???.dll does not exist.

How do I link to the static library that then loads the dll for me?
That way I dont have to hand out my full project for someone else to use the dlls.

I know there are lot's more people here MORE knowldgeble on C++ than me, so just point out any thing that is wrong here,

Thanks for the answers.:thumbsup:

Never say Never,
Because Never comes too soon.
Posted
Updated 5-Dec-10 22:52pm
v2
Comments
Dalek Dave 6-Dec-10 4:52am    
Edited for Grammar, Spelling and Readability.

1 solution

Your question isn't really clear at all. Are you creating a dll for your client to use or are you using a third-party dll ?
It seems that you are developping a dll and do not know exactly what to distribute, am I right ? If yes, you have to supply the generated .lib file, the headers files and the dll.

If this doesn't answer your question, please clarify your question because it doesn't make too much sense right now.
 
Share this answer
 
Comments
ryan20fun 6-Dec-10 4:47am    
You are probably right it isnt very clear,
ive got a dll project in vs2010 and a app that references that dll project
and i read somewhere that you make a static lib project to load the dll project and i dont know what to do about that, becouse i want to hand out my dll but dont whant to hand out the dlls source code, ans explained in question, i tried just linking to lib and not refencing the project and it no longer needed dll to be there, unless i did something wrong, very sorry for this long comment.
Cedric Moonen 6-Dec-10 4:49am    
This is still not clear. Why do you want to hand out the sources of your dll ? There's no need for that. As I said in my previous reply, just distribute the library file and the header files. You don't need to distribute the cpp files.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900