   another DLL question (dll.lib vs no lib)
  HiI have classes in DLLs, and those classes are used by my main program.  Things work fine if I link to the DLL import library.  If I don''t link to the import library then I can''t access my class member functions.  I guess that seems logical but is there any way around this (without using interfaces/COM/abstract classes etc)?If there is no other way and I just have to link the EXE to the import library, if I later go and modify the class (only the implementation details of the members and NOT the external/visible interface) does the EXE have to be linked again?  Do the symbol names change, given that I''ve only changed internal details?  Can I add new members without having to link the EXE again?Because if I have to link the EXE again, well, it seems to defeat the purpose.  I want to be able to give people an EXE and a DLL.  The EXE is mostly complete/doesn''t change, but the DLL will be worked on (but there probably won''t be any new members added.. but it''s not impossible; obviously if new members are added there''ll be a new EXE that uses these members).Is this doable?cheerssam 
quote:Original post by izzo   I have classes in DLLs, and those classes are used by my main program.  Things work fine if I link to the DLL import library.  If I don't link to the import library then I can't access my class member functions.  I guess that seems logical but is there any way around this (without using interfaces/COM/abstract classes etc)?Yes, but it's usually not worth the hassle. Doing so requires manually patching function pointers with GetProcAddress() which is annoying. And the import strings will be mangled, so doing this is both obfuscated and fragile. And because the producer interface and consumer interface are independently generated you expose yourself to all sorts of other problems you can get with code duplication.quote:If there is no other way and I just have to link the EXE to the import library, if I later go and modify the class (only the implementation details of the members and NOT the external/visible interface) does the EXE have to be linked again?If you only change the implementation of the members and don't change the interface at all, the exe shouldn't need to be linked against the DLL lib again.quote:Do the symbol names change, given that I've only changed internal details?No.quote:Can I add new members without having to link the EXE again?Depends on your compiler and what kind of new members. For new member functions, then probably not. For new member variables then you'll probably need to re-link. (Of course you can mitigate this effect by using a pimpl technique.)Edit: Actually, if you add member variables, you shouldn't just re-link, you should go the full route and rebuild any object files in the executable that use the imported class.   [edited by - SiCrane on February 12, 2004 4:30:16 AM];  Thanks SiCrane!I''ve been trying to find these things out by searching the forums but I have yet to see a post that answers them so succinctly.Thanks very much again!sam