|
From: worlman385 on 12 Apr 2008 20:42 I have a library build as a DLL with all the function exported like - ============= LIB_API BOOL CreateLibInstance(); LIB_API HRESULT PostRequest(string const& start, string const& end); LIB_API HRESULT LoadXMLData(LPCTSTR tszXMLFileName); LIB_API HRESULT GetTVData(); ============= but my friend told me to create a static Library instead of DLL, he said if I create a DLL - I will need to / have 1) .DLL 2) .Lib but for static library, I only create 1 .Lib file. which is easier files, but I looked into the DEBUG directory, I only found a DLL created for my DLL library project. Now I am confused. Did my friend told me wrong?? since my friend has alot experience on windows programming. ================ For me I believe static library (DLL) and static library (.Lib) is same thing expect DLL i need to export each function, which has abit more work. (since static library I do it the same as regular C++ programming) But I am still confused that a DLL project will have a DLL + a .Lib and I had been told it's less handy as static library.
From: David Lowndes on 13 Apr 2008 04:47 >I have a library build as a DLL with all the function exported like - > >============= >LIB_API BOOL CreateLibInstance(); >LIB_API HRESULT PostRequest(string const& start, string const& end); >LIB_API HRESULT LoadXMLData(LPCTSTR tszXMLFileName); >LIB_API HRESULT GetTVData(); > >============= >but my friend told me to create a static Library instead of DLL, he >said if I create a DLL - I will need to / have >1) .DLL >2) .Lib > >but for static library, I only create 1 .Lib file. which is easier > >files, but I looked into the DEBUG directory, I only found a DLL >created for my DLL library project. I'd assume your exports aren't actually exported. That's what usually happens when you don't automatically get a lib file produced for your DLL. >Now I am confused. Did my friend told me wrong? No, it's just not the full story - do we ever know the full story about anything? ;) >For me I believe static library (DLL) That term is confusing - don't use it. There are implicitly linked DLLs and dynamic ones (where the caller needs to use LoadLibrary), but no "static DLL". Dave
From: Tom Serface on 13 Apr 2008 10:58 I typically only create DLLs if the same code needs to be used by more than one program that may be running at the same time or if I don't need the code loaded all the time or for resources. Even though it's fairly easy to install them, it's also easy to have old versions laying around from previous installs or other problems and I just don't see the benefit. Static linking will make your .EXE look larger, but the smaller .EXE with DLLs is just a trick. Bottom line: it's pretty much up to you. Tom <worlman385(a)yahoo.com> wrote in message news:anl2045tgmucbal01u00suqmna9oo6br5e(a)4ax.com... >I have a library build as a DLL with all the function exported like - > > ============= > LIB_API BOOL CreateLibInstance(); > LIB_API HRESULT PostRequest(string const& start, string const& end); > LIB_API HRESULT LoadXMLData(LPCTSTR tszXMLFileName); > LIB_API HRESULT GetTVData(); > > ============= > but my friend told me to create a static Library instead of DLL, he > said if I create a DLL - I will need to / have > 1) .DLL > 2) .Lib > > but for static library, I only create 1 .Lib file. which is easier > > files, but I looked into the DEBUG directory, I only found a DLL > created for my DLL library project. > > Now I am confused. Did my friend told me wrong?? since my friend has > alot experience on windows programming. > > ================ > > For me I believe static library (DLL) and static library (.Lib) is > same thing expect DLL i need to export each function, which has abit > more work. (since static library I do it the same as regular C++ > programming) > > But I am still confused that a DLL project will have a DLL + a .Lib > and I had been told it's less handy as static library. >
|
Pages: 1 Prev: Compiler chooses conv ctor - why? Next: #pragma comment lib |