Index: /bdm/user_info.h
===================================================================
--- /bdm/user_info.h (revision 357)
+++ /bdm/user_info.h (revision 358)
@@ -16,5 +16,9 @@
 using namespace libconfig;
 
-#define UIREGISTER(class_name) template<> Particular_UI<class_name>& Particular_UI<class_name>::ui = Particular_UI<class_name>(#class_name)
+#ifdef BDMLIB 
+#define UIREGISTER(class_name) template<> const Particular_UI<class_name>& Particular_UI<class_name>::ui = Particular_UI<class_name>(#class_name) 
+#else
+#define UIREGISTER(class_name)
+#endif
 
 #define ASSERT_UITYPE(S,Type) it_assert_debug(S.getType()==Setting::Type, string("Wrong setting type, see input path \"")+string(S.getPath())+string("\""))
@@ -314,6 +318,5 @@
 template<typename T> class Particular_UI : private UI
 {
-	// to permit acces to the Particular_UI<T>::ui to the UI class
-	friend UI;
+	public:
 
 	//! default constructor, which is intentionally declared as private
@@ -324,5 +327,5 @@
 	//! the only instance of this class (each type T has its own instance)
 	//! which is used as a factory for processing related UI
-	static Particular_UI<T>& ui;	
+	static const Particular_UI<T>& ui;	
 
 	bdmroot* new_instance() const
Index: /bdm/estim/arx.h
===================================================================
--- /bdm/estim/arx.h (revision 357)
+++ /bdm/estim/arx.h (revision 358)
@@ -16,4 +16,5 @@
 #include "../stat/libFN.h"
 #include "../stat/libEF.h"
+#include "../user_info.h"
 
 namespace bdm {
Index: /bdm/estim/libKF.cpp
===================================================================
--- /bdm/estim/libKF.cpp (revision 357)
+++ /bdm/estim/libKF.cpp (revision 358)
@@ -1,5 +1,4 @@
 
 #include "libKF.h"
-#include "..\user_info.h"
 
 namespace bdm{
Index: /bdm/estim/arx.cpp
===================================================================
--- /bdm/estim/arx.cpp (revision 357)
+++ /bdm/estim/arx.cpp (revision 358)
@@ -1,4 +1,3 @@
 #include "arx.h"
-#include "..\user_info.h"
 
 namespace bdm {
Index: /bdm/estim/libKF.h
===================================================================
--- /bdm/estim/libKF.h (revision 357)
+++ /bdm/estim/libKF.h (revision 358)
@@ -18,4 +18,5 @@
 #include "../stat/libEF.h"
 #include "../math/chmat.h"
+#include "../user_info.h"
 
 namespace bdm
Index: /bdm/user_info.cpp
===================================================================
--- /bdm/user_info.cpp (revision 357)
+++ /bdm/user_info.cpp (revision 358)
@@ -110,5 +110,5 @@
         return;
 
-    string link = (string) potential_link;
+    string link = (const char*) potential_link;
     size_t aerobase = link.find('@');
     if ( aerobase != string::npos )
@@ -397,5 +397,5 @@
 {
     ASSERT_UITYPE(element,TypeString);
-    str = (string) element;
+    str = (const char*) element;
 }
 
Index: /bdm/stat/libEF.cpp
===================================================================
--- /bdm/stat/libEF.cpp (revision 357)
+++ /bdm/stat/libEF.cpp (revision 358)
@@ -3,5 +3,4 @@
 #include <itpp/base/bessel.h>
 #include "libEF.h"
-#include "..\user_info.h"
 
 namespace bdm{
Index: /bdm/stat/libDS.h
===================================================================
--- /bdm/stat/libDS.h (revision 357)
+++ /bdm/stat/libDS.h (revision 358)
@@ -17,5 +17,5 @@
 #include "libBM.h"
 #include "libEF.h"
-
+#include "../user_info.h"
 
 namespace bdm {
Index: /bdm/stat/loggers.cpp
===================================================================
--- /bdm/stat/loggers.cpp (revision 357)
+++ /bdm/stat/loggers.cpp (revision 358)
@@ -30,5 +30,5 @@
 {	
 	// TODO tady se natvrdo ocekava existence stringu, nejsou zadne defaulty.. je to tak OK?
-	string itfilename = (string)root["filename"];
+	string itfilename = (const char*)root["filename"];
 	maxlen = root["maxlen"];
 }
@@ -162,5 +162,5 @@
 {	
 	// TODO tady se natvrdo ocekava existence stringu, nejsou zadne defaulty.. je to tak OK?
-	dirname = (string)root["dirname"];
+	dirname = (const char*)root["dirname"];
 	maxlen = root["maxlen"];
 	scalarnames.set_length(0);
Index: /bdm/stat/libEF.h
===================================================================
--- /bdm/stat/libEF.h (revision 357)
+++ /bdm/stat/libEF.h (revision 358)
@@ -17,5 +17,5 @@
 #include "libBM.h"
 #include "../math/chmat.h"
-#include "../user_info.h"
+//#include "../user_info.h"
 
 namespace bdm
Index: /bdm/stat/loggers.h
===================================================================
--- /bdm/stat/loggers.h (revision 357)
+++ /bdm/stat/loggers.h (revision 358)
@@ -15,5 +15,5 @@
 
 #include "libBM.h"
-#include "..\user_info.h"
+#include "../user_info.h"
 
 namespace bdm{
Index: /bdm/stat/libBM.h
===================================================================
--- /bdm/stat/libBM.h (revision 357)
+++ /bdm/stat/libBM.h (revision 358)
@@ -195,5 +195,4 @@
 };
 
-UIREGISTER(RV);
 
 //! Concat two random variables
Index: /bdm/stat/libDS.cpp
===================================================================
--- /bdm/stat/libDS.cpp (revision 357)
+++ /bdm/stat/libDS.cpp (revision 358)
@@ -1,5 +1,5 @@
 
 #include "libDS.h"
-#include "..\user_info.h"
+//#include "..\user_info.h"
 
 using namespace bdm;
Index: /bdm/CMakeLists.txt
===================================================================
--- /bdm/CMakeLists.txt (revision 357)
+++ /bdm/CMakeLists.txt (revision 358)
@@ -6,4 +6,7 @@
 SET(BdmUI libconfig/libconfigcpp.cc libconfig/grammar.c libconfig/libconfig.c libconfig/scanner.c user_info.cpp user_info.h )
 
+# add BDMLIB compile flag
+ADD_DEFINITIONS(-DBDMLIB)
+
 # Normal BDM library
 add_library (bdm STATIC bdmroot.cpp bdmroot.h itpp_ext.cpp itpp_ext.h osutils.cpp osutils.h ${BdmMath} ${BdmStat} ${BdmEstim} ${BdmUI})
