Click here to Skip to main content
16,010,022 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
is it possible to use lib and dll files without including headers.

I need to use namespace and classes from dll or lib files without adding headers in includes in my project .
Posted
Updated 30-Mar-15 1:07am
v2

Yes. But you would have to handle all the required definitions that the header files contain yourself, and there is a good chance of getting something wrong - at which point your app will not work correctly.
 
Share this answer
 
There is not a lot of information in your question. There may be a way to call a method in a dll using runtime dynamic linking:
http://stackoverflow.com/questions/554551/call-function-in-c-dll-without-header[^]

In the case of a lib:

http://stackoverflow.com/questions/11852329/linking-library-without-a-header-file[^]

But why? Using an approach such as this will be difficult to maintain.
 
Share this answer
 
v2
Comments
Mohibur Rashid 30-Mar-15 5:52am    
Probably, building generic solution, building
[no name] 30-Mar-15 6:22am    
Makes no sense. You have given no explanation of what you are trying to do.
Mohibur Rashid 30-Mar-15 6:38am    
Hey, this not my question. But i am trying to achieve something where i have to go through something similar. Cause I am planning to load function based on script. So, my approach is to develop a common structure, that structure would guide me rest of the way.
[no name] 30-Mar-15 6:42am    
So it seems this has nothing to do with the original question then? I'm not sure why you asked it.

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