Index: kjs/ustring.h
===================================================================
--- kjs/ustring.h	(Revision 515389)
+++ kjs/ustring.h	(Arbeitskopie)
@@ -278,15 +278,15 @@
      * Note: feel free to contact me if you want to see a dummy header for
      * your favorite FooString class here !
      */
-    UString(const QString&);
+    KJS_EXTERNAL_EXPORT UString(const QString&);
     /**
      * Convenience declaration only ! See UString(const QString&).
      */
-    UString(const DOM::DOMString&);
+    KJS_EXTERNAL_EXPORT UString(const DOM::DOMString&);
     /**
      * Convenience declaration only ! See UString(const QString&).
      */
-    UString(const DOM::AtomicString&);
+    KJS_EXTERNAL_EXPORT UString(const DOM::AtomicString&);
 
     /**
      * Concatenation constructor. Makes operator+ more efficient.
@@ -358,15 +358,15 @@
     /**
      * @see UString(const QString&).
      */
-    DOM::DOMString domString() const;
+    KJS_EXTERNAL_EXPORT DOM::DOMString domString() const;
     /**
      * @see UString(const QString&).
      */
-    QString qstring() const;
+    KJS_EXTERNAL_EXPORT QString qstring() const;
     /**
      * @see UString(const QString&).
      */
-    QConstString qconststring() const;
+    KJS_EXTERNAL_EXPORT QConstString qconststring() const;
 
     /**
      * Assignment operator.
Index: kjs/identifier.h
===================================================================
--- kjs/identifier.h	(Revision 515389)
+++ kjs/identifier.h	(Arbeitskopie)
@@ -53,11 +53,11 @@
 	* returns a UString of the identifier
 	*/
         const UString &ustring() const { return _ustring; }
-        DOM::DOMString domString() const;
+        KJS_EXTERNAL_EXPORT DOM::DOMString domString() const;
         /**
 	* returns a QString of the identifier
 	*/
-	QString qstring() const;
+        KJS_EXTERNAL_EXPORT QString qstring() const;
 
 	/**
 	* returns a UChar pointer to the string of the identifier with a size defined by @ref size().
Index: kjs/global.h.in
===================================================================
--- kjs/global.h.in	(Revision 515389)
+++ kjs/global.h.in	(Arbeitskopie)
@@ -43,7 +43,7 @@
 #ifndef KJS_EXPORT
 # ifdef __KDE_HAVE_GCC_VISIBILITY
 #  define KJS_EXPORT __attribute__ ((visibility("default")))
-# elif defined(_MSC_VER)
+# elif defined(_WIN32) || defined(_WIN64)
 #  ifdef MAKE_KJS_LIB
 #   define KJS_EXPORT __declspec(dllexport)
 #  else
@@ -54,6 +54,22 @@
 # endif
 #endif
 
+// some methods are declared inside kjs and defined outside (currently only in khtml)
+// KJS_EXTERNAL_EXPORT should be prefixed to each related method
+#ifndef KJS_EXTERNAL_EXPORT
+# if defined(MAKE_KJS_LIB) 
+#  define KJS_EXTERNAL_EXPORT
+# elif defined(_WIN32) || defined(_WIN64)
+#  if defined(MAKE_KHTML_LIB)
+#   define KJS_EXTERNAL_EXPORT __declspec(dllexport)
+#  else 
+#   define KJS_EXTERNAL_EXPORT __declspec(dllimport)
+#  endif
+# else 
+#   define KJS_EXTERNAL_EXPORT
+# endif
+#endif
+
 #ifndef NDEBUG // protection against problems if committing with KJS_VERBOSE on
 
 // Uncomment this to enable very verbose output from KJS
