debug_static & release_static configurations use DLL runtime

A general discussion forum.
Posts: 5
Joined: 22 Jul 2010, 12:02

debug_static & release_static configurations use DLL runtime

Postby rbass » 22 Jul 2010, 14:26

Version poco-1.3.6p2
Os: Windows
IDE: VS 2008
projects: Foundation_vs90.vcproj Net_vs90.vcproj ...

Hello Poco experts.

debug_static and release_static configurations use DLL version of run-time.
Is it on purpose (what are the reasons if so)? Poco is so elegant and thoughtful library, that I want to understand the point before changing it. (My goal is standalone module with no external dependencies)


Posts: 1268
Joined: 11 Jul 2006, 16:27
Location: Austria

Re: debug_static & release_static configurations use DLL runtime

Postby guenter » 23 Jul 2010, 06:48

The only reason is that the Poco::ClassLoader class will no longer work when the application and its plugins are linked with the static runtime.* If you don't use the class loader, feel free to link against the static runtime libs.

* The class loader mechanism passes a std::map to the plugin to fill with meta information allocated with new on the heap. When using static runtime libs, the plugin (DLL) will have a different C/C++ heap than the application, which causes bad things when the application later needs to free the meta information. Generally, when you use the static C/C++ runtime with DLLs, you won't be able to exchange standard library objects (std::string, std::vector, std::map, etc.) between your application and the DLL.

Return to “General Discussion”

Who is online

Users browsing this forum: No registered users and 4 guests