changeset 384:d2f48c4cb3e3

Same behavior of shared libs on linux and windows. Minor build script fixes.
author Max Samukha <maxter@spambox.com>
date Fri, 16 Jul 2010 20:04:29 +0300
parents bd7f485e3573
children e700fa4916e4
files CMakeLists.txt cmake/FindD.cmake cpp/qt_core/QLineF_shell.cpp cpp/qt_core/QLine_shell.cpp cpp/qt_core/QMetaObject_shell.cpp cpp/qt_core/QModelIndex_shell.cpp cpp/qt_core/QPointF_shell.cpp cpp/qt_core/QPoint_shell.cpp cpp/qt_core/QRectF_shell.cpp cpp/qt_core/QRect_shell.cpp cpp/qt_core/QSizeF_shell.cpp cpp/qt_core/QSize_shell.cpp cpp/qt_core/QString_shell.cpp cpp/qt_core/QVariant_shell.cpp cpp/qt_qtd/ArrayOpsPrimitive_shell.cpp cpp/qt_qtd/qtd_core.cpp d2/qtd/Core.d generator/CMakeLists.txt generator/containergenerator.cpp generator/cppimplgenerator.cpp generator/dgenerator.cpp generator/generator.h generator/generator.pri generator/main.cpp generator/typesystem_core.xml generator/typesystem_gui.xml include/ArrayOpsPrimitive.h include/qtd_core.h wiki/common.css
diffstat 29 files changed, 626 insertions(+), 618 deletions(-) [+]
line wrap: on
line diff
--- a/CMakeLists.txt	Mon Jul 12 22:50:58 2010 +0300
+++ b/CMakeLists.txt	Fri Jul 16 20:04:29 2010 +0300
@@ -45,7 +45,14 @@
 
 ## Options.
 option(BUILD_EXAMPLES "Build examples" "OFF")
-option(BUILD_SHARED_LIBRARIES "Build shared library (very experemental and only for ldc)" "OFF")
+# option(BUILD_SHARED_LIBRARIES "Build shared library (very experemental and only for ldc)" "OFF")
+
+if (CMAKE_HOST_WIN32)
+    set(CPP_SHARED true CACHE INTERNAL "")
+else()
+    option(CPP_SHARED "Build C++ part into shared libraries" "ON")
+endif()
+
 option(BUILD_TOOLS "Build tools" "ON")
 #option(GENERATE_DI_FILES "Generate *.di files with DC -H command" "OFF")
 set(GENERATE_DI_FILES OFF) ## Very experimental option. Temporarily disabled.
@@ -78,13 +85,14 @@
     set(implib implib)
     find_program(IMPLIB ${implib})
     if (NOT IMPLIB)
-    message(FATAL_ERROR "implib is not found. You can donwload it from http://ftp.digitalmars.com/bup.zip")
+        message(FATAL_ERROR "implib is not found. You can donwload it from http://ftp.digitalmars.com/bup.zip")
     endif ()
-    if(D_IS_MARS)
-      set(GEN_OPT ${GEN_OPT} --cpp_shared)
-    endif()
 endif()
-add_definitions(-DCPP_SHARED)
+
+if(CPP_SHARED)
+    set(GEN_OPT ${GEN_OPT} --cpp-shared)
+    add_definitions(-DCPP_SHARED)
+endif()
 
 set(CMAKE_LIBRARY_PATH ${CMAKE_LIBRARY_PATH} ./)
 set(GEN_OPT ${GEN_OPT} --d-target=${D_TARGET})
@@ -148,8 +156,11 @@
 
 ## "Make install" command.
 set_directory_properties(PROPERTIES ADDITIONAL_MAKE_CLEAN_FILES ${CMAKE_BINARY_DIR}/build)
+
+set(native_build_path ${CMAKE_BINARY_DIR}/build)
+make_native_path(native_build_path)
 add_custom_target(install
-    COMMAND cd ${CMAKE_BINARY_DIR}/build && ${make_util} install
+    COMMAND cd ${native_build_path} && ${make_util} install
     COMMENT ""
     )
 add_dependencies(install preinstall)
@@ -161,7 +172,7 @@
 
 PROJECT(qtd CXX C)
 if(NOT ${CMAKE_BINARY_DIR} STREQUAL ${CMAKE_SOURCE_DIR})
-    load_cache(${CMAKE_BINARY_DIR}/.. INCLUDE_INTERNALS all_packages QTD_VERSION_STR QTD_VERSION)
+    load_cache(${CMAKE_BINARY_DIR}/.. INCLUDE_INTERNALS all_packages QTD_VERSION_STR QTD_VERSION CPP_SHARED)
 endif()
 set(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake)
 FIND_PACKAGE(D REQUIRED)
@@ -180,12 +191,10 @@
     string(REGEX REPLACE ".dll([A-Za-z\\.0-9]+)" "\\1" CMAKE_IMPORT_LIBRARY_SUFFIX "${CMAKE_IMPORT_LIBRARY_SUFFIX}")
 endif()
 
-if(CMAKE_HOST_WIN32 AND D_IS_MARS)
-    set(D_FLAGS -version=cpp_shared)
+if(CPP_SHARED)
+    set(D_FLAGS -version=QtdCppShared)
+    add_definitions(-DCPP_SHARED)
 endif()
-add_definitions(-DCPP_SHARED)
-set(CPP_SHARED 1 CACHE INTERNAL "")
-
 
 if(UNITTEST)
     add_d_versions(QtdUnittest)
@@ -218,8 +227,8 @@
     set (params NAME OPTIONS)
     qtd_parse_params (RESOURCES  params ${ARGN})
     if(NAME_tmp)
-    set(OPTIONS_tmp ${OPTIONS_tmp} -name ${NAME_tmp})
-    endif(NAME_tmp)
+        set(OPTIONS_tmp ${OPTIONS_tmp} -name ${NAME_tmp})
+    endif()
     qtd_command ("${output}" "${DRCC}" "${OPTIONS_tmp}" "qrc_"
     "Generate" ${RESOURCES_tmp})
 endmacro()
@@ -320,7 +329,10 @@
             message(STATUS "Example '${name}' requires the package '${req}', but it is not active. Example will not be built")
             return(build_example name)
         else()
-            set(qtd_libs cpp_${package} ${${package}_lib_param} ${qtd_libs})
+            set(qtd_libs ${${package}_lib_param} ${qtd_libs})
+            if(CPP_SHARED AND CMAKE_HOST_UNIX)
+                set(qtd_libs cpp_${package} ${qtd_libs})
+            endif()
         endif()
     endforeach()
     add_d_program(${name} ${SOURCES_tmp} NO_DEPS_SOURCES ${res_sources} ${uic_sources}
@@ -392,203 +404,201 @@
     endif(BUILD_QT_${package_upper})
 
     if("${all_req_found}" EQUAL 1)
-    set(packages_big ${packages_big} ${package_big})
-    set(packages ${packages} ${package})
-    ## Load a package sources list.
-    foreach(d_source ${package}/ArrayOps2 ${d_generated_files})
-        set(d_sources ${d_sources} ${CMAKE_BINARY_DIR}/qt/${d_source}.d)
-        if(EXISTS ${CMAKE_BINARY_DIR}/qt/${d_source}_aux.d)
-        set(d_sources ${d_sources} ${CMAKE_BINARY_DIR}/qt/${d_source}_aux.d)
+        set(packages_big ${packages_big} ${package_big})
+        set(packages ${packages} ${package})
+        ## Load a package sources list.
+        foreach(d_source ${package}/ArrayOps2 ${d_generated_files})
+            set(d_sources ${d_sources} ${CMAKE_BINARY_DIR}/qt/${d_source}.d)
+            if(EXISTS ${CMAKE_BINARY_DIR}/qt/${d_source}_aux.d)
+                set(d_sources ${d_sources} ${CMAKE_BINARY_DIR}/qt/${d_source}_aux.d)
+            endif()
+        endforeach()
+        set(classes ArrayOps ${classes})
+        foreach(class ${classes})
+            set(d_sources ${d_sources} ${CMAKE_BINARY_DIR}/qt/${package}/${class}.d)
+            set(cpp_sources ${cpp_sources} ${CMAKE_BINARY_DIR}/cpp/qt_${package}/${class}_shell.cpp)
+            if(EXISTS ${CMAKE_BINARY_DIR}/qt/${package}/${class}_aux.d)
+                set(d_sources ${d_sources} ${CMAKE_BINARY_DIR}/qt/${package}/${class}_aux.d)
+            endif()
+        endforeach()
+        set(files_for_gen ${files_for_gen} ${cpp_sources} ${d_sources})
+
+        foreach (cpp_source ${cpp_files})
+            set(cpp_sources ${cpp_sources} ${CMAKE_SOURCE_DIR}/cpp/${cpp_source}.cpp)
+        endforeach()
+        foreach (cpp_source ${cpp_generated_files})
+            set(cpp_sources ${cpp_sources} ${CMAKE_BINARY_DIR}/cpp/${cpp_source}.cpp)
+        endforeach()
+        foreach(d_source ${d_qt_files})
+            set(d_sources ${d_sources} ${CMAKE_SOURCE_DIR}/d${D_VERSION}/qt/${d_source}.d)
+        endforeach()
+        foreach(d_source ${d_qtd_files})
+            set(d_sources ${d_sources} ${CMAKE_SOURCE_DIR}/d${D_VERSION}/qtd/${d_source}.d)
+        endforeach()
+
+        if(NOT GENERATE_DI_FILES)
+            foreach(d_source ${d_sources})
+            get_filename_component(path ${d_source} PATH)
+            get_filename_component(name ${d_source} NAME_WE)
+            regex_safe_string(cbd_safe_tmp ${CMAKE_CURRENT_BINARY_DIR})
+            regex_safe_string(csd_safe_tmp ${CMAKE_CURRENT_SOURCE_DIR})
+            regex_safe_string(ver_safe_tmp ${CMAKE_CURRENT_SOURCE_DIR}/d${D_VERSION})
+            set(regexp_str_tmp "(${ver_safe_tmp}/|${cbd_safe_tmp}/|${csd_safe_tmp}/|)(.+)")
+            string(REGEX REPLACE ${regexp_str_tmp} "\\2" ins_path "${path}")
+            install(FILES ${d_source} DESTINATION include/d/${ins_path} COMPONENT qtd RENAME ${name}.di)
+            endforeach()
+        endif(NOT GENERATE_DI_FILES)
+
+        ### Build the CPP part.
+        if(CPP_SHARED)
+            set(cpp_method SHARED)
+        else()
+            set(cpp_method STATIC)
         endif()
-    endforeach(d_source ${d_generated_files})
-    set(classes ArrayOps ${classes})
-    foreach(class ${classes})
-        set(d_sources ${d_sources} ${CMAKE_BINARY_DIR}/qt/${package}/${class}.d)
-        set(cpp_sources ${cpp_sources} ${CMAKE_BINARY_DIR}/cpp/qt_${package}/${class}_shell.cpp)
-        if(EXISTS ${CMAKE_BINARY_DIR}/qt/${package}/${class}_aux.d)
-        set(d_sources ${d_sources} ${CMAKE_BINARY_DIR}/qt/${package}/${class}_aux.d)
-        endif(EXISTS ${CMAKE_BINARY_DIR}/qt/${package}/${class}_aux.d)
-    endforeach(class ${classes})
-    set(files_for_gen ${files_for_gen} ${cpp_sources} ${d_sources})
+        add_library(cpp_${package} ${cpp_method} ${cpp_sources})
 
-    foreach (cpp_source ${cpp_files})
-        set(cpp_sources ${cpp_sources} ${CMAKE_SOURCE_DIR}/cpp/${cpp_source}.cpp)
-    endforeach(cpp_source ${cpp_files})
-    foreach (cpp_source ${cpp_generated_files})
-        set(cpp_sources ${cpp_sources} ${CMAKE_BINARY_DIR}/cpp/${cpp_source}.cpp)
-    endforeach(cpp_source ${cpp_generated_files})
-    foreach(d_source ${d_qt_files})
-        set(d_sources ${d_sources} ${CMAKE_SOURCE_DIR}/d${D_VERSION}/qt/${d_source}.d)
-    endforeach(d_source ${d_qt_files})
-    foreach(d_source ${d_qtd_files})
-        set(d_sources ${d_sources} ${CMAKE_SOURCE_DIR}/d${D_VERSION}/qtd/${d_source}.d)
-    endforeach(d_source ${d_qtd_files})
-
-    if(NOT GENERATE_DI_FILES)
-        foreach(d_source ${d_sources})
-        get_filename_component(path ${d_source} PATH)
-        get_filename_component(name ${d_source} NAME_WE)
-        regex_safe_string(cbd_safe_tmp ${CMAKE_CURRENT_BINARY_DIR})
-        regex_safe_string(csd_safe_tmp ${CMAKE_CURRENT_SOURCE_DIR})
-        regex_safe_string(ver_safe_tmp ${CMAKE_CURRENT_SOURCE_DIR}/d${D_VERSION})
-        set(regexp_str_tmp "(${ver_safe_tmp}/|${cbd_safe_tmp}/|${csd_safe_tmp}/|)(.+)")
-        string(REGEX REPLACE ${regexp_str_tmp} "\\2" ins_path "${path}")
-        install(FILES ${d_source} DESTINATION include/d/${ins_path} COMPONENT qtd RENAME ${name}.di)
-        endforeach(d_source ${d_sources})
-    endif(NOT GENERATE_DI_FILES)
-
-    ### Build the CPP part.
-    if(CPP_SHARED)
-        set(cpp_method SHARED)
-    else()
-        set(cpp_method STATIC)
-    endif()
-    add_library(cpp_${package} ${cpp_method} ${cpp_sources})
-    # FIXME, do less redundant
-    if(CMAKE_HOST_WIN32)
         set_target_properties(cpp_${package} PROPERTIES
-            RUNTIME_OUTPUT_DIRECTORY lib
-            ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/CMakeFiles
-            LINK_FLAGS -Wl,-enable-auto-import
-            COMPILE_DEFINITIONS QTD_${package_upper}
-        )
-    else()
-        set_target_properties(cpp_${package} PROPERTIES
-            LIBRARY_OUTPUT_DIRECTORY lib
+            LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib
+            RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib
             ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/CMakeFiles
             COMPILE_DEFINITIONS QTD_${package_upper}
         )
-    endif()
-
-    set(link_cpp ${link_cpp} ${QT_QT${package_upper}_LIBRARY})
-    if(NOT CPP_SHARED)
-        ## Get an objects list. It will be used in building the D part.
-        foreach(cpp_source ${cpp_sources})
-        set(cpp_source ${cpp_source})
-        obj_path(cpp_source)
-        set(cpp_objs ${cpp_objs} ${CMAKE_BINARY_DIR}/CMakeFiles/cpp_${package}.dir/${cpp_source}${CMAKE_CXX_OUTPUT_EXTENSION})
-        endforeach(cpp_source ${cpp_sources})
-    endif()
-
-    ## Settings for the D part.
-    set(lib_name qtd${package})
-    if(BUILD_SHARED_LIBRARIES)
-        set(lib lib/${CMAKE_SHARED_LIBRARY_PREFIX}${lib_name}${CMAKE_SHARED_LIBRARY_SUFFIX})
-        set(build_type SHARED)
-    else()
-        set(lib lib/${D_LIB_PREFIX}${lib_name}${D_LIB_SUFFIX})
-        set(build_type STATIC)
-    endif()
-
-    ## Package dependencies.
-    foreach(req ${required})
-        set(is_found)
-        foreach(pack ${packages_big})
-            if("${pack}" STREQUAL "${req}")
-                set(is_found 1)
-                break(pack ${packages_big})
-            endif()
-        endforeach()
-        if(NOT is_found)
-            message(FATAL_ERROR "Package ${package_big} requires ${req}, but it is not found")
-        endif()
-        string(TOUPPER ${req} req_upper)
-        string(TOLOWER ${req} req_lower)
-        set(link_cpp ${link_cpp} cpp_${req_lower} ${QT_QT${req_upper}_LIBRARY})
-    endforeach()
-
-    if(${package_big} STREQUAL "Qwt" AND CMAKE_HOST_WIN32)
-        set(qwt_release_lib ${QWT_LIB_PATH}/libqwt5.a)
-        set(qwt_debug_lib ${QWT_LIB_PATH}/libqwtd5.a)
-        if(EXISTS ${qwt_release_lib})
-            set(qwt_lib ${qwt_release_lib})
-        elseif(EXISTS ${qwt_debug_lib})
-            set(qwt_lib ${qwt_debug_lib})
-        endif()
-        set(link_cpp ${link_cpp} ${qwt_lib})
-    endif()
-
-    target_link_libraries(cpp_${package} ${link_cpp} )
-    set(d_objs ${d_objs} ${objects})
-
-    if(CPP_SHARED)
-        set(cpp_lib ${CMAKE_BINARY_DIR}/lib/libcpp_${package}${CMAKE_SHARED_LIBRARY_SUFFIX})
-        install(FILES ${cpp_lib} COMPONENT qtd DESTINATION lib)
 
         if(CMAKE_HOST_WIN32)
-            ## Create an implib library which will be linked to the D part.
-            set(cpp_lib_native ${cpp_lib})
-            make_native_path(cpp_lib_native)
-            set(d_implib ${CMAKE_BINARY_DIR}/CMakeFiles/${package}.dir/cpp_${package}.lib)
-            set(d_implib_native ${d_implib})
-            make_native_path(d_implib_native)
-            add_custom_command(
-                OUTPUT "${d_implib}"
-                COMMAND "${IMPLIB}"
-                ARGS  /system /PAGESIZE:64 ${d_implib_native} ${cpp_lib_native}
-                DEPENDS  "cpp_${package}"
-                COMMENT "Creating implib ${lib_name}"
-                )
+            set_target_properties(cpp_${package} PROPERTIES
+                LINK_FLAGS -Wl,-enable-auto-import
+            )
         endif()
-    else()
-        set(${package}_lib_param Qt${package_big})
+
+        set(link_cpp ${link_cpp} ${QT_QT${package_upper}_LIBRARY})
+        if(NOT CPP_SHARED)
+            ## Get an objects list. It will be used in building the D part.
+            foreach(cpp_source ${cpp_sources})
+            set(cpp_source ${cpp_source})
+            obj_path(cpp_source)
+            set(cpp_objs ${cpp_objs} ${CMAKE_BINARY_DIR}/CMakeFiles/cpp_${package}.dir/${cpp_source}${CMAKE_CXX_OUTPUT_EXTENSION})
+            endforeach()
+        endif()
+
+        ## Settings for the D part.
+        set(lib_name qtd${package})
+        # if(BUILD_SHARED_LIBRARIES)
+        #    set(lib lib/${CMAKE_SHARED_LIBRARY_PREFIX}${lib_name}${CMAKE_SHARED_LIBRARY_SUFFIX})
+        #    set(build_type SHARED)
+        # else()
+            set(lib lib/${D_LIB_PREFIX}${lib_name}${D_LIB_SUFFIX})
+            set(build_type STATIC)
+        # endif()
+
+        ## Package dependencies.
+        foreach(req ${required})
+            set(is_found)
+            foreach(pack ${packages_big})
+                if("${pack}" STREQUAL "${req}")
+                    set(is_found 1)
+                    break(pack ${packages_big})
+                endif()
+            endforeach()
+            if(NOT is_found)
+                message(FATAL_ERROR "Package ${package_big} requires ${req}, but it is not found")
+            endif()
+            string(TOUPPER ${req} req_upper)
+            string(TOLOWER ${req} req_lower)
+            set(link_cpp ${link_cpp} cpp_${req_lower} ${QT_QT${req_upper}_LIBRARY})
+        endforeach()
+
+        if(${package_big} STREQUAL "Qwt" AND CMAKE_HOST_WIN32)
+            set(qwt_release_lib ${QWT_LIB_PATH}/libqwt5.a)
+            set(qwt_debug_lib ${QWT_LIB_PATH}/libqwtd5.a)
+            if(EXISTS ${qwt_release_lib})
+                set(qwt_lib ${qwt_release_lib})
+            elseif(EXISTS ${qwt_debug_lib})
+                set(qwt_lib ${qwt_debug_lib})
+            endif()
+            set(link_cpp ${link_cpp} ${qwt_lib})
+        endif()
+
+        target_link_libraries(cpp_${package} ${link_cpp} )
+        set(d_objs ${d_objs} ${objects})
+
+        if(CPP_SHARED)
+            set(cpp_lib ${CMAKE_BINARY_DIR}/lib/libcpp_${package}${CMAKE_SHARED_LIBRARY_SUFFIX})
+            install(FILES ${cpp_lib} COMPONENT qtd DESTINATION lib)
+
+            if(CMAKE_HOST_WIN32)
+                ## Create an implib library which will be linked to the D part.
+                set(cpp_lib_native ${cpp_lib})
+                make_native_path(cpp_lib_native)
+                set(d_implib ${CMAKE_BINARY_DIR}/CMakeFiles/${package}.dir/cpp_${package}.lib)
+                set(d_implib_native ${d_implib})
+                make_native_path(d_implib_native)
+                add_custom_command(
+                    OUTPUT "${d_implib}"
+                    COMMAND "${IMPLIB}"
+                    ARGS  /system /PAGESIZE:64 ${d_implib_native} ${cpp_lib_native}
+                    DEPENDS  "cpp_${package}"
+                    COMMENT "Creating implib ${lib_name}"
+                    )
+            endif()
+        else()
+            set(${package}_lib_param Qt${package_big})
+        endif()
+
+        ## Link the D part.
+        add_d_target(${lib_name} NOT_DETECT_DEPENDS TYPE ${build_type} INCLUDES ${QTD_IMPORT_PATH} SOURCES ${d_sources} OBJECTS ${cpp_objs} ${d_implib}
+              OUTPUT_PATH ${CMAKE_BINARY_DIR}/lib DEPENDS ${d_implib} )
+        install(FILES ${CMAKE_BINARY_DIR}/${lib} COMPONENT qtd DESTINATION lib)
+        ## Paths for the QtD libs. It is necessary for examples.
+        set(${package}_lib_param qtd${package} ${${package}_lib_param} ${link_example})
+
+        ## Generate dependences for make (or nmake).
+        add_custom_target(${package})
+        add_dependencies(${package} ${lib_name})
+
+        add_dependencies(${lib_name} cpp_${package})
+        foreach(depend ${required})
+            string(TOLOWER ${depend} depend)
+            add_dependencies(cpp_${package} cpp_${depend})
+            add_dependencies(${package} ${depend})
+        endforeach()
+        add_dependencies(allpackages ${package})
+
+        ## TODO: Do we need to generate *.di files?
+        if(GENERATE_DI_FILES)
+            regexseafestring(cbd_safe ${CMAKE_BINARY_DIR})
+            regexseafestring(csd_safe ${CMAKE_SOURCE_DIR})
+            set(regexp_str "(${csd}/qt/d${D_VERSION}|${csd_safe}|${cbd_safe})/([A-Za-z0-9\\-_\\\\/]+)[/]+([A-Za-z0-9\\-_\\\\]+).d")
+            foreach(source ${d_sources})
+            #     find_file(source ${source} PATHS ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_SOURCE_DIR}
+            #           ${CMAKE_BINARY_DIR} ${CMAKE_SOURCE_DIR})
+                string(REGEX REPLACE ${regexp_str} "\\2" inc_path "${source}")
+                string(REGEX REPLACE ${regexp_str} "\\3" file_name "${source}")
+                set(interface_file_path ${CMAKE_BINARY_DIR}/d/${inc_path})
+                set(interface_file "${interface_file_path}/${file_name}.di")
+                if(NOT "${file_name}" STREQUAL "QGlobal")
+                    add_custom_command(OUTPUT "${interface_file}"
+                        COMMAND "${DC}"
+                        ARGS ${D_FLAGS} -o- -H -Hd${interface_file_path} ${source}
+                        COMMENT "Generating header for ${source}"
+                        DEPENDS ${source}
+                        WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
+                        )
+                else(NOT "${file_name}" STREQUAL "QGlobal") ## The DMD frontend crashes on this file.
+                    add_custom_command(OUTPUT "${interface_file}"
+                        COMMAND ${CMAKE_COMMAND} -E make_directory ${interface_file_path}
+                        COMMAND ${CMAKE_COMMAND} -E remove -f ${interface_file}
+                        COMMAND ${CMAKE_COMMAND} -E copy ${source} ${interface_file}
+                        COMMENT ""
+                        DEPENDS ${source}
+                        WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
+                        )
+                endif(NOT "${file_name}" STREQUAL "QGlobal" AND GENERATE_DI_FILES)
+                set(interfaces_list ${interfaces_list} ${interface_file_path}/${file_name}.di)
+                install(FILES ${interface_file} COMPONENT qtd DESTINATION include/d/${inc_path})
+            endforeach()
+        endif()
     endif()
-
-    ## Link the D part.
-    add_d_target(${lib_name} NOT_DETECT_DEPENDS TYPE ${build_type} INCLUDES ${QTD_IMPORT_PATH} SOURCES ${d_sources} OBJECTS ${cpp_objs} ${d_implib}
-          OUTPUT_PATH ${CMAKE_BINARY_DIR}/lib DEPENDS ${d_implib} )
-    install(FILES ${CMAKE_BINARY_DIR}/${lib} COMPONENT qtd DESTINATION lib)
-    ## Paths for the QtD libs. It is necessary for examples.
-    set(${package}_lib_param qtd${package} ${${package}_lib_param} ${link_example})
-
-    ## Generate dependences for make (or nmake).
-    add_custom_target(${package})
-    add_dependencies(${package} ${lib_name})
-
-    add_dependencies(${lib_name} cpp_${package})
-    foreach(depend ${required})
-        string(TOLOWER ${depend} depend)
-        add_dependencies(cpp_${package} cpp_${depend})
-        add_dependencies(${package} ${depend})
-    endforeach(depend ${required})
-    add_dependencies(allpackages ${package})
-
-    ## TODO: Do we need to generate *.di files?
-    if(GENERATE_DI_FILES)
-        regexseafestring(cbd_safe ${CMAKE_BINARY_DIR})
-        regexseafestring(csd_safe ${CMAKE_SOURCE_DIR})
-        set(regexp_str "(${csd}/qt/d${D_VERSION}|${csd_safe}|${cbd_safe})/([A-Za-z0-9\\-_\\\\/]+)[/]+([A-Za-z0-9\\-_\\\\]+).d")
-        foreach(source ${d_sources})
-    #     find_file(source ${source} PATHS ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_SOURCE_DIR}
-    #           ${CMAKE_BINARY_DIR} ${CMAKE_SOURCE_DIR})
-        string(REGEX REPLACE ${regexp_str} "\\2" inc_path "${source}")
-        string(REGEX REPLACE ${regexp_str} "\\3" file_name "${source}")
-        set(interface_file_path ${CMAKE_BINARY_DIR}/d/${inc_path})
-        set(interface_file "${interface_file_path}/${file_name}.di")
-        if(NOT "${file_name}" STREQUAL "QGlobal")
-            add_custom_command(OUTPUT "${interface_file}"
-                COMMAND "${DC}"
-                ARGS ${D_FLAGS} -o- -H -Hd${interface_file_path} ${source}
-                COMMENT "Generating header for ${source}"
-                DEPENDS ${source}
-                WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
-                )
-        else(NOT "${file_name}" STREQUAL "QGlobal") ## The DMD frontend crashes on this file.
-            add_custom_command(OUTPUT "${interface_file}"
-                COMMAND ${CMAKE_COMMAND} -E make_directory ${interface_file_path}
-                COMMAND ${CMAKE_COMMAND} -E remove -f ${interface_file}
-                COMMAND ${CMAKE_COMMAND} -E copy ${source} ${interface_file}
-                COMMENT ""
-                DEPENDS ${source}
-                WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
-                )
-        endif(NOT "${file_name}" STREQUAL "QGlobal" AND GENERATE_DI_FILES)
-        set(interfaces_list ${interfaces_list} ${interface_file_path}/${file_name}.di)
-        install(FILES ${interface_file} COMPONENT qtd DESTINATION include/d/${inc_path})
-        endforeach(source)
-    endif(GENERATE_DI_FILES)
-    endif("${all_req_found}" EQUAL 1)
-endforeach(package_big ${packages_big})
+endforeach()
 if(GENERATE_DI_FILES)
     add_custom_target(generate_headers ALL DEPENDS ${interfaces_list})
 endif(GENERATE_DI_FILES)
@@ -624,7 +634,7 @@
 set(CPACK_PACKAGE_DESCRIPTION_FILE "${CMAKE_CURRENT_SOURCE_DIR}/changelog.txt")
 set(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_SOURCE_DIR}/license.txt")
 set(CPACK_PACKAGE_VENDOR "QtD team")
-set(CPACK_PACKAGE_CONTACT "e@mail.com")
+set(CPACK_PACKAGE_CONTACT "qtd@qtd.org")
 set(CPACK_PACKAGE_VERSION "0.6")
 set(CPACK_PACKAGE_INSTALL_DIRECTORY "qtd ${CPACK_PACKAGE_VERSION}")
 set(CPACK_PACKAGE_FILE_NAME "qtd-${CPACK_PACKAGE_VERSION}")
--- a/cmake/FindD.cmake	Mon Jul 12 22:50:58 2010 +0300
+++ b/cmake/FindD.cmake	Fri Jul 16 20:04:29 2010 +0300
@@ -139,7 +139,7 @@
 ##	message(STATUS ${path})
 ## Output:
 ##	-- "c:\file_path\file_name.cpp"
-## Command "file(TO_NATIVE_PATH ...)" is wrong on Windows
+## Command "file(TO_NATIVE_PATH ...)" gives incorrect results on Windows
 macro(make_native_path pathname)
     if(CMAKE_HOST_WIN32)
 	# An extra \\ escape is necessary to get a \ through CMake's processing.
--- a/cpp/qt_core/QLineF_shell.cpp	Mon Jul 12 22:50:58 2010 +0300
+++ b/cpp/qt_core/QLineF_shell.cpp	Fri Jul 16 20:04:29 2010 +0300
@@ -5,7 +5,7 @@
 
 
 // QLineF::angle() const
-QTD_EXTERN QTD_DLL_PUBLIC double qtd_QLineF_angle
+QTD_EXTERN QTD_EXPORT double qtd_QLineF_angle
 (void* __this_nativeId)
 {
     QLineF *__qt_this = (QLineF *) __this_nativeId;
@@ -17,7 +17,7 @@
 }
 
 // QLineF::angle(const QLineF & l) const
-QTD_EXTERN QTD_DLL_PUBLIC double qtd_QLineF_angle_QLineF
+QTD_EXTERN QTD_EXPORT double qtd_QLineF_angle_QLineF
 (void* __this_nativeId,
  void* l0)
 {
@@ -31,7 +31,7 @@
 }
 
 // QLineF::angleTo(const QLineF & l) const
-QTD_EXTERN QTD_DLL_PUBLIC double qtd_QLineF_angleTo_QLineF
+QTD_EXTERN QTD_EXPORT double qtd_QLineF_angleTo_QLineF
 (void* __this_nativeId,
  void* l0)
 {
@@ -45,7 +45,7 @@
 }
 
 // QLineF::intersect(const QLineF & l, QPointF * intersectionPoint) const
-QTD_EXTERN QTD_DLL_PUBLIC int qtd_QLineF_intersect_QLineF_nativepointerQPointF
+QTD_EXTERN QTD_EXPORT int qtd_QLineF_intersect_QLineF_nativepointerQPointF
 (void* __this_nativeId,
  void* l0,
  void* intersectionPoint1)
@@ -60,7 +60,7 @@
 }
 
 // QLineF::isNull() const
-QTD_EXTERN QTD_DLL_PUBLIC bool qtd_QLineF_isNull
+QTD_EXTERN QTD_EXPORT bool qtd_QLineF_isNull
 (void* __this_nativeId)
 {
     QLineF *__qt_this = (QLineF *) __this_nativeId;
@@ -72,7 +72,7 @@
 }
 
 // QLineF::length() const
-QTD_EXTERN QTD_DLL_PUBLIC double qtd_QLineF_length
+QTD_EXTERN QTD_EXPORT double qtd_QLineF_length
 (void* __this_nativeId)
 {
     QLineF *__qt_this = (QLineF *) __this_nativeId;
@@ -84,7 +84,7 @@
 }
 
 // QLineF::operator<<(QDataStream & arg__1)
-QTD_EXTERN QTD_DLL_PUBLIC void qtd_QLineF_writeTo_QDataStream
+QTD_EXTERN QTD_EXPORT void qtd_QLineF_writeTo_QDataStream
 (void* __this_nativeId,
  void* arg__1)
 {
@@ -95,7 +95,7 @@
 }
 
 // QLineF::operator>>(QDataStream & arg__1)
-QTD_EXTERN QTD_DLL_PUBLIC void qtd_QLineF_readFrom_QDataStream
+QTD_EXTERN QTD_EXPORT void qtd_QLineF_readFrom_QDataStream
 (void* __this_nativeId,
  void* arg__1)
 {
@@ -106,7 +106,7 @@
 }
 
 // QLineF::p1() const
-QTD_EXTERN QTD_DLL_PUBLIC QPointF qtd_QLineF_p1
+QTD_EXTERN QTD_EXPORT QPointF qtd_QLineF_p1
 (void* __this_nativeId)
 {
     QLineF *__qt_this = (QLineF *) __this_nativeId;
@@ -118,7 +118,7 @@
 }
 
 // QLineF::setAngle(double angle)
-QTD_EXTERN QTD_DLL_PUBLIC void qtd_QLineF_setAngle_double
+QTD_EXTERN QTD_EXPORT void qtd_QLineF_setAngle_double
 (void* __this_nativeId,
  double angle0)
 {
@@ -128,7 +128,7 @@
 }
 
 // QLineF::unitVector() const
-QTD_EXTERN QTD_DLL_PUBLIC QLineF qtd_QLineF_unitVector
+QTD_EXTERN QTD_EXPORT QLineF qtd_QLineF_unitVector
 (void* __this_nativeId)
 {
     QLineF *__qt_this = (QLineF *) __this_nativeId;
@@ -136,7 +136,7 @@
 }
 
 // QLineF::fromPolar(double length, double angle)
-QTD_EXTERN QTD_DLL_PUBLIC QLineF qtd_QLineF_fromPolar_double_double
+QTD_EXTERN QTD_EXPORT QLineF qtd_QLineF_fromPolar_double_double
 (double length0,
  double angle1)
 {
--- a/cpp/qt_core/QLine_shell.cpp	Mon Jul 12 22:50:58 2010 +0300
+++ b/cpp/qt_core/QLine_shell.cpp	Fri Jul 16 20:04:29 2010 +0300
@@ -4,7 +4,7 @@
 #include "qtd_core.h"
 
 // QLine::operator<<(QDataStream & arg__1)
-QTD_EXTERN QTD_DLL_PUBLIC void qtd_QLine_writeTo_QDataStream
+QTD_EXTERN QTD_EXPORT void qtd_QLine_writeTo_QDataStream
 (void* __this_nativeId,
  void* arg__1)
 {
@@ -15,7 +15,7 @@
 }
 
 // QLine::operator>>(QDataStream & arg__1)
-QTD_EXTERN QTD_DLL_PUBLIC void qtd_QLine_readFrom_QDataStream
+QTD_EXTERN QTD_EXPORT void qtd_QLine_readFrom_QDataStream
 (void* __this_nativeId,
  void* arg__1)
 {
--- a/cpp/qt_core/QMetaObject_shell.cpp	Mon Jul 12 22:50:58 2010 +0300
+++ b/cpp/qt_core/QMetaObject_shell.cpp	Fri Jul 16 20:04:29 2010 +0300
@@ -4,58 +4,58 @@
 
 #include <QList>
 
-QTD_EXTERN QTD_DLL_PUBLIC void* qtd_QMetaObject_superClass(void *nativeId)
+QTD_EXTERN QTD_EXPORT void* qtd_QMetaObject_superClass(void *nativeId)
 {
     return (void*)((QMetaObject*)nativeId)->superClass();
 }
 
-QTD_EXTERN QTD_DLL_PUBLIC void qtd_QMetaObject_activate(QObject *sender, int signal_index, void **argv)
+QTD_EXTERN QTD_EXPORT void qtd_QMetaObject_activate(QObject *sender, int signal_index, void **argv)
 {
     QMetaObject::activate(sender, signal_index, argv);
 }
 
-QTD_EXTERN QTD_DLL_PUBLIC void qtd_QMetaObject_activate_3(QObject *sender, const QMetaObject *m, int local_signal_index, void **argv)
+QTD_EXTERN QTD_EXPORT void qtd_QMetaObject_activate_3(QObject *sender, const QMetaObject *m, int local_signal_index, void **argv)
 {
     QMetaObject::activate(sender, m, local_signal_index, argv);
 }
 
-QTD_EXTERN QTD_DLL_PUBLIC void qtd_QMetaObject_activate_4(QObject *sender, const QMetaObject *m, int from_local_signal_index, int to_local_signal_index, void **argv)
+QTD_EXTERN QTD_EXPORT void qtd_QMetaObject_activate_4(QObject *sender, const QMetaObject *m, int from_local_signal_index, int to_local_signal_index, void **argv)
 {
     QMetaObject::activate(sender, m, from_local_signal_index, to_local_signal_index, argv);
 }
 
-QTD_EXTERN QTD_DLL_PUBLIC bool qtd_QMetaObject_connect(const QObject *sender, int signal_index,
+QTD_EXTERN QTD_EXPORT bool qtd_QMetaObject_connect(const QObject *sender, int signal_index,
                                                    const QObject *receiver, int method_index,
                                                    int type, int *types)
 {
     return QMetaObject::connect(sender, signal_index, receiver, method_index, type, types);
 }
 
-QTD_EXTERN QTD_DLL_PUBLIC int qtd_QMetaObject_indexOfMethod(void *nativeId, const char *method)
+QTD_EXTERN QTD_EXPORT int qtd_QMetaObject_indexOfMethod(void *nativeId, const char *method)
 {
     return ((QMetaObject*)nativeId)->indexOfMethod(method);
 }
 
-QTD_EXTERN QTD_DLL_PUBLIC int qtd_QMetaObject_methodCount(void *nativeId)
+QTD_EXTERN QTD_EXPORT int qtd_QMetaObject_methodCount(void *nativeId)
 {
     return ((QMetaObject*)nativeId)->methodCount();
 }
 
-QTD_EXTERN QTD_DLL_PUBLIC void qtd_create_QList(void *nativeId)
+QTD_EXTERN QTD_EXPORT void qtd_create_QList(void *nativeId)
 {
     QList<int> & list = (*(QList<int> *)nativeId);
     list.append(54);
     list.append(45);
 }
 
-QTD_EXTERN QTD_DLL_PUBLIC void qtd_create_QList_double(void *nativeId)
+QTD_EXTERN QTD_EXPORT void qtd_create_QList_double(void *nativeId)
 {
     QList<double> & list = (*(QList<double> *)nativeId);
     list.append(54.44);
     list.append(45.55);
 }
 
-QTD_EXTERN QTD_DLL_PUBLIC void qtd_create_QList_QObject(void *nativeId)
+QTD_EXTERN QTD_EXPORT void qtd_create_QList_QObject(void *nativeId)
 {
     QList<QObject*> & list2 = (*(QList<QObject*> *)nativeId);
 
--- a/cpp/qt_core/QModelIndex_shell.cpp	Mon Jul 12 22:50:58 2010 +0300
+++ b/cpp/qt_core/QModelIndex_shell.cpp	Fri Jul 16 20:04:29 2010 +0300
@@ -6,14 +6,14 @@
 
 #include "qtd_core.h"
 
-QTD_EXTERN QTD_DLL_PUBLIC void __qtd_QModelIndex_destructor(void *ptr)
+QTD_EXTERN QTD_EXPORT void __qtd_QModelIndex_destructor(void *ptr)
 {
     delete (QModelIndex *)ptr;
 }
 
 // ---externC---
 // QModelIndex::QModelIndex()
-QTD_EXTERN QTD_DLL_PUBLIC void* __qtd_QModelIndex_QModelIndex
+QTD_EXTERN QTD_EXPORT void* __qtd_QModelIndex_QModelIndex
 ()
 {
     QModelIndex *__qt_this = new QModelIndex();
@@ -22,7 +22,7 @@
 }
 
 // QModelIndex::QModelIndex(const QModelIndex & other)
-QTD_EXTERN QTD_DLL_PUBLIC void* __qtd_QModelIndex_QModelIndex_QModelIndex
+QTD_EXTERN QTD_EXPORT void* __qtd_QModelIndex_QModelIndex_QModelIndex
 (QModelIndex other0)
 {
     QModelIndex *__qt_this = new QModelIndex((const QModelIndex& )other0);
@@ -31,7 +31,7 @@
 }
 
 // QModelIndex::child(int row, int column) const
-QTD_EXTERN QTD_DLL_PUBLIC QModelIndex __qtd_QModelIndex_child_int_int
+QTD_EXTERN QTD_EXPORT QModelIndex __qtd_QModelIndex_child_int_int
 (void* __this_nativeId,
  int row0,
  int column1)
@@ -44,7 +44,7 @@
 }
 
 // QModelIndex::column() const
-QTD_EXTERN QTD_DLL_PUBLIC int __qtd_QModelIndex_column
+QTD_EXTERN QTD_EXPORT int __qtd_QModelIndex_column
 (void* __this_nativeId)
 {
     QModelIndex *__qt_this = (QModelIndex *) __this_nativeId;
@@ -56,7 +56,7 @@
 }
 
 // QModelIndex::data(int role) const
-QTD_EXTERN QTD_DLL_PUBLIC void* __qtd_QModelIndex_data_int
+QTD_EXTERN QTD_EXPORT void* __qtd_QModelIndex_data_int
 (void* __this_nativeId,
  int role0)
 {
@@ -69,7 +69,7 @@
 }
 
 // QModelIndex::flags() const
-QTD_EXTERN QTD_DLL_PUBLIC int __qtd_QModelIndex_flags
+QTD_EXTERN QTD_EXPORT int __qtd_QModelIndex_flags
 (void* __this_nativeId)
 {
     QModelIndex *__qt_this = (QModelIndex *) __this_nativeId;
@@ -81,7 +81,7 @@
 }
 
 // QModelIndex::internalId() const
-QTD_EXTERN QTD_DLL_PUBLIC qint64 __qtd_QModelIndex_internalId
+QTD_EXTERN QTD_EXPORT qint64 __qtd_QModelIndex_internalId
 (void* __this_nativeId)
 {
     QModelIndex *__qt_this = (QModelIndex *) __this_nativeId;
@@ -93,7 +93,7 @@
 }
 
 // QModelIndex::internalPointer() const
-QTD_EXTERN QTD_DLL_PUBLIC void* __qtd_QModelIndex_internalPointer
+QTD_EXTERN QTD_EXPORT void* __qtd_QModelIndex_internalPointer
 (void* __this_nativeId)
 {
     QModelIndex *__qt_this = (QModelIndex *) __this_nativeId;
@@ -105,7 +105,7 @@
 }
 
 // QModelIndex::isValid() const
-QTD_EXTERN QTD_DLL_PUBLIC bool __qtd_QModelIndex_isValid
+QTD_EXTERN QTD_EXPORT bool __qtd_QModelIndex_isValid
 (void* __this_nativeId)
 {
     QModelIndex *__qt_this = (QModelIndex *) __this_nativeId;
@@ -117,7 +117,7 @@
 }
 
 // QModelIndex::model() const
-QTD_EXTERN QTD_DLL_PUBLIC void* __qtd_QModelIndex_model
+QTD_EXTERN QTD_EXPORT void* __qtd_QModelIndex_model
 (void* __this_nativeId)
 {
     QModelIndex *__qt_this = (QModelIndex *) __this_nativeId;
@@ -129,7 +129,7 @@
 }
 
 // QModelIndex::operator<(const QModelIndex & other) const
-QTD_EXTERN QTD_DLL_PUBLIC bool __qtd_QModelIndex_operator_less_QModelIndex
+QTD_EXTERN QTD_EXPORT bool __qtd_QModelIndex_operator_less_QModelIndex
 (void* __this_nativeId,
  QModelIndex other0)
 {
@@ -142,7 +142,7 @@
 }
 
 // QModelIndex::operator==(const QModelIndex & other) const
-QTD_EXTERN QTD_DLL_PUBLIC bool __qtd_QModelIndex_operator_equal_QModelIndex
+QTD_EXTERN QTD_EXPORT bool __qtd_QModelIndex_operator_equal_QModelIndex
 (void* __this_nativeId,
  QModelIndex other0)
 {
@@ -155,7 +155,7 @@
 }
 
 // QModelIndex::parent() const
-QTD_EXTERN QTD_DLL_PUBLIC QModelIndex __qtd_QModelIndex_parent
+QTD_EXTERN QTD_EXPORT QModelIndex __qtd_QModelIndex_parent
 (void* __this_nativeId)
 {
     QModelIndex *__qt_this = (QModelIndex *) __this_nativeId;
@@ -166,7 +166,7 @@
 }
 
 // QModelIndex::row() const
-QTD_EXTERN QTD_DLL_PUBLIC int __qtd_QModelIndex_row
+QTD_EXTERN QTD_EXPORT int __qtd_QModelIndex_row
 (void* __this_nativeId)
 {
     QModelIndex *__qt_this = (QModelIndex *) __this_nativeId;
@@ -178,7 +178,7 @@
 }
 
 // QModelIndex::sibling(int row, int column) const
-QTD_EXTERN QTD_DLL_PUBLIC QModelIndex __qtd_QModelIndex_sibling_int_int
+QTD_EXTERN QTD_EXPORT QModelIndex __qtd_QModelIndex_sibling_int_int
 (void* __this_nativeId,
  int row0,
  int column1)
--- a/cpp/qt_core/QPointF_shell.cpp	Mon Jul 12 22:50:58 2010 +0300
+++ b/cpp/qt_core/QPointF_shell.cpp	Fri Jul 16 20:04:29 2010 +0300
@@ -5,7 +5,7 @@
 
 // ---externC---
 // QPointF::operator<<(QDataStream & arg__1)
-QTD_EXTERN QTD_DLL_EXPORT void qtd_QPointF_writeTo_QDataStream
+QTD_EXTERN QTD_EXPORT void qtd_QPointF_writeTo_QDataStream
 (void* __this_nativeId,
  void* arg__1)
 {
@@ -16,7 +16,7 @@
 }
 
 // QPointF::operator>>(QDataStream & arg__1)
-QTD_EXTERN QTD_DLL_EXPORT void qtd_QPointF_readFrom_QDataStream
+QTD_EXTERN QTD_EXPORT void qtd_QPointF_readFrom_QDataStream
 (void* __this_nativeId,
  void* arg__1)
 {
--- a/cpp/qt_core/QPoint_shell.cpp	Mon Jul 12 22:50:58 2010 +0300
+++ b/cpp/qt_core/QPoint_shell.cpp	Fri Jul 16 20:04:29 2010 +0300
@@ -5,7 +5,7 @@
 
 
 // QPoint::manhattanLength() const
-QTD_EXTERN QTD_DLL_EXPORT int qtd_QPoint_manhattanLength
+QTD_EXTERN QTD_EXPORT int qtd_QPoint_manhattanLength
 (void* __this_nativeId)
 {
     QPoint *__qt_this = (QPoint *) __this_nativeId;
@@ -17,7 +17,7 @@
 }
 
 // QPoint::operator<<(QDataStream & arg__1)
-QTD_EXTERN QTD_DLL_EXPORT void qtd_QPoint_writeTo_QDataStream
+QTD_EXTERN QTD_EXPORT void qtd_QPoint_writeTo_QDataStream
 (void* __this_nativeId,
  void* arg__1)
 {
@@ -28,7 +28,7 @@
 }
 
 // QPoint::operator>>(QDataStream & arg__1)
-QTD_EXTERN QTD_DLL_EXPORT void qtd_QPoint_readFrom_QDataStream
+QTD_EXTERN QTD_EXPORT void qtd_QPoint_readFrom_QDataStream
 (void* __this_nativeId,
  void* arg__1)
 {
--- a/cpp/qt_core/QRectF_shell.cpp	Mon Jul 12 22:50:58 2010 +0300
+++ b/cpp/qt_core/QRectF_shell.cpp	Fri Jul 16 20:04:29 2010 +0300
@@ -5,7 +5,7 @@
 
 
 // QRectF::contains(const QPointF & p) const
-QTD_EXTERN QTD_DLL_PUBLIC bool qtd_QRectF_contains_QPointF
+QTD_EXTERN QTD_EXPORT bool qtd_QRectF_contains_QPointF
 (void* __this_nativeId,
  void* p0)
 {
@@ -20,7 +20,7 @@
 }
 
 // QRectF::contains(const QRectF & r) const
-QTD_EXTERN QTD_DLL_PUBLIC bool qtd_QRectF_contains_QRectF
+QTD_EXTERN QTD_EXPORT bool qtd_QRectF_contains_QRectF
 (void* __this_nativeId,
  void* r0)
 {
@@ -34,7 +34,7 @@
 }
 
 // QRectF::intersects(const QRectF & r) const
-QTD_EXTERN QTD_DLL_PUBLIC bool qtd_QRectF_intersects_QRectF
+QTD_EXTERN QTD_EXPORT bool qtd_QRectF_intersects_QRectF
 (void* __this_nativeId,
  void* r0)
 {
@@ -48,7 +48,7 @@
 }
 
 // QRectF::normalized() const
-QTD_EXTERN QTD_DLL_PUBLIC QRectF qtd_QRectF_normalized
+QTD_EXTERN QTD_EXPORT QRectF qtd_QRectF_normalized
 (void* __this_nativeId)
 {
     QRectF *__qt_this = (QRectF *) __this_nativeId;
@@ -56,7 +56,7 @@
 }
 
 // QRectF::operator&(const QRectF & r) const
-QTD_EXTERN QTD_DLL_PUBLIC QRectF qtd_QRectF_operator_and_QRectF
+QTD_EXTERN QTD_EXPORT QRectF qtd_QRectF_operator_and_QRectF
 (void* __this_nativeId,
  void* r0)
 {
@@ -66,7 +66,7 @@
 }
 
 // QRectF::operator<<(QDataStream & arg__1)
-QTD_EXTERN QTD_DLL_PUBLIC void qtd_QRectF_writeTo_QDataStream
+QTD_EXTERN QTD_EXPORT void qtd_QRectF_writeTo_QDataStream
 (void* __this_nativeId,
  void* arg__1)
 {
@@ -77,7 +77,7 @@
 }
 
 // QRectF::operator>>(QDataStream & arg__1)
-QTD_EXTERN QTD_DLL_PUBLIC void qtd_QRectF_readFrom_QDataStream
+QTD_EXTERN QTD_EXPORT void qtd_QRectF_readFrom_QDataStream
 (void* __this_nativeId,
  void* arg__1)
 {
@@ -88,7 +88,7 @@
 }
 
 // QRectF::operator|(const QRectF & r) const
-QTD_EXTERN QTD_DLL_PUBLIC QRectF qtd_QRectF_operator_or_QRectF
+QTD_EXTERN QTD_EXPORT QRectF qtd_QRectF_operator_or_QRectF
 (void* __this_nativeId,
  void* r0)
 {
@@ -98,7 +98,7 @@
 }
 
 // QRectF::toAlignedRect() const
-QTD_EXTERN QTD_DLL_PUBLIC QRect qtd_QRectF_toAlignedRect
+QTD_EXTERN QTD_EXPORT QRect qtd_QRectF_toAlignedRect
 (void* __this_nativeId)
 {
     QRectF *__qt_this = (QRectF *) __this_nativeId;
--- a/cpp/qt_core/QRect_shell.cpp	Mon Jul 12 22:50:58 2010 +0300
+++ b/cpp/qt_core/QRect_shell.cpp	Fri Jul 16 20:04:29 2010 +0300
@@ -4,7 +4,7 @@
 #include "qtd_core.h"
 
 // QRect::contains(const QPoint & p, bool proper) const
-QTD_EXTERN QTD_DLL_PUBLIC bool qtd_QRect_contains_QPoint_bool
+QTD_EXTERN QTD_EXPORT bool qtd_QRect_contains_QPoint_bool
 (void* __this_nativeId,
  void* p0,
  bool proper1)
@@ -19,7 +19,7 @@
 }
 
 // QRect::contains(const QRect & r, bool proper) const
-QTD_EXTERN QTD_DLL_PUBLIC bool qtd_QRect_contains_QRect_bool
+QTD_EXTERN QTD_EXPORT bool qtd_QRect_contains_QRect_bool
 (void* __this_nativeId,
  void* r0,
  bool proper1)
@@ -34,7 +34,7 @@
 }
 
 // QRect::intersects(const QRect & r) const
-QTD_EXTERN QTD_DLL_PUBLIC bool qtd_QRect_intersects_QRect
+QTD_EXTERN QTD_EXPORT bool qtd_QRect_intersects_QRect
 (void* __this_nativeId,
  void* r0)
 {
@@ -48,7 +48,7 @@
 }
 
 // QRect::normalized() const
-QTD_EXTERN QTD_DLL_PUBLIC QRect qtd_QRect_normalized
+QTD_EXTERN QTD_EXPORT QRect qtd_QRect_normalized
 (void* __this_nativeId)
 {
     QRect *__qt_this = (QRect *) __this_nativeId;
@@ -56,7 +56,7 @@
 }
 
 // QRect::operator&(const QRect & r) const
-QTD_EXTERN QTD_DLL_PUBLIC QRect qtd_QRect_operator_and_QRect
+QTD_EXTERN QTD_EXPORT QRect qtd_QRect_operator_and_QRect
 (void* __this_nativeId,
  void* r0)
 {
@@ -66,7 +66,7 @@
 }
 
 // QRect::operator<<(QDataStream & arg__1)
-QTD_EXTERN QTD_DLL_PUBLIC void qtd_QRect_writeTo_QDataStream
+QTD_EXTERN QTD_EXPORT void qtd_QRect_writeTo_QDataStream
 (void* __this_nativeId,
  void* arg__1)
 {
@@ -77,7 +77,7 @@
 }
 
 // QRect::operator>>(QDataStream & arg__1)
-QTD_EXTERN QTD_DLL_PUBLIC void qtd_QRect_readFrom_QDataStream
+QTD_EXTERN QTD_EXPORT void qtd_QRect_readFrom_QDataStream
 (void* __this_nativeId,
  void* arg__1)
 {
@@ -88,7 +88,7 @@
 }
 
 // QRect::operator|(const QRect & r) const
-QTD_EXTERN QTD_DLL_PUBLIC QRect qtd_QRect_operator_or_QRect
+QTD_EXTERN QTD_EXPORT QRect qtd_QRect_operator_or_QRect
 (void* __this_nativeId,
  void* r0)
 {
--- a/cpp/qt_core/QSizeF_shell.cpp	Mon Jul 12 22:50:58 2010 +0300
+++ b/cpp/qt_core/QSizeF_shell.cpp	Fri Jul 16 20:04:29 2010 +0300
@@ -3,7 +3,7 @@
 #include "qtd_core.h"
 
 // QSizeF::operator<<(QDataStream & arg__1)
-QTD_EXTERN QTD_DLL_PUBLIC void __qtd_QSizeF_writeTo_QDataStream
+QTD_EXTERN QTD_EXPORT void __qtd_QSizeF_writeTo_QDataStream
 (void* __this_nativeId,
  void* arg__1)
 {
@@ -14,7 +14,7 @@
 }
 
 // QSizeF::operator>>(QDataStream & arg__1)
-QTD_EXTERN QTD_DLL_PUBLIC void __qtd_QSizeF_readFrom_QDataStream
+QTD_EXTERN QTD_EXPORT void __qtd_QSizeF_readFrom_QDataStream
 (void* __this_nativeId,
  void* arg__1)
 {
@@ -25,7 +25,7 @@
 }
 
 // QSizeF::scale(const QSizeF & s, Qt::AspectRatioMode mode)
-QTD_EXTERN QTD_DLL_PUBLIC void __qtd_QSizeF_scale_QSizeF_AspectRatioMode
+QTD_EXTERN QTD_EXPORT void __qtd_QSizeF_scale_QSizeF_AspectRatioMode
 (void* __this_nativeId,
  void* s0,
  int mode1)
--- a/cpp/qt_core/QSize_shell.cpp	Mon Jul 12 22:50:58 2010 +0300
+++ b/cpp/qt_core/QSize_shell.cpp	Fri Jul 16 20:04:29 2010 +0300
@@ -4,7 +4,7 @@
 
 
 // QSize::operator<<(QDataStream & arg__1)
-QTD_EXTERN QTD_DLL_PUBLIC void __qtd_QSize_writeTo_QDataStream
+QTD_EXTERN QTD_EXPORT void __qtd_QSize_writeTo_QDataStream
 (void* __this_nativeId,
  void* arg__1)
 {
@@ -15,7 +15,7 @@
 }
 
 // QSize::operator>>(QDataStream & arg__1)
-QTD_EXTERN QTD_DLL_PUBLIC void __qtd_QSize_readFrom_QDataStream
+QTD_EXTERN QTD_EXPORT void __qtd_QSize_readFrom_QDataStream
 (void* __this_nativeId,
  void* arg__1)
 {
@@ -26,7 +26,7 @@
 }
 
 // QSize::scale(const QSize & s, Qt::AspectRatioMode mode)
-QTD_EXTERN QTD_DLL_PUBLIC void __qtd_QSize_scale_QSize_AspectRatioMode
+QTD_EXTERN QTD_EXPORT void __qtd_QSize_scale_QSize_AspectRatioMode
 (void* __this_nativeId,
  void* s0,
  int mode1)
--- a/cpp/qt_core/QString_shell.cpp	Mon Jul 12 22:50:58 2010 +0300
+++ b/cpp/qt_core/QString_shell.cpp	Fri Jul 16 20:04:29 2010 +0300
@@ -1,21 +1,21 @@
 #include <QString>
 #include "qtd_core.h"
 
-QTD_EXTERN QTD_DLL_PUBLIC const ushort* qtd_QString_utf16
+QTD_EXTERN QTD_EXPORT const ushort* qtd_QString_utf16
 (void* __this_nativeId)
 {
     QString *__qt_this = (QString *) __this_nativeId;
     return __qt_this->utf16();
 }
 
-QTD_EXTERN QTD_DLL_PUBLIC int qtd_QString_size
+QTD_EXTERN QTD_EXPORT int qtd_QString_size
 (void* __this_nativeId)
 {
     QString *__qt_this = (QString *) __this_nativeId;
     return __qt_this->size();
 }
 
-QTD_EXTERN QTD_DLL_PUBLIC void qtd_QString_operatorAssign
+QTD_EXTERN QTD_EXPORT void qtd_QString_operatorAssign
 (void* __this_nativeId,
  DArray text)
 {
@@ -23,18 +23,18 @@
     *__qt_this = QString::fromUtf8((const char *)text.ptr, text.length);
 }
 
-QTD_EXTERN QTD_DLL_PUBLIC void qtd_QString_destructor(void *ptr)
+QTD_EXTERN QTD_EXPORT void qtd_QString_destructor(void *ptr)
 {
     delete (QString *)ptr;
 }
 
-QTD_EXTERN QTD_DLL_PUBLIC void qtd_QString_call_destructor(QString *ptr)
+QTD_EXTERN QTD_EXPORT void qtd_QString_call_destructor(QString *ptr)
 {
     ptr->~QString();
 }
 
 
-QTD_EXTERN QTD_DLL_PUBLIC void* qtd_QString_QString_QString
+QTD_EXTERN QTD_EXPORT void* qtd_QString_QString_QString
 (void* string0)
 {
     const QString&  __qt_string0 = (const QString& ) *(QString *)string0;
@@ -42,7 +42,7 @@
     return (void *) __qt_this;
 }
 
-QTD_EXTERN QTD_DLL_PUBLIC void* qtd_QString_new_fromUtf8_at
+QTD_EXTERN QTD_EXPORT void* qtd_QString_new_fromUtf8_at
 (void* place, DArray text)
 {
     QString *__qt_this = new(place) QString;
@@ -50,17 +50,17 @@
     return __qt_this;
 }
 
-QTD_EXTERN QTD_DLL_PUBLIC void* qtd_QString_placed_copy(void* string0, void* place) {
+QTD_EXTERN QTD_EXPORT void* qtd_QString_placed_copy(void* string0, void* place) {
     const QString&  __qt_string0 = (const QString& ) *(QString *)string0;
     QString *result = new (place)QString((const QString& )__qt_string0);
     return (void *) result;
 }
 
-QTD_EXTERN QTD_DLL_PUBLIC void qtd_QString_placed_ctor(void* place) {
+QTD_EXTERN QTD_EXPORT void qtd_QString_placed_ctor(void* place) {
     new (place) QString();
 }
 
-QTD_EXTERN QTD_DLL_PUBLIC void qtd_QString_assign_fromUtf8
+QTD_EXTERN QTD_EXPORT void qtd_QString_assign_fromUtf8
 (QString *__qt_this, DArray text)
 {
     *__qt_this = QString::fromUtf8((const char *)text.ptr, text.length);
--- a/cpp/qt_core/QVariant_shell.cpp	Mon Jul 12 22:50:58 2010 +0300
+++ b/cpp/qt_core/QVariant_shell.cpp	Fri Jul 16 20:04:29 2010 +0300
@@ -17,12 +17,12 @@
 #include <qvariant.h>
 
 #include "qtd_core.h"
-QTD_EXTERN QTD_DLL_PUBLIC void qtd_QVariant_destructor(void *ptr)
+QTD_EXTERN QTD_EXPORT void qtd_QVariant_destructor(void *ptr)
 {
     delete (QVariant *)ptr;
 }
 
-QTD_EXTERN QTD_DLL_PUBLIC void qtd_QVariant_call_destructor(QVariant *ptr)
+QTD_EXTERN QTD_EXPORT void qtd_QVariant_call_destructor(QVariant *ptr)
 {
     ptr->~QVariant();
 }
@@ -217,7 +217,7 @@
 // Write virtual function overries used to decide on static/virtual calls
 // ---externC---
 // QVariant::QVariant()
-QTD_EXTERN QTD_DLL_PUBLIC void* qtd_QVariant_QVariant
+QTD_EXTERN QTD_EXPORT void* qtd_QVariant_QVariant
 ()
 {
     QVariant_QtDShell *__qt_this = new QVariant_QtDShell();
@@ -226,7 +226,7 @@
 }
 
 // QVariant::QVariant(QDataStream & s)
-QTD_EXTERN QTD_DLL_PUBLIC void* qtd_QVariant_QVariant_QDataStream
+QTD_EXTERN QTD_EXPORT void* qtd_QVariant_QVariant_QDataStream
 (void* s0)
 {
     QDataStream&  __qt_s0 = (QDataStream& ) * (QDataStream *) s0;
@@ -236,7 +236,7 @@
 }
 
 // QVariant::QVariant(Qt::GlobalColor color)
-QTD_EXTERN QTD_DLL_PUBLIC void* qtd_QVariant_QVariant_GlobalColor
+QTD_EXTERN QTD_EXPORT void* qtd_QVariant_QVariant_GlobalColor
 (int color0)
 {
     Qt::GlobalColor __qt_color0 = (Qt::GlobalColor) color0;
@@ -246,7 +246,7 @@
 }
 
 // QVariant::QVariant(bool b)
-QTD_EXTERN QTD_DLL_PUBLIC void* qtd_QVariant_QVariant_bool
+QTD_EXTERN QTD_EXPORT void* qtd_QVariant_QVariant_bool
 (bool b0)
 {
     QVariant_QtDShell *__qt_this = new QVariant_QtDShell((bool )b0);
@@ -255,7 +255,7 @@
 }
 
 // QVariant::QVariant(const QBitArray & bitarray)
-QTD_EXTERN QTD_DLL_PUBLIC void* qtd_QVariant_QVariant_QBitArray
+QTD_EXTERN QTD_EXPORT void* qtd_QVariant_QVariant_QBitArray
 (void* bitarray0)
 {
     const QBitArray&  __qt_bitarray0 = (const QBitArray& ) *(QBitArray *)bitarray0;
@@ -265,7 +265,7 @@
 }
 
 // QVariant::QVariant(const QByteArray & bytearray)
-QTD_EXTERN QTD_DLL_PUBLIC void* qtd_QVariant_QVariant_QByteArray
+QTD_EXTERN QTD_EXPORT void* qtd_QVariant_QVariant_QByteArray
 (void* bytearray0)
 {
     const QByteArray&  __qt_bytearray0 = (const QByteArray& ) *(QByteArray *)bytearray0;
@@ -276,7 +276,7 @@
 
 // QVariant::QVariant(const QChar & qchar)
 // QVariant::QVariant(const QDate & date)
-QTD_EXTERN QTD_DLL_PUBLIC void* qtd_QVariant_QVariant_QDate
+QTD_EXTERN QTD_EXPORT void* qtd_QVariant_QVariant_QDate
 (void* date0)
 {
     const QDate&  __qt_date0 = (const QDate& ) *(QDate *)date0;
@@ -286,7 +286,7 @@
 }
 
 // QVariant::QVariant(const QDateTime & datetime)
-QTD_EXTERN QTD_DLL_PUBLIC void* qtd_QVariant_QVariant_QDateTime
+QTD_EXTERN QTD_EXPORT void* qtd_QVariant_QVariant_QDateTime
 (void* datetime0)
 {
     const QDateTime&  __qt_datetime0 = (const QDateTime& ) *(QDateTime *)datetime0;
@@ -296,7 +296,7 @@
 }
 
 // QVariant::QVariant(const QLine & line)
-QTD_EXTERN QTD_DLL_PUBLIC void* qtd_QVariant_QVariant_QLine
+QTD_EXTERN QTD_EXPORT void* qtd_QVariant_QVariant_QLine
 (void* line0)
 {
     const QLine&  __qt_line0 = (const QLine& ) *(QLine *)line0;
@@ -306,7 +306,7 @@
 }
 
 // QVariant::QVariant(const QLineF & line)
-QTD_EXTERN QTD_DLL_PUBLIC void* qtd_QVariant_QVariant_QLineF
+QTD_EXTERN QTD_EXPORT void* qtd_QVariant_QVariant_QLineF
 (void* line0)
 {
     const QLineF&  __qt_line0 = (const QLineF& ) *(QLineF *)line0;
@@ -317,7 +317,7 @@
 
 // QVariant::QVariant(const QList<QVariant > & list)
 // QVariant::QVariant(const QLocale & locale)
-QTD_EXTERN QTD_DLL_PUBLIC void* qtd_QVariant_QVariant_QLocale
+QTD_EXTERN QTD_EXPORT void* qtd_QVariant_QVariant_QLocale
 (void* locale0)
 {
     const QLocale&  __qt_locale0 = (const QLocale& ) *(QLocale *)locale0;
@@ -328,7 +328,7 @@
 
 // QVariant::QVariant(const QMap<QString, QVariant > & map)
 // QVariant::QVariant(const QPoint & pt)
-QTD_EXTERN QTD_DLL_PUBLIC void* qtd_QVariant_QVariant_QPoint
+QTD_EXTERN QTD_EXPORT void* qtd_QVariant_QVariant_QPoint
 (void* pt0)
 {
     const QPoint&  __qt_pt0 = (const QPoint& ) *(QPoint *)pt0;
@@ -338,7 +338,7 @@
 }
 
 // QVariant::QVariant(const QPointF & pt)
-QTD_EXTERN QTD_DLL_PUBLIC void* qtd_QVariant_QVariant_QPointF
+QTD_EXTERN QTD_EXPORT void* qtd_QVariant_QVariant_QPointF
 (void* pt0)
 {
     const QPointF&  __qt_pt0 = (const QPointF& ) *(QPointF *)pt0;
@@ -348,7 +348,7 @@
 }
 
 // QVariant::QVariant(const QRect & rect)
-QTD_EXTERN QTD_DLL_PUBLIC void* qtd_QVariant_QVariant_QRect
+QTD_EXTERN QTD_EXPORT void* qtd_QVariant_QVariant_QRect
 (void* rect0)
 {
     const QRect&  __qt_rect0 = (const QRect& ) *(QRect *)rect0;
@@ -358,7 +358,7 @@
 }
 
 // QVariant::QVariant(const QRectF & rect)
-QTD_EXTERN QTD_DLL_PUBLIC void* qtd_QVariant_QVariant_QRectF
+QTD_EXTERN QTD_EXPORT void* qtd_QVariant_QVariant_QRectF
 (void* rect0)
 {
     const QRectF&  __qt_rect0 = (const QRectF& ) *(QRectF *)rect0;
@@ -368,7 +368,7 @@
 }
 
 // QVariant::QVariant(const QRegExp & regExp)
-QTD_EXTERN QTD_DLL_PUBLIC void* qtd_QVariant_QVariant_QRegExp
+QTD_EXTERN QTD_EXPORT void* qtd_QVariant_QVariant_QRegExp
 (void* regExp0)
 {
     const QRegExp&  __qt_regExp0 = (const QRegExp& ) *(QRegExp *)regExp0;
@@ -378,7 +378,7 @@
 }
 
 // QVariant::QVariant(const QSize & size)
-QTD_EXTERN QTD_DLL_PUBLIC void* qtd_QVariant_QVariant_QSize
+QTD_EXTERN QTD_EXPORT void* qtd_QVariant_QVariant_QSize
 (void* size0)
 {
     const QSize&  __qt_size0 = (const QSize& ) *(QSize *)size0;
@@ -388,7 +388,7 @@
 }
 
 // QVariant::QVariant(const QSizeF & size)
-QTD_EXTERN QTD_DLL_PUBLIC void* qtd_QVariant_QVariant_QSizeF
+QTD_EXTERN QTD_EXPORT void* qtd_QVariant_QVariant_QSizeF
 (void* size0)
 {
     const QSizeF&  __qt_size0 = (const QSizeF& ) *(QSizeF *)size0;
@@ -398,7 +398,7 @@
 }
 
 // QVariant::QVariant(const QString & string)
-QTD_EXTERN QTD_DLL_PUBLIC void* qtd_QVariant_QVariant_String
+QTD_EXTERN QTD_EXPORT void* qtd_QVariant_QVariant_String
 (DArray string0)
 {
     QString __qt_string0 = QString::fromUtf8((const char *)string0.ptr, string0.length);
@@ -409,7 +409,7 @@
 
 // QVariant::QVariant(const QStringList & stringlist)
 // QVariant::QVariant(const QTime & time)
-QTD_EXTERN QTD_DLL_PUBLIC void* qtd_QVariant_QVariant_QTime
+QTD_EXTERN QTD_EXPORT void* qtd_QVariant_QVariant_QTime
 (void* time0)
 {
     const QTime&  __qt_time0 = (const QTime& ) *(QTime *)time0;
@@ -419,7 +419,7 @@
 }
 
 // QVariant::QVariant(const QUrl & url)
-QTD_EXTERN QTD_DLL_PUBLIC void* qtd_QVariant_QVariant_QUrl
+QTD_EXTERN QTD_EXPORT void* qtd_QVariant_QVariant_QUrl
 (void* url0)
 {
     const QUrl&  __qt_url0 = (const QUrl& ) *(QUrl *)url0;
@@ -429,7 +429,7 @@
 }
 
 // QVariant::QVariant(const QVariant & other)
-QTD_EXTERN QTD_DLL_PUBLIC void* qtd_QVariant_QVariant_QVariant
+QTD_EXTERN QTD_EXPORT void* qtd_QVariant_QVariant_QVariant
 (void* other0)
 {
     const QVariant&  __qt_other0 = (const QVariant& ) *(QVariant *)other0;
@@ -439,7 +439,7 @@
 }
 
 // QVariant::QVariant(const char * str)
-QTD_EXTERN QTD_DLL_PUBLIC void* qtd_QVariant_QVariant_nativepointerchar
+QTD_EXTERN QTD_EXPORT void* qtd_QVariant_QVariant_nativepointerchar
 (char* str0)
 {
     const char*  __qt_str0 = (const char* ) str0;
@@ -449,7 +449,7 @@
 }
 
 // QVariant::QVariant(double d)
-QTD_EXTERN QTD_DLL_PUBLIC void* qtd_QVariant_QVariant_double
+QTD_EXTERN QTD_EXPORT void* qtd_QVariant_QVariant_double
 (double d0)
 {
     QVariant_QtDShell *__qt_this = new QVariant_QtDShell((double )d0);
@@ -458,7 +458,7 @@
 }
 
 // QVariant::QVariant(int i)
-QTD_EXTERN QTD_DLL_PUBLIC void* qtd_QVariant_QVariant_int
+QTD_EXTERN QTD_EXPORT void* qtd_QVariant_QVariant_int
 (int i0)
 {
     QVariant_QtDShell *__qt_this = new QVariant_QtDShell((int )i0);
@@ -467,7 +467,7 @@
 }
 
 // QVariant::QVariant(int typeOrUserType, const void * copy)
-QTD_EXTERN QTD_DLL_PUBLIC void* qtd_QVariant_QVariant_int_nativepointervoid
+QTD_EXTERN QTD_EXPORT void* qtd_QVariant_QVariant_int_nativepointervoid
 (int typeOrUserType0,
  void* copy1)
 {
@@ -478,7 +478,7 @@
 }
 
 // QVariant::QVariant(long long ll)
-QTD_EXTERN QTD_DLL_PUBLIC void* qtd_QVariant_QVariant_long
+QTD_EXTERN QTD_EXPORT void* qtd_QVariant_QVariant_long
 (qint64 ll0)
 {
     QVariant_QtDShell *__qt_this = new QVariant_QtDShell((qint64 )ll0);
@@ -487,7 +487,7 @@
 }
 
 // QVariant::QVariant(uint ui)
-QTD_EXTERN QTD_DLL_PUBLIC void* qtd_QVariant_QVariant_uint
+QTD_EXTERN QTD_EXPORT void* qtd_QVariant_QVariant_uint
 (uint ui0)
 {
     QVariant_QtDShell *__qt_this = new QVariant_QtDShell((uint )ui0);
@@ -496,7 +496,7 @@
 }
 
 // QVariant::QVariant(unsigned long long ull)
-QTD_EXTERN QTD_DLL_PUBLIC void* qtd_QVariant_QVariant_ulong
+QTD_EXTERN QTD_EXPORT void* qtd_QVariant_QVariant_ulong
 (quint64 ull0)
 {
     QVariant_QtDShell *__qt_this = new QVariant_QtDShell((quint64 )ull0);
@@ -505,7 +505,7 @@
 }
 
 // QVariant::canConvert() const
-QTD_EXTERN QTD_DLL_PUBLIC bool qtd_QVariant_canConvert
+QTD_EXTERN QTD_EXPORT bool qtd_QVariant_canConvert
 (void* __this_nativeId, QVariant::Type type)
 {
     QVariant_QtDShell *__qt_this = (QVariant_QtDShell *) __this_nativeId;
@@ -517,7 +517,7 @@
 }
 
 // QVariant::clear()
-QTD_EXTERN QTD_DLL_PUBLIC void qtd_QVariant_clear
+QTD_EXTERN QTD_EXPORT void qtd_QVariant_clear
 (void* __this_nativeId)
 {
     QVariant_QtDShell *__qt_this = (QVariant_QtDShell *) __this_nativeId;
@@ -526,7 +526,7 @@
 }
 
 // QVariant::cmp(const QVariant & other) const
-QTD_EXTERN QTD_DLL_PUBLIC bool qtd_QVariant_cmp_QVariant
+QTD_EXTERN QTD_EXPORT bool qtd_QVariant_cmp_QVariant
 (void* __this_nativeId,
  void* other0)
 {
@@ -540,7 +540,7 @@
 }
 
 // QVariant::create(int type, const void * copy)
-QTD_EXTERN QTD_DLL_PUBLIC void qtd_QVariant_create_int_nativepointervoid
+QTD_EXTERN QTD_EXPORT void qtd_QVariant_create_int_nativepointervoid
 (void* __this_nativeId,
  int type0,
  void* copy1)
@@ -552,7 +552,7 @@
 }
 
 // QVariant::isNull() const
-QTD_EXTERN QTD_DLL_PUBLIC bool qtd_QVariant_isNull
+QTD_EXTERN QTD_EXPORT bool qtd_QVariant_isNull
 (void* __this_nativeId)
 {
     QVariant_QtDShell *__qt_this = (QVariant_QtDShell *) __this_nativeId;
@@ -564,7 +564,7 @@
 }
 
 // QVariant::isValid() const
-QTD_EXTERN QTD_DLL_PUBLIC bool qtd_QVariant_isValid
+QTD_EXTERN QTD_EXPORT bool qtd_QVariant_isValid
 (void* __this_nativeId)
 {
     QVariant_QtDShell *__qt_this = (QVariant_QtDShell *) __this_nativeId;
@@ -576,7 +576,7 @@
 }
 
 // QVariant::load(QDataStream & ds)
-QTD_EXTERN QTD_DLL_PUBLIC void qtd_QVariant_load_QDataStream
+QTD_EXTERN QTD_EXPORT void qtd_QVariant_load_QDataStream
 (void* __this_nativeId,
  void* ds0)
 {
@@ -587,7 +587,7 @@
 }
 
 // QVariant::operator<<(QDataStream & s)
-QTD_EXTERN QTD_DLL_PUBLIC void qtd_QVariant_writeTo_QDataStream
+QTD_EXTERN QTD_EXPORT void qtd_QVariant_writeTo_QDataStream
 (void* __this_nativeId,
  void* s0)
 {
@@ -598,7 +598,7 @@
 }
 
 // QVariant::operator=(const QVariant & other)
-QTD_EXTERN QTD_DLL_PUBLIC void* qtd_QVariant_operator_assign_QVariant
+QTD_EXTERN QTD_EXPORT void* qtd_QVariant_operator_assign_QVariant
 (void* __this_nativeId,
  void* other0)
 {
@@ -612,7 +612,7 @@
 }
 
 // QVariant::operator==(const QVariant & v) const
-QTD_EXTERN QTD_DLL_PUBLIC bool qtd_QVariant_operator_equal_QVariant
+QTD_EXTERN QTD_EXPORT bool qtd_QVariant_operator_equal_QVariant
 (void* __this_nativeId,
  void* v0)
 {
@@ -626,7 +626,7 @@
 }
 
 // QVariant::operator>>(QDataStream & s)
-QTD_EXTERN QTD_DLL_PUBLIC void qtd_QVariant_readFrom_QDataStream
+QTD_EXTERN QTD_EXPORT void qtd_QVariant_readFrom_QDataStream
 (void* __this_nativeId,
  void* s0)
 {
@@ -637,7 +637,7 @@
 }
 
 // QVariant::save(QDataStream & ds) const
-QTD_EXTERN QTD_DLL_PUBLIC void qtd_QVariant_save_QDataStream
+QTD_EXTERN QTD_EXPORT void qtd_QVariant_save_QDataStream
 (void* __this_nativeId,
  void* ds0)
 {
@@ -648,7 +648,7 @@
 }
 
 // QVariant::toBitArray() const
-QTD_EXTERN QTD_DLL_PUBLIC void* qtd_QVariant_toBitArray
+QTD_EXTERN QTD_EXPORT void* qtd_QVariant_toBitArray
 (void* __this_nativeId)
 {
     QVariant_QtDShell *__qt_this = (QVariant_QtDShell *) __this_nativeId;
@@ -660,7 +660,7 @@
 }
 
 // QVariant::toBool() const
-QTD_EXTERN QTD_DLL_PUBLIC bool qtd_QVariant_toBool
+QTD_EXTERN QTD_EXPORT bool qtd_QVariant_toBool
 (void* __this_nativeId)
 {
     QVariant_QtDShell *__qt_this = (QVariant_QtDShell *) __this_nativeId;
@@ -672,7 +672,7 @@
 }
 
 // QVariant::toByteArray() const
-QTD_EXTERN QTD_DLL_PUBLIC void* qtd_QVariant_toByteArray
+QTD_EXTERN QTD_EXPORT void* qtd_QVariant_toByteArray
 (void* __this_nativeId)
 {
     QVariant_QtDShell *__qt_this = (QVariant_QtDShell *) __this_nativeId;
@@ -685,7 +685,7 @@
 
 // QVariant::toChar() const
 // QVariant::toDate() const
-QTD_EXTERN QTD_DLL_PUBLIC void* qtd_QVariant_toDate
+QTD_EXTERN QTD_EXPORT void* qtd_QVariant_toDate
 (void* __this_nativeId)
 {
     QVariant_QtDShell *__qt_this = (QVariant_QtDShell *) __this_nativeId;
@@ -697,7 +697,7 @@
 }
 
 // QVariant::toDateTime() const
-QTD_EXTERN QTD_DLL_PUBLIC void* qtd_QVariant_toDateTime
+QTD_EXTERN QTD_EXPORT void* qtd_QVariant_toDateTime
 (void* __this_nativeId)
 {
     QVariant_QtDShell *__qt_this = (QVariant_QtDShell *) __this_nativeId;
@@ -709,7 +709,7 @@
 }
 
 // QVariant::toDouble(bool * ok) const
-QTD_EXTERN QTD_DLL_PUBLIC double qtd_QVariant_toDouble_nativepointerbool
+QTD_EXTERN QTD_EXPORT double qtd_QVariant_toDouble_nativepointerbool
 (void* __this_nativeId,
  bool* ok0)
 {
@@ -723,7 +723,7 @@
 }
 
 // QVariant::toInt(bool * ok) const
-QTD_EXTERN QTD_DLL_PUBLIC int qtd_QVariant_toInt_nativepointerbool
+QTD_EXTERN QTD_EXPORT int qtd_QVariant_toInt_nativepointerbool
 (void* __this_nativeId,
  bool* ok0)
 {
@@ -737,7 +737,7 @@
 }
 
 // QVariant::toLine() const
-QTD_EXTERN QTD_DLL_PUBLIC QLine qtd_QVariant_toLine
+QTD_EXTERN QTD_EXPORT QLine qtd_QVariant_toLine
 (void* __this_nativeId)
 {
     QVariant_QtDShell *__qt_this = (QVariant_QtDShell *) __this_nativeId;
@@ -745,7 +745,7 @@
 }
 
 // QVariant::toLineF() const
-QTD_EXTERN QTD_DLL_PUBLIC QLineF qtd_QVariant_toLineF
+QTD_EXTERN QTD_EXPORT QLineF qtd_QVariant_toLineF
 (void* __this_nativeId)
 {
     QVariant_QtDShell *__qt_this = (QVariant_QtDShell *) __this_nativeId;
@@ -754,7 +754,7 @@
 
 // QVariant::toList() const
 // QVariant::toLocale() const
-QTD_EXTERN QTD_DLL_PUBLIC void* qtd_QVariant_toLocale
+QTD_EXTERN QTD_EXPORT void* qtd_QVariant_toLocale
 (void* __this_nativeId)
 {
     QVariant_QtDShell *__qt_this = (QVariant_QtDShell *) __this_nativeId;
@@ -766,7 +766,7 @@
 }
 
 // QVariant::toLongLong(bool * ok) const
-QTD_EXTERN QTD_DLL_PUBLIC qint64 qtd_QVariant_toLongLong_nativepointerbool
+QTD_EXTERN QTD_EXPORT qint64 qtd_QVariant_toLongLong_nativepointerbool
 (void* __this_nativeId,
  bool* ok0)
 {
@@ -781,7 +781,7 @@
 
 // QVariant::toMap() const
 // QVariant::toPoint() const
-QTD_EXTERN QTD_DLL_PUBLIC QPoint qtd_QVariant_toPoint
+QTD_EXTERN QTD_EXPORT QPoint qtd_QVariant_toPoint
 (void* __this_nativeId)
 {
     QVariant_QtDShell *__qt_this = (QVariant_QtDShell *) __this_nativeId;
@@ -791,7 +791,7 @@
 }
 
 // QVariant::toPointF() const
-QTD_EXTERN QTD_DLL_PUBLIC QPointF qtd_QVariant_toPointF
+QTD_EXTERN QTD_EXPORT QPointF qtd_QVariant_toPointF
 (void* __this_nativeId)
 {
     QVariant_QtDShell *__qt_this = (QVariant_QtDShell *) __this_nativeId;
@@ -801,7 +801,7 @@
 }
 
 // QVariant::toRect() const
-QTD_EXTERN QTD_DLL_PUBLIC QRect qtd_QVariant_toRect
+QTD_EXTERN QTD_EXPORT QRect qtd_QVariant_toRect
 (void* __this_nativeId)
 {
     QVariant_QtDShell *__qt_this = (QVariant_QtDShell *) __this_nativeId;
@@ -811,7 +811,7 @@
 }
 
 // QVariant::toRectF() const
-QTD_EXTERN QTD_DLL_PUBLIC QRectF qtd_QVariant_toRectF
+QTD_EXTERN QTD_EXPORT QRectF qtd_QVariant_toRectF
 (void* __this_nativeId)
 {
     QVariant_QtDShell *__qt_this = (QVariant_QtDShell *) __this_nativeId;
@@ -821,7 +821,7 @@
 }
 
 // QVariant::toRegExp() const
-QTD_EXTERN QTD_DLL_PUBLIC void* qtd_QVariant_toRegExp
+QTD_EXTERN QTD_EXPORT void* qtd_QVariant_toRegExp
 (void* __this_nativeId)
 {
     QVariant_QtDShell *__qt_this = (QVariant_QtDShell *) __this_nativeId;
@@ -833,7 +833,7 @@
 }
 
 // QVariant::toSize() const
-QTD_EXTERN QTD_DLL_PUBLIC QSize qtd_QVariant_toSize
+QTD_EXTERN QTD_EXPORT QSize qtd_QVariant_toSize
 (void* __this_nativeId)
 {
     QVariant_QtDShell *__qt_this = (QVariant_QtDShell *) __this_nativeId;
@@ -844,7 +844,7 @@
 }
 
 // QVariant::toSizeF() const
-QTD_EXTERN QTD_DLL_PUBLIC QSizeF qtd_QVariant_toSizeF
+QTD_EXTERN QTD_EXPORT QSizeF qtd_QVariant_toSizeF
 (void* __this_nativeId)
 {
     QVariant_QtDShell *__qt_this = (QVariant_QtDShell *) __this_nativeId;
@@ -855,7 +855,7 @@
 }
 
 // QVariant::toString() const
-QTD_EXTERN QTD_DLL_PUBLIC void qtd_QVariant_toString
+QTD_EXTERN QTD_EXPORT void qtd_QVariant_toString
 (void* __this_nativeId,
  void* __java_return_value)
 {
@@ -868,7 +868,7 @@
 
 // QVariant::toStringList() const
 // QVariant::toTime() const
-QTD_EXTERN QTD_DLL_PUBLIC void* qtd_QVariant_toTime
+QTD_EXTERN QTD_EXPORT void* qtd_QVariant_toTime
 (void* __this_nativeId)
 {
     QVariant_QtDShell *__qt_this = (QVariant_QtDShell *) __this_nativeId;
@@ -880,7 +880,7 @@
 }
 
 // QVariant::toUInt(bool * ok) const
-QTD_EXTERN QTD_DLL_PUBLIC uint qtd_QVariant_toUInt_nativepointerbool
+QTD_EXTERN QTD_EXPORT uint qtd_QVariant_toUInt_nativepointerbool
 (void* __this_nativeId,
  bool* ok0)
 {
@@ -894,7 +894,7 @@
 }
 
 // QVariant::toULongLong(bool * ok) const
-QTD_EXTERN QTD_DLL_PUBLIC quint64 qtd_QVariant_toULongLong_nativepointerbool
+QTD_EXTERN QTD_EXPORT quint64 qtd_QVariant_toULongLong_nativepointerbool
 (void* __this_nativeId,
  bool* ok0)
 {
@@ -908,7 +908,7 @@
 }
 
 // QVariant::toUrl() const
-QTD_EXTERN QTD_DLL_PUBLIC void* qtd_QVariant_toUrl
+QTD_EXTERN QTD_EXPORT void* qtd_QVariant_toUrl
 (void* __this_nativeId)
 {
     QVariant_QtDShell *__qt_this = (QVariant_QtDShell *) __this_nativeId;
@@ -920,7 +920,7 @@
 }
 
 // QVariant::typeName() const
-QTD_EXTERN QTD_DLL_PUBLIC char* qtd_QVariant_typeName
+QTD_EXTERN QTD_EXPORT char* qtd_QVariant_typeName
 (void* __this_nativeId)
 {
     QVariant_QtDShell *__qt_this = (QVariant_QtDShell *) __this_nativeId;
@@ -932,7 +932,7 @@
 }
 
 // QVariant::type() const
-QTD_EXTERN QTD_DLL_PUBLIC int qtd_QVariant_type
+QTD_EXTERN QTD_EXPORT int qtd_QVariant_type
 (void* __this_nativeId)
 {
     QVariant_QtDShell *__qt_this = (QVariant_QtDShell *) __this_nativeId;
@@ -944,7 +944,7 @@
 }
 
 // QVariant::userType() const
-QTD_EXTERN QTD_DLL_PUBLIC int qtd_QVariant_userType
+QTD_EXTERN QTD_EXPORT int qtd_QVariant_userType
 (void* __this_nativeId)
 {
     QVariant_QtDShell *__qt_this = (QVariant_QtDShell *) __this_nativeId;
@@ -955,7 +955,7 @@
     return __java_return_value;
 }
 
-QTD_EXTERN QTD_DLL_PUBLIC void *qtd_QVariant_data(void* __this_nativeId)
+QTD_EXTERN QTD_EXPORT void *qtd_QVariant_data(void* __this_nativeId)
 {
     QVariant_QtDShell *__qt_this = (QVariant_QtDShell *) __this_nativeId;
     return __qt_this->data();
@@ -966,7 +966,7 @@
 
 
 
-QTD_EXTERN QTD_DLL_PUBLIC void* qtd_QVariant_placed_copy(void* variant0, void* place) {
+QTD_EXTERN QTD_EXPORT void* qtd_QVariant_placed_copy(void* variant0, void* place) {
     const QVariant&  __qt_variant0 = (const QVariant& ) *(QVariant *)variant0;
     QVariant *result = new (place)QVariant((const QVariant& )__qt_variant0);
     return (void *) result;
--- a/cpp/qt_qtd/ArrayOpsPrimitive_shell.cpp	Mon Jul 12 22:50:58 2010 +0300
+++ b/cpp/qt_qtd/ArrayOpsPrimitive_shell.cpp	Fri Jul 16 20:04:29 2010 +0300
@@ -5,20 +5,20 @@
 
 #include "ArrayOpsPrimitive.h"
 
-QTD_EXPORT(CORE, allocate_int_array)
-QTD_EXPORT(CORE, assign_int_array_element)
-QTD_EXPORT(CORE, get_int_from_array)
+QTD_FUNC(CORE, allocate_int_array)
+QTD_FUNC(CORE, assign_int_array_element)
+QTD_FUNC(CORE, get_int_from_array)
 
-QTD_EXPORT(CORE, allocate_uint_array)
-QTD_EXPORT(CORE, assign_uint_array_element)
-QTD_EXPORT(CORE, get_uint_from_array)
+QTD_FUNC(CORE, allocate_uint_array)
+QTD_FUNC(CORE, assign_uint_array_element)
+QTD_FUNC(CORE, get_uint_from_array)
 
-QTD_EXPORT(CORE, allocate_double_array)
-QTD_EXPORT(CORE, assign_double_array_element)
-QTD_EXPORT(CORE, get_double_from_array)
+QTD_FUNC(CORE, allocate_double_array)
+QTD_FUNC(CORE, assign_double_array_element)
+QTD_FUNC(CORE, get_double_from_array)
 
-QTD_EXPORT(CORE, allocate_string_array)
-QTD_EXPORT(CORE, assign_string_array_element)
-QTD_EXPORT(CORE, string_from_array)
-QTD_EXPORT(CORE, get_string_from_array)
+QTD_FUNC(CORE, allocate_string_array)
+QTD_FUNC(CORE, assign_string_array_element)
+QTD_FUNC(CORE, string_from_array)
+QTD_FUNC(CORE, get_string_from_array)
 
--- a/cpp/qt_qtd/qtd_core.cpp	Mon Jul 12 22:50:58 2010 +0300
+++ b/cpp/qt_qtd/qtd_core.cpp	Fri Jul 16 20:04:29 2010 +0300
@@ -6,15 +6,15 @@
 #include "qtd_core.h"
 #include <typeinfo>
 
-QTD_EXPORT(CORE, toUtf8);
-QTD_EXPORT(CORE, QtdObject_delete);
+QTD_FUNC(CORE, toUtf8);
+QTD_FUNC(CORE, QtdObject_delete);
 
-QTD_EXTERN QTD_DLL_PUBLIC void qtdInitCore()
+QTD_EXTERN QTD_EXPORT void qtdInitCore()
 {
     QObjectLink::userDataId = QObject::registerUserData();
 }
 
-QTD_EXTERN QTD_DLL_PUBLIC bool qtdTypeInfosEqual(void* info1, void* info2)
+QTD_EXTERN QTD_EXPORT bool qtdTypeInfosEqual(void* info1, void* info2)
 {
     std::type_info* i1 = (std::type_info*)info1;
     std::type_info* i2 = (std::type_info*)info2;
@@ -22,12 +22,12 @@
     return i1 == i2 || strcmp(i1->name(), i2->name()) == 0;
 }
 
-QTD_EXTERN QTD_DLL_PUBLIC QModelIndex qtd_to_QModelIndex(QModelIndexAccessor mia)
+QTD_EXTERN QTD_EXPORT QModelIndex qtd_to_QModelIndex(QModelIndexAccessor mia)
 {
     return * (QModelIndex *) (&mia) ;
 }
 
-QTD_EXTERN QTD_DLL_PUBLIC QModelIndexAccessor qtd_from_QModelIndex(const QModelIndex &index)
+QTD_EXTERN QTD_EXPORT QModelIndexAccessor qtd_from_QModelIndex(const QModelIndex &index)
 {
     QModelIndexAccessor mia = {
         index.row(),
@@ -39,12 +39,12 @@
     return mia;
 }
 
-QTD_EXTERN QTD_DLL_PUBLIC const char* qtd_qVersion()
+QTD_EXTERN QTD_EXPORT const char* qtd_qVersion()
 {
     return qVersion();
 }
 
-QTD_EXTERN QTD_DLL_PUBLIC bool qtd_qSharedBuild()
+QTD_EXTERN QTD_EXPORT bool qtd_qSharedBuild()
 {
     return qSharedBuild();
 }
@@ -55,24 +55,24 @@
 extern bool qUnregisterResourceData
     (int, const unsigned char *, const unsigned char *, const unsigned char *);
 
-QTD_EXTERN QTD_DLL_PUBLIC bool qtd_qRegisterResourceData(int version, const unsigned char *tree,
+QTD_EXTERN QTD_EXPORT bool qtd_qRegisterResourceData(int version, const unsigned char *tree,
                                          const unsigned char *name, const unsigned char *data)
 {
     return qRegisterResourceData(version, tree, name, data);
 }
 
-QTD_EXTERN QTD_DLL_PUBLIC bool qtd_qUnregisterResourceData(int version, const unsigned char *tree,
+QTD_EXTERN QTD_EXPORT bool qtd_qUnregisterResourceData(int version, const unsigned char *tree,
                                            const unsigned char *name, const unsigned char *data)
 {
     return qUnregisterResourceData(version, tree, name, data);
 }
 
-QTD_EXTERN QTD_DLL_PUBLIC int qtd_qrand()
+QTD_EXTERN QTD_EXPORT int qtd_qrand()
 {
     return qrand();
 }
 
-QTD_EXTERN QTD_DLL_PUBLIC void qtd_qsrand(uint seed)
+QTD_EXTERN QTD_EXPORT void qtd_qsrand(uint seed)
 {
     qsrand(seed);
 }
--- a/d2/qtd/Core.d	Mon Jul 12 22:50:58 2010 +0300
+++ b/d2/qtd/Core.d	Fri Jul 16 20:04:29 2010 +0300
@@ -35,8 +35,6 @@
     alias T Type;
 }
 
-enum qtdExtern = "extern (C)";
-
 extern(C) alias void function() VoidFunc;
 extern(C) void qtdInitCore();
 
@@ -53,21 +51,27 @@
 string qtdExport(string retType, string name, string args, string funcBody)
 {
     string ret;
-    version (cpp_shared) // TODO: cpp_shared implies Windows, which is not correct
+    enum ext = "extern (C)";
+    version (QtdCppShared)
     {
+        version(Windows)
+            enum exp = "export";
+        else
+            enum exp = "";
+
         // TODO: hackery to workaround a dmd/optlink bug corrupting symbol names
         // when a direct function pointer export is used
         ret ~= format_ctfe(
             "    ${4} ${0} qtd_export_${1}(${2}) { ${3} }\n"
-            "    ${4} export void qtd_set_${1}(VoidFunc func);\n"
+            "    ${4} ${5} void qtd_set_${1}(VoidFunc func);\n"
             "    static this() { qtd_set_${1}(cast(VoidFunc)&qtd_export_${1}); }\n",
-            retType, name, args, funcBody, qtdExtern);
+            retType, name, args, funcBody, ext, exp);
     }
     else
     {
         ret = format_ctfe(
             "${4} ${0} qtd_${1}(${2}) { ${3} }\n",
-            retType, name, args, funcBody, qtdExtern);
+            retType, name, args, funcBody, ext);
     }
 
     return ret;
--- a/generator/CMakeLists.txt	Mon Jul 12 22:50:58 2010 +0300
+++ b/generator/CMakeLists.txt	Fri Jul 16 20:04:29 2010 +0300
@@ -4,13 +4,14 @@
 
 ## Hack for msvc: force Release settings
 string(TOUPPER "${CMAKE_BUILD_TYPE}" build_type_upper)
-set(CMAKE_CXX_FLAGS_${build_type_upper} ${CMAKE_CXX_FLAGS_RELEASE}) 
-get_property(dir_prop DIRECTORY 
+set(CMAKE_CXX_FLAGS_${build_type_upper} ${CMAKE_CXX_FLAGS_RELEASE})
+get_property(dir_prop DIRECTORY
 	    PROPERTY COMPILE_DEFINITIONS_RELEASE)
 set_property(DIRECTORY PROPERTY COMPILE_DEFINITIONS_${build_type_upper} ${dir_prop})
 
 ## Sources
 set(srcs
+    global.cpp
     classlistgenerator.cpp
     cppgenerator.cpp
     cppheadergenerator.cpp
@@ -24,7 +25,7 @@
     qdocgenerator.cpp
     uiconverter.cpp
     containergenerator.cpp
-    
+
     generator.cpp
     main.cpp
     reporthandler.cpp
@@ -38,7 +39,7 @@
     abstractmetabuilder.cpp
     abstractmetalang.cpp
     prigenerator.cpp
-    
+
     # rxx
     parser/ast.cpp
     parser/lexer.cpp
@@ -58,7 +59,7 @@
     parser/class_compiler.cpp
     parser/codemodel_finder.cpp
     parser/compiler_utils.cpp
-    
+
     ## rpp
     parser/rpp/preprocessor.cpp
 )
@@ -90,7 +91,7 @@
     #abstractmetabuilder.h
     #abstractmetalang.h
     prigenerator.h
-    
+
     ## rxx
     #parser/ast.h
     #parser/lexer.h
@@ -115,7 +116,7 @@
     #parser/class_compiler.h
     #parser/codemodel_finder.h
     #parser/compiler_utils.h
-    
+
     # rpp
     #parser/rpp/pp-cctype.h
     #parser/rpp/pp-engine-bits.h
@@ -131,7 +132,7 @@
     #parser/rpp/pp-symbol.h
     #parser/rpp/pp.h
     #parser/rpp/preprocessor.h
-    
+
 )
 
 ## Resources.
@@ -141,11 +142,11 @@
 
 ## Includes path.
 set(inc_paths_for_build
-    ${CMAKE_CURRENT_SOURCE_DIR}/../common 
+    ${CMAKE_CURRENT_SOURCE_DIR}/../common
     ${CMAKE_CURRENT_SOURCE_DIR}/parser
     ${CMAKE_CURRENT_SOURCE_DIR}
-    ${CMAKE_CURRENT_SOURCE_DIR}/parser/rpp   
-    #${CMAKE_CURRENT_SOURCE_DIR}/parser/include  
+    ${CMAKE_CURRENT_SOURCE_DIR}/parser/rpp
+    #${CMAKE_CURRENT_SOURCE_DIR}/parser/include
 )
 
 add_definitions(-DRXX_ALLOCATOR_INIT_0)
@@ -156,15 +157,15 @@
 set (QT_USE_QTGUI false)
 set (QT_USE_QTXML true)
 
-include(${QT_USE_FILE} ${CMAKE_CURRENT_SOURCE_DIR}) 
+include(${QT_USE_FILE} ${CMAKE_CURRENT_SOURCE_DIR})
 
 set(inc_paths_for_build
     ${inc_paths_for_build}
-    ${QT_INCLUDES} 
+    ${QT_INCLUDES}
 )
 set(lib_paths
     ${lib_paths}
-    ${QT_LIBRARY_DIR} 
+    ${QT_LIBRARY_DIR}
 )
 set(libs
     ${QT_LIBRARIES}
@@ -173,18 +174,18 @@
 qt4_wrap_cpp(moc_srcs ${moc_hdrs})
 qt4_add_resources(res_wrapped_files ${res_files})
 
-set (all_srcs 
-    ${srcs} ${moc_srcs} 
-    ${res_wrapped_files}) 
+set (all_srcs
+    ${srcs} ${moc_srcs}
+    ${res_wrapped_files})
 include_directories(${inc_paths_for_build})
 add_executable(generator ${all_srcs} )
 target_link_libraries(generator ${libs})
 
-## TODO: Precompilated header works well, but I don't know a license of PCHSupport_26.cmake which  
-## was downloaded from http://www.vtk.org/Bug/view.php?id=1260. 
+## TODO: Precompilated header works well, but I don't know a license of PCHSupport_26.cmake which
+## was downloaded from http://www.vtk.org/Bug/view.php?id=1260.
 #OPTION(USEPCH "Build the project with precompiled-headers" ON)
 #include(../cmake/PCHSupport_26.cmake)
-#	
+#
 #IF(NOT USEPCH)
 #    MESSAGE(STATUS "NOT using precompiled-header")
 #ELSE(NOT USEPCH)
@@ -194,15 +195,15 @@
 
 set(dgen_build_conf ${CMAKE_BINARY_DIR}/CMakeFiles/build.txt)
 set(jambi_inc ${CMAKE_BINARY_DIR}/CMakeFiles/qtjambi_masterinclude.h)
-if(	NOT "${packages_in_build_txt}" STREQUAL "${packages}" 
+if(	NOT "${packages_in_build_txt}" STREQUAL "${packages}"
 	OR NOT EXISTS ${dgen_build_conf}
 	OR NOT EXISTS ${jambi_inc})
     file(REMOVE ${dgen_build_conf})
     file(REMOVE ${jambi_inc})
     file(APPEND ${dgen_build_conf} "<typesystem>\n")
     foreach(package_normal ${packages})
-    	string(TOLOWER ${package_normal} package) 
-    	string(TOUPPER ${package_normal} package_upper) 
+    	string(TOLOWER ${package_normal} package)
+    	string(TOUPPER ${package_normal} package_upper)
     	file(APPEND ${dgen_build_conf} "	<load-typesystem name=\"typesystem_${package}.xml\" generate=\"yes\" />\n")
     	# only append include if we have QT_QT${MODULE}_INCLUDE_DIR defined, otherwise handle customly
     	if(NOT ${QT_QT${package_upper}_INCLUDE_DIR} STREQUAL "")
@@ -217,20 +218,20 @@
         file(APPEND ${jambi_inc} ${jambi_inc_qwt})
     endif()
 endif()
-    
+
 set(gen_sources)
 foreach(package_normal ${packages})
-    string(TOLOWER ${package_normal} package)   
+    string(TOLOWER ${package_normal} package)
     set(gen_sources ${gen_sources} ${CMAKE_CURRENT_SOURCE_DIR}/typesystem_${package}.xml)
-    set(d_inc_file_found d_inc_file_found-NOTFOUND) 
-    find_file(d_inc_file_found typesystem_${package}-java.java PATHS ${CMAKE_CURRENT_SOURCE_DIR}/) 
+    set(d_inc_file_found d_inc_file_found-NOTFOUND)
+    find_file(d_inc_file_found typesystem_${package}-java.java PATHS ${CMAKE_CURRENT_SOURCE_DIR}/)
     if(d_inc_file_found)
 	    set(gen_sources ${gen_sources} ${d_inc_file_found})
     endif()
 endforeach()
 mark_as_advanced(d_inc_file_found)
 set(d_inc_file_found 1)
-	
+
 foreach(path ${QT_INCLUDES})
     set(inc_paths_tmp ${path}${sep})
 endforeach()
@@ -247,10 +248,10 @@
 	COMMAND "generator"
 	ARGS ${GEN_OPT} --include-paths=${inc_paths}
 	    --output-directory=${out_dir}
-	    --source-directory=${CMAKE_CURRENT_SOURCE_DIR} 
-	    ${CMAKE_BINARY_DIR}/CMakeFiles/qtjambi_masterinclude.h  
+	    --source-directory=${CMAKE_CURRENT_SOURCE_DIR}
+	    ${CMAKE_BINARY_DIR}/CMakeFiles/qtjambi_masterinclude.h
 	    ${CMAKE_BINARY_DIR}/CMakeFiles/build.txt
 	COMMENT "Generating binding..."
 	DEPENDS generator ${gen_sources} ${CMAKE_BINARY_DIR}/CMakeFiles/build.txt
-)       
-add_custom_target(dgen ALL DEPENDS ${dgen_impl} COMMENT "")     
+)
+add_custom_target(dgen ALL DEPENDS ${dgen_impl} COMMENT "")
--- a/generator/containergenerator.cpp	Mon Jul 12 22:50:58 2010 +0300
+++ b/generator/containergenerator.cpp	Fri Jul 16 20:04:29 2010 +0300
@@ -229,9 +229,9 @@
 
             QString module = packageToQtModule(cls->package());
             setFuncNames(cls_name);
-            s << "QTD_EXPORT(" << module << ", " << all_name << ")" << endl
-              << "QTD_EXPORT(" << module << ", " << ass_name << ")" << endl
-              << "QTD_EXPORT(" << module << ", " << get_name << ")" << endl << endl;
+            s << "QTD_FUNC(" << module << ", " << all_name << ")" << endl
+              << "QTD_FUNC(" << module << ", " << ass_name << ")" << endl
+              << "QTD_FUNC(" << module << ", " << get_name << ")" << endl << endl;
         }
     }
 
@@ -242,7 +242,7 @@
     while (i.hasNext()) {
         i.next();
         s << "// " << i.key()->targetLangName() << endl
-          << "QTD_EXTERN QTD_DLL_PUBLIC void qtd_" << package << "_" << i.key()->targetLangName() << "_to_d_array(void *cpp_ptr, DArray* __d_container) {" << endl;
+          << "QTD_EXTERN QTD_EXPORT void qtd_" << package << "_" << i.key()->targetLangName() << "_to_d_array(void *cpp_ptr, DArray* __d_container) {" << endl;
 
         AbstractMetaType *arg_type = i.value();
         m_cpp_impl_generator->writeTypeInfo(s, arg_type, NoOption);
@@ -259,7 +259,7 @@
     foreach(AbstractMetaType* arg_type, signalEntries[cls->package()]) {
         const TypeEntry *te = arg_type->instantiations().first()->typeEntry();
         s << "// " << te->targetLangName() << endl
-          << "QTD_EXTERN QTD_DLL_PUBLIC void " << cppContainerConversionName(cls, arg_type, FromCpp) << "(void *cpp_ptr, DArray* __d_container) {" << endl;
+          << "QTD_EXTERN QTD_EXPORT void " << cppContainerConversionName(cls, arg_type, FromCpp) << "(void *cpp_ptr, DArray* __d_container) {" << endl;
 
         m_cpp_impl_generator->writeTypeInfo(s, arg_type, NoOption);
         s << "container = (*reinterpret_cast< ";
@@ -318,9 +318,9 @@
 
     QString module = packageToQtModule(centry->javaPackage());
 
-    s << "QTD_EXPORT_DECL(" << module << ", void, " << all_name << ", (void* arr, size_t len))" << endl
-      << "QTD_EXPORT_DECL(" << module << ", void, " << ass_name << ", (void* arr, size_t pos, " << cpp_type << " elem))" << endl
-      << "QTD_EXPORT_DECL(" << module << ", void, " << get_name << ", (void* arr, size_t pos, " << cpp_type << " elem))" << endl;
+    s << "QTD_FUNC_DECL(" << module << ", void, " << all_name << ", (void* arr, size_t len))" << endl
+      << "QTD_FUNC_DECL(" << module << ", void, " << ass_name << ", (void* arr, size_t pos, " << cpp_type << " elem))" << endl
+      << "QTD_FUNC_DECL(" << module << ", void, " << get_name << ", (void* arr, size_t pos, " << cpp_type << " elem))" << endl;
 
     s << endl;
 
--- a/generator/cppimplgenerator.cpp	Mon Jul 12 22:50:58 2010 +0300
+++ b/generator/cppimplgenerator.cpp	Fri Jul 16 20:04:29 2010 +0300
@@ -39,6 +39,7 @@
 **
 ****************************************************************************/
 
+#include "global.h"
 #include "cppimplgenerator.h"
 #include "dgenerator.h"
 #include "reporthandler.h"
@@ -384,7 +385,7 @@
     QString s;
 
     if (options & CppImplGenerator::ExternC)
-        s += "QTD_EXTERN QTD_DLL_PUBLIC ";
+        s += "QTD_EXTERN QTD_EXPORT ";
 /* qtd
     if (options & CppImplGenerator::JNIExport)
         s += "Q_DECL_EXPORT ";
@@ -480,7 +481,7 @@
                 InterfaceTypeEntry *ite = static_cast<InterfaceTypeEntry*>(iface->typeEntry());
                 QString real_name = ite->origin()->qualifiedCppName();
 
-                s << "QTD_EXTERN QTD_DLL_PUBLIC " << real_name << "* qtd_" << java_class->name() << "_cast_to_" << iface->qualifiedCppName()
+                s << "QTD_EXTERN QTD_EXPORT " << real_name << "* qtd_" << java_class->name() << "_cast_to_" << iface->qualifiedCppName()
                   << "(" << java_class->qualifiedCppName() << " *ptr)" << endl << "{" << endl;
                 Indentation indent(INDENT);
                 s << INDENT << "return dynamic_cast<" << real_name << "*>(ptr);" << endl;
@@ -575,7 +576,7 @@
             writeShellVirtualFunction(s, function, java_class, pos);
         }
 
-        if (cpp_shared)
+        if (global.cppShared)
             writeInitCallbacks(s, java_class);
 
         // Functions in shell class
@@ -673,7 +674,7 @@
     if (java_class->isQObject())
     {
         s << endl << endl
-          << "QTD_EXTERN QTD_DLL_PUBLIC  void* qtd_" << java_class->name() << "_staticMetaObject() {" << endl
+          << "QTD_EXTERN QTD_EXPORT void* qtd_" << java_class->name() << "_staticMetaObject() {" << endl
           << "    return (void*)&" << java_class->name() << "::staticMetaObject;" << endl
           << "}" << endl;
     }
@@ -684,7 +685,7 @@
         {
             QString argName = "orig";
             s << endl << endl
-              << "QTD_EXTERN QTD_DLL_PUBLIC void qtd_" << java_class->name() << "_placed_copy(void* "
+              << "QTD_EXTERN QTD_EXPORT void qtd_" << java_class->name() << "_placed_copy(void* "
               << argName << ", void* place) {" << endl
               << QString("    const %1&  __qt_%2 = (const %1& ) *(%1 *)%2;").arg(shellClassName(java_class)).arg(argName) << endl
               << QString("    %1 *result = new (place) %1 (__qt_%2);").arg(java_class->qualifiedCppName()).arg(argName) << endl;
@@ -692,7 +693,7 @@
             s << "}";
 
             s << endl << endl
-              << "QTD_EXTERN QTD_DLL_PUBLIC void* qtd_" << java_class->name() << "_native_copy(void* " << argName << ") {" << endl
+              << "QTD_EXTERN QTD_EXPORT void* qtd_" << java_class->name() << "_native_copy(void* " << argName << ") {" << endl
               << QString("    const %1&  __qt_%2 = (const %1& ) *(%1 *)%2;").arg(shellClassName(java_class)).arg(argName) << endl
               << QString("    %1 *result = new %1 (__qt_%2);").arg(java_class->qualifiedCppName()).arg(argName) << endl
               << "    return result;" << endl;
@@ -707,11 +708,11 @@
 
 void CppImplGenerator::writeValueFunctions(QTextStream &s, const AbstractMetaClass *java_class)
 {
-    s << QString("QTD_EXTERN QTD_DLL_PUBLIC bool qtd_%1_QTypeInfo_isComplex() { return (bool) QTypeInfo<%2>::isComplex; }\n").arg(java_class->name()).arg(java_class->qualifiedCppName());
-    s << QString("QTD_EXTERN QTD_DLL_PUBLIC bool qtd_%1_QTypeInfo_isStatic() { return (bool) QTypeInfo<%2>::isStatic; }\n").arg(java_class->name()).arg(java_class->qualifiedCppName());
-    s << QString("QTD_EXTERN QTD_DLL_PUBLIC bool qtd_%1_QTypeInfo_isLarge() { return (bool) QTypeInfo<%2>::isLarge; }\n").arg(java_class->name()).arg(java_class->qualifiedCppName());
-    s << QString("QTD_EXTERN QTD_DLL_PUBLIC bool qtd_%1_QTypeInfo_isPointer() { return (bool) QTypeInfo<%2>::isPointer; }\n").arg(java_class->name()).arg(java_class->qualifiedCppName());
-    s << QString("QTD_EXTERN QTD_DLL_PUBLIC bool qtd_%1_QTypeInfo_isDummy() { return (bool) QTypeInfo<%2>::isDummy; }\n").arg(java_class->name()).arg(java_class->qualifiedCppName());
+    s << QString("QTD_EXTERN QTD_EXPORT bool qtd_%1_QTypeInfo_isComplex() { return (bool) QTypeInfo<%2>::isComplex; }\n").arg(java_class->name()).arg(java_class->qualifiedCppName());
+    s << QString("QTD_EXTERN QTD_EXPORT bool qtd_%1_QTypeInfo_isStatic() { return (bool) QTypeInfo<%2>::isStatic; }\n").arg(java_class->name()).arg(java_class->qualifiedCppName());
+    s << QString("QTD_EXTERN QTD_EXPORT bool qtd_%1_QTypeInfo_isLarge() { return (bool) QTypeInfo<%2>::isLarge; }\n").arg(java_class->name()).arg(java_class->qualifiedCppName());
+    s << QString("QTD_EXTERN QTD_EXPORT bool qtd_%1_QTypeInfo_isPointer() { return (bool) QTypeInfo<%2>::isPointer; }\n").arg(java_class->name()).arg(java_class->qualifiedCppName());
+    s << QString("QTD_EXTERN QTD_EXPORT bool qtd_%1_QTypeInfo_isDummy() { return (bool) QTypeInfo<%2>::isDummy; }\n").arg(java_class->name()).arg(java_class->qualifiedCppName());
 }
 
 void CppImplGenerator::writeVirtualDispatchFunction(QTextStream &s, const AbstractMetaFunction *function, const AbstractMetaClass *java_class, bool d_export)
@@ -723,10 +724,15 @@
     QString f_name = function->marshalledName(opts) + "_dispatch";
 
     if (d_export) {
-        QString qtdExtern = "extern(C)"; // TODO: should be settable via a generator switch
-        if (cpp_shared) {
-
-            s << qtdExtern << "{ extern export " << return_type << " function";
+        QString qtdExtern = "extern(C)";
+        QString qtdExport;
+        if (global.targetPlatform == Global::Win32Target)
+            qtdExport = "export ";
+
+
+        if (global.cppShared) {
+
+            s << qtdExtern << "{ extern " << qtdExport << return_type << " function";
             writeVirtualDispatchArguments(s, function, d_export);
             s << " qtd_" << f_name << "; }" << endl;
 
@@ -739,12 +745,12 @@
         }
     } else {
         QString module = packageToQtModule(java_class->package());
-        s << "QTD_EXPORT_DECL(" << module << ", " << return_type << ", " << f_name << ", ";
+        s << "QTD_FUNC_DECL(" << module << ", " << return_type << ", " << f_name << ", ";
         writeVirtualDispatchArguments(s, function, d_export);
         s << ")" << endl;
 
         if (function->declaringClass() == java_class) {
-            s << "QTD_EXPORT(" << module << ", " << f_name << ")" << endl;
+            s << "QTD_FUNC(" << module << ", " << f_name << ")" << endl;
         }
     }
 }
@@ -905,7 +911,7 @@
     if (java_class->name() == "QObject")
         initArgs += ", VoidFunc *sigs";
 
-    s << "QTD_EXTERN QTD_DLL_EXPORT void qtd_" << java_class->name()
+    s << "QTD_EXTERN QTD_EXPORT void qtd_" << java_class->name()
       << QString("_initCallBacks(%1) {").arg(initArgs) << endl;
 
     // virtual functions handlers
@@ -1290,7 +1296,7 @@
       << "    return -1;" << endl
       << "}" << endl << endl;
 */
-    s << "QTD_EXTERN QTD_DLL_PUBLIC void qtd_" << className << "_createEntity(void *nativeId, void* dId)" << endl
+    s << "QTD_EXTERN QTD_EXPORT void qtd_" << className << "_createEntity(void *nativeId, void* dId)" << endl
       << "{" << endl
       << "    new " << entityName << "((QObject*)nativeId, dId);" << endl
       << "}" << endl << endl;
@@ -1352,12 +1358,12 @@
 
     QString module = packageToQtModule(java_class->package());
 
-    s << "QTD_EXPORT_DECL(" << module << ", const QMetaObject*, QObject_metaObject_dispatch, (void *dId))" << endl
-      << "QTD_EXPORT_DECL(" << module << ", int, QObject_qt_metacall_dispatch, (void *dId, QMetaObject::Call _c, int _id, void **_a))" << endl;
+    s << "QTD_FUNC_DECL(" << module << ", const QMetaObject*, QObject_metaObject_dispatch, (void *dId))" << endl
+      << "QTD_FUNC_DECL(" << module << ", int, QObject_qt_metacall_dispatch, (void *dId, QMetaObject::Call _c, int _id, void **_a))" << endl;
 
     if (java_class->name() == "QObject") {
-        s << "QTD_EXPORT(" << module << ", QObject_metaObject_dispatch)" << endl
-          << "QTD_EXPORT(" << module << ", QObject_qt_metacall_dispatch)" << endl;
+        s << "QTD_FUNC(" << module << ", QObject_metaObject_dispatch)" << endl
+          << "QTD_FUNC(" << module << ", QObject_qt_metacall_dispatch)" << endl;
     }
 
     // TODO: QMetaObject should be included in the typesystem
@@ -1384,7 +1390,7 @@
       << "    return " << java_class->qualifiedCppName() << "::qt_metacall(_c, _id, _a);"
       << "}" << endl << endl
 
-      << "QTD_EXTERN QTD_DLL_PUBLIC int qtd_" << java_class->name() << "_qt_metacall(void* __this_nativeId, QMetaObject::Call _c, int _id, void **_a)"
+      << "QTD_EXTERN QTD_EXPORT int qtd_" << java_class->name() << "_qt_metacall(void* __this_nativeId, QMetaObject::Call _c, int _id, void **_a)"
       << "{" << endl
       << "    " << shellClassName(java_class) << " *__qt_this = (" << shellClassName(java_class) << " *) __this_nativeId;" << endl
       << "    return __qt_this->__override_qt_metacall(_c, _id, _a);" << endl
@@ -1803,7 +1809,7 @@
 
 void CppImplGenerator::writeQtdEntityFunction(QTextStream &s, const AbstractMetaClass *java_class)
 {
-    s << "QTD_EXTERN QTD_DLL_PUBLIC void *__" << java_class->name() << "_entity(void *q_ptr)" << endl;
+    s << "QTD_EXTERN QTD_EXPORT void *__" << java_class->name() << "_entity(void *q_ptr)" << endl;
     s << "{" << endl;
     {
         Indentation indent(INDENT);
@@ -2013,7 +2019,7 @@
                         s << translateType(argument->type(), EnumAsInts, d_export);
                 }
                 else if (d_type->name() == "QModelIndex") {
-                    if(d_export && dVersion == 2 && d_type->isConstant())
+                    if(d_export && global.dVersion == 2 && d_type->isConstant())
                         s << "const(QModelIndexAccessor)";
                     else
                         s << "QModelIndexAccessor";
@@ -2362,12 +2368,12 @@
 void CppImplGenerator::writeFinalDestructor(QTextStream &s, const AbstractMetaClass *cls)
 {
     if (cls->hasConstructors() && cls->isDestructorBase()) {
-        s << INDENT << "QTD_EXTERN QTD_DLL_PUBLIC void qtd_" << cls->name() << "_delete(void* nativeId)" << endl
+        s << INDENT << "QTD_EXTERN QTD_EXPORT void qtd_" << cls->name() << "_delete(void* nativeId)" << endl
           << INDENT << "{" << endl
           << INDENT << "    delete (" << shellClassName(cls) << "*)nativeId;" << endl
           << INDENT << "}" << endl << endl;
 
-        s << INDENT << "QTD_EXTERN QTD_DLL_PUBLIC void qtd_" << cls->name() << "_destroy(void* nativeId)" << endl
+        s << INDENT << "QTD_EXTERN QTD_EXPORT void qtd_" << cls->name() << "_destroy(void* nativeId)" << endl
           << INDENT << "{" << endl
           << INDENT << "    call_destructor((" << shellClassName(cls) << "*)nativeId);" << endl
           << INDENT << "}" << endl << endl;
@@ -3703,14 +3709,14 @@
         else
             return d_name + " "+ QString(java_type->actualIndirections(), '*');
     } else if (java_type->isNativePointer()) {
-        if (java_type->typeEntry()->isStructInD() && dVersion == 2 && java_type->isConstant() && d_export)
+        if (java_type->typeEntry()->isStructInD() && global.dVersion == 2 && java_type->isConstant() && d_export)
             return "const(" + d_name + QString(java_type->indirections()-1, '*') + ")*";
         else if (java_type->typeEntry()->isValue())
             return "void*";
         else if (java_type->typeEntry()->isEnum() && d_export)
             return "int" + QString(java_type->indirections(), '*');
         else {
-            if (java_type->isConstant() && dVersion == 2 && d_export)
+            if (java_type->isConstant() && global.dVersion == 2 && d_export)
                 return "const (" + d_name + QString(java_type->indirections(), '*') + ")";
             else
                 return d_name + QString(java_type->indirections(), '*');
--- a/generator/dgenerator.cpp	Mon Jul 12 22:50:58 2010 +0300
+++ b/generator/dgenerator.cpp	Fri Jul 16 20:04:29 2010 +0300
@@ -39,6 +39,7 @@
 **
 ****************************************************************************/
 
+#include "global.h"
 #include "dgenerator.h"
 #include "reporthandler.h"
 #include "docparser.h"
@@ -124,7 +125,7 @@
         d_type = d_type->originalTemplateType();
 
     QString constPrefix, constPostfix;
-    if (d_type && d_type->isConstant() && dVersion == 2) {
+    if (d_type && d_type->isConstant() && global.dVersion == 2) {
         constPrefix = "const(";
         constPostfix = ")";
     }
@@ -855,7 +856,7 @@
                     s << arg_name << " is null ? null : ";
                 } // else if (value type is abstract) then we will get a null pointer exception, which is all right
 
-                if(dVersion == 2 && type->isConstant())
+                if(global.dVersion == 2 && type->isConstant())
                     s << "(cast(" << type->name() << ")" << arg_name << ").qtdNativeId";
                 else
                     s << arg_name << ".qtdNativeId";
@@ -1852,7 +1853,7 @@
     auxFile.stream << "module " << auxModName << ";" << endl << endl;
 
     bool staticInit = d_class->isQObject() || d_class->typeEntry()->isValue()
-                      || (cpp_shared && d_class->generateShellClass() && !d_class->isInterface() && !d_class->isNamespace());
+                      || (global.cppShared && d_class->generateShellClass() && !d_class->isInterface() && !d_class->isNamespace());
     if (staticInit)
     {
         auxFile.isDone = false;
@@ -1986,7 +1987,7 @@
         s << "// automatic imports-------------" << endl;
         writeRequiredImports(s, d_class);
         s << endl;
-        if (dPhobos)
+        if (global.dPhobos)
         {
             s << "import std.stdio;" << endl
               << "import std.string : toStringz;" << endl
@@ -2548,7 +2549,7 @@
     // write static constructor
     if (staticInit) {
         QString initArgs;
-        if (cpp_shared && d_class->generateShellClass())
+        if (global.cppShared && d_class->generateShellClass())
         {
             initArgs = "void* virtuals";
             if (d_class->name() == "QObject")
@@ -2563,7 +2564,7 @@
         if (d_class->typeEntry()->isValue())
             s << INDENT << d_class->name() << ".QTypeInfo.init();" << endl;
 
-        if (cpp_shared && d_class->generateShellClass()) {
+        if (global.cppShared && d_class->generateShellClass()) {
 
             AbstractMetaFunction::Options opts(AbstractMetaFunction::DeclaringClass | AbstractMetaFunction::NoExternNamespace);
 
@@ -2688,7 +2689,7 @@
       << "extern(C) void qtd_" << d_class->name() << "_createEntity(void* nativeId, void* dId);" <<  endl << endl
       << "extern(C) int qtd_" << d_class->name() << "_qt_metacall(void *nativeId, MetaCall _c, int _id, void **_a);" << endl;
 
-    QString prefix = cpp_shared ? "qtd_export_" : "qtd_";
+    QString prefix = global.cppShared ? "qtd_export_" : "qtd_";
 
     if (d_class->name() == "QObject") {
         s << "extern(C) int " << prefix << "QObject_qt_metacall_dispatch(void *d_entity, MetaCall _c, int _id, void **_a) {" << endl
@@ -3485,16 +3486,21 @@
 
 void DGenerator::writeDExport(QTextStream &s, QString retType, QString name, QString args, QString funcBody)
 {
-    QString qtdExtern = "extern (C)"; // TODO: should be settable via a generator switch
-    if (cpp_shared) {
+    QString ext = "extern (C)";
+
+    if (global.cppShared) {
+        QString exp;
+        if (global.targetPlatform == Global::Win32Target)
+            exp = "export";
+
         s << QString(
             "    %5 %1 qtd_export_%2(%3) { %4 }\n"
-            "    %5 export void qtd_set_%2(VoidFunc func);\n"
+            "    %5 %6 void qtd_set_%2(VoidFunc func);\n"
             "    static this() { qtd_set_%2(cast(VoidFunc)&qtd_export_%2); }\n")
-            .arg(retType, name, args, funcBody, qtdExtern);        
+            .arg(retType, name, args, funcBody, ext, exp);
     } else {
         s << QString("%5 %1 qtd_%2(%3) { %4 }\n")
-                .arg(retType, name, args, funcBody, qtdExtern);
+                .arg(retType, name, args, funcBody, ext);
     }
 }
 
--- a/generator/generator.h	Mon Jul 12 22:50:58 2010 +0300
+++ b/generator/generator.h	Fri Jul 16 20:04:29 2010 +0300
@@ -50,10 +50,6 @@
 #include <QObject>
 #include <QFile>
 
-extern bool cpp_shared;
-extern bool dPhobos;
-extern int dVersion;
-
 class Generator : public QObject
 {
     Q_OBJECT
--- a/generator/generator.pri	Mon Jul 12 22:50:58 2010 +0300
+++ b/generator/generator.pri	Fri Jul 16 20:04:29 2010 +0300
@@ -1,77 +1,65 @@
 isEmpty(GENERATORPATH):GENERATORPATH = $$PWD
 INCLUDEPATH += $$GENERATORPATH
-
 TEMPLATE = app
-TARGET +=
-DEPENDPATH += $$GENERATORPATH tests parser
+TARGET += 
+DEPENDPATH += $$GENERATORPATH \
+    tests \
+    parser
 mac:CONFIG -= app_bundle
 INCLUDEPATH += $$GENERATORPATH/.
 INCLUDEPATH += $$GENERATORPATH/../common
-
 unix:CONFIG += debug_and_release
-
 CONFIG += console
 RESOURCES += generator.qrc
-
 include($$GENERATORPATH/parser/rxx.pri)
-
 include($$GENERATORPATH/parser/rpp/rpp.pri)
-
-win32-msvc2005:{
-        QMAKE_CXXFLAGS += -wd4996
-        QMAKE_CFLAGS += -wd4996
+win32-msvc2005: { 
+    QMAKE_CXXFLAGS += -wd4996
+    QMAKE_CFLAGS += -wd4996
 }
 
 # Input
-HEADERS += \
-        $$GENERATORPATH/generator.h \
-        $$GENERATORPATH/main.h \
-        $$GENERATORPATH/reporthandler.h \
-        $$GENERATORPATH/typeparser.h \
-        $$GENERATORPATH/typesystem.h \
-        $$GENERATORPATH/asttoxml.h \
-        $$GENERATORPATH/fileout.h \
-        $$GENERATORPATH/generatorset.h \
-        $$GENERATORPATH/metajava.h \
-        $$GENERATORPATH/customtypes.h \
-        $$GENERATORPATH/abstractmetabuilder.h \
-        $$GENERATORPATH/abstractmetalang.h \
-        $$GENERATORPATH/prigenerator.h \
-
-
-
-
-SOURCES += \
-        $$GENERATORPATH/generator.cpp \
-        $$GENERATORPATH/main.cpp \
-        $$GENERATORPATH/reporthandler.cpp \
-        $$GENERATORPATH/typeparser.cpp \
-        $$GENERATORPATH/typesystem.cpp \
-        $$GENERATORPATH/asttoxml.cpp \
-        $$GENERATORPATH/fileout.cpp \
-        $$GENERATORPATH/generatorset.cpp \
-        $$GENERATORPATH/metajava.cpp \
-        $$GENERATORPATH/customtypes.cpp \
-        $$GENERATORPATH/abstractmetabuilder.cpp \
-        $$GENERATORPATH/abstractmetalang.cpp \
-        $$GENERATORPATH/prigenerator.cpp \
-
-
-
-QT = core xml
-
-win32{
-        PRECOMPILED_HEADER = generator_pch.h
-        CONFIG += precompile_header
+HEADERS += $$GENERATORPATH/generator.h \
+    $$GENERATORPATH/main.h \
+    $$GENERATORPATH/reporthandler.h \
+    $$GENERATORPATH/typeparser.h \
+    $$GENERATORPATH/typesystem.h \
+    $$GENERATORPATH/asttoxml.h \
+    $$GENERATORPATH/fileout.h \
+    $$GENERATORPATH/generatorset.h \
+    $$GENERATORPATH/metajava.h \
+    $$GENERATORPATH/customtypes.h \
+    $$GENERATORPATH/abstractmetabuilder.h \
+    $$GENERATORPATH/abstractmetalang.h \
+    $$GENERATORPATH/prigenerator.h \
+    global.h
+SOURCES += $$GENERATORPATH/generator.cpp \
+    $$GENERATORPATH/main.cpp \
+    $$GENERATORPATH/reporthandler.cpp \
+    $$GENERATORPATH/typeparser.cpp \
+    $$GENERATORPATH/typesystem.cpp \
+    $$GENERATORPATH/asttoxml.cpp \
+    $$GENERATORPATH/fileout.cpp \
+    $$GENERATORPATH/generatorset.cpp \
+    $$GENERATORPATH/metajava.cpp \
+    $$GENERATORPATH/customtypes.cpp \
+    $$GENERATORPATH/abstractmetabuilder.cpp \
+    $$GENERATORPATH/abstractmetalang.cpp \
+    $$GENERATORPATH/prigenerator.cpp \
+    global.cpp
+QT = core \
+    xml
+win32 { 
+    PRECOMPILED_HEADER = generator_pch.h
+    CONFIG += precompile_header
 }
-
-win32-msvc.net {
-        QMAKE_CXXFLAGS += /Zm500
-        QMAKE_CXXFLAGS -= -Zm200
-        QMAKE_CFLAGS -= -Zm200
+win32-msvc.net { 
+    QMAKE_CXXFLAGS += /Zm500
+    QMAKE_CXXFLAGS -= -Zm200
+    QMAKE_CFLAGS -= -Zm200
 }
-
-mac {
-    contains(QT_CONFIG, x86):contains(QT_CONFIG, ppc):CONFIG += x86 ppc
+mac { 
+    contains(QT_CONFIG, x86):contains(QT_CONFIG, ppc):CONFIG += x86 \
+        ppc
     CONFIG -= precompile_header
 }
--- a/generator/main.cpp	Mon Jul 12 22:50:58 2010 +0300
+++ b/generator/main.cpp	Fri Jul 16 20:04:29 2010 +0300
@@ -46,15 +46,12 @@
 #include "generatorset.h"
 #include "fileout.h"
 #include "binder.h"
+#include "global.h"
 
 #include "abstractmetalang.h"
 
 #include <QDir>
 
-bool cpp_shared;
-bool dPhobos = false;
-int dVersion = 1;
-
 void ReportHandler_message_handler(const std::string &str)
 {
     ReportHandler::warning(QString::fromStdString(str));
@@ -130,19 +127,20 @@
         TypeDatabase::instance()->setRebuildClasses(classes);
     }
 
-    if (args.contains("d-target"))
+    QString dTarget = args.value("d-target");
+    if (!dTarget.isEmpty())
     {
-        QString dTarget = args.value("d-target");
+        dTarget = args.value("d-target");
         if (dTarget == "d1-tango")
-            dVersion = 1;
+            global.dVersion = 1;
         /*
         else if (dtarget == "d2-tango")
             qFatal("Tango D2 target is not supported");
         */
         else if (dTarget == "d2-phobos")
         {
-            dVersion = 2;
-            dPhobos = true;
+            global.dVersion = 2;
+            global.dPhobos = true;
         }
         else
         {
@@ -179,7 +177,9 @@
     if (!gs->readParameters(args))
         displayHelp(gs);
 
-    cpp_shared = args.contains("cpp_shared");
+    global.cppShared = args.contains("cpp-shared");
+
+    global.setTargetPlatform(args.value("target-platform"));
 
     printf("Running the QtD Generator. Please wait while source files are being generated...\n");
 
--- a/generator/typesystem_core.xml	Mon Jul 12 22:50:58 2010 +0300
+++ b/generator/typesystem_core.xml	Fri Jul 16 20:04:29 2010 +0300
@@ -1985,12 +1985,12 @@
     </extra-includes>
 
     <inject-code class="native">
-QTD_EXTERN QTD_DLL_PUBLIC int qtd_QMetaType_registerType(char* namePtr, VoidFunc dtor, VoidFunc ctor)
+QTD_EXTERN QTD_EXPORT int qtd_QMetaType_registerType(char* namePtr, VoidFunc dtor, VoidFunc ctor)
 {
     return QMetaType::registerType(namePtr, (QMetaType::Destructor)dtor, (QMetaType::Constructor)ctor);
 }
 
-QTD_EXTERN QTD_DLL_PUBLIC void qtd_QMetaType_registerStreamOperators(const char *typeName, VoidFunc saveOp,
+QTD_EXTERN QTD_EXPORT void qtd_QMetaType_registerStreamOperators(const char *typeName, VoidFunc saveOp,
                                         VoidFunc loadOp)
 {
     QMetaType::registerStreamOperators(typeName, (QMetaType::SaveOperator)saveOp,
@@ -2385,17 +2385,17 @@
   <object-type name="QObject">
 	<inject-code class="native">
 
-QTD_EXTERN QTD_DLL_PUBLIC void* qtd_get_d_qobject(void *nativeId)
+QTD_EXTERN QTD_EXPORT void* qtd_get_d_qobject(void *nativeId)
 {
     return QObjectEntity::getDId((QObject*)nativeId);
 }
 
-QTD_EXTERN QTD_DLL_PUBLIC void qtd_create_qobject_entity(void* nativeId, void *dId)
+QTD_EXTERN QTD_EXPORT void qtd_create_qobject_entity(void* nativeId, void *dId)
 {
 	new QObjectLink((QObject*)nativeId, dId);
 }
 
-QTD_EXTERN QTD_DLL_PUBLIC void* qtd_QObject_metaObject(void* nativeId)
+QTD_EXTERN QTD_EXPORT void* qtd_QObject_metaObject(void* nativeId)
 {
     return (void*)((QObject*)nativeId)->metaObject();
 }
--- a/generator/typesystem_gui.xml	Mon Jul 12 22:50:58 2010 +0300
+++ b/generator/typesystem_gui.xml	Fri Jul 16 20:04:29 2010 +0300
@@ -19,7 +19,7 @@
 
 <template name="gui.class_from_variant_native">
 // %CLASS_NAME from QVariant
-QTD_EXTERN QTD_DLL_PUBLIC void* qtd_%CLASS_NAME_%CLASS_NAME_QVariant
+QTD_EXTERN QTD_EXPORT void* qtd_%CLASS_NAME_%CLASS_NAME_QVariant
 (void *d_ptr,
  void* arg__1)
 {
@@ -32,7 +32,7 @@
 
 <template name="gui.class_from_variant_native_shell">
 // %CLASS_NAME from QVariant
-QTD_EXTERN QTD_DLL_PUBLIC void* qtd_%CLASS_NAME_%CLASS_NAME_QVariant
+QTD_EXTERN QTD_EXPORT void* qtd_%CLASS_NAME_%CLASS_NAME_QVariant
 (void *d_ptr,
  void* arg__1)
 {
@@ -1156,7 +1156,7 @@
     </inject-code>
     <inject-code class="native">
 // QPolygon::insert(int i, const QPoint &amp; t)
-QTD_EXTERN QTD_DLL_PUBLIC void qtd_QPolygon_insert_int_QPoint
+QTD_EXTERN QTD_EXPORT void qtd_QPolygon_insert_int_QPoint
 (void* __this_nativeId,
  int i0,
  QPoint t1)
@@ -1167,7 +1167,7 @@
 }
 
 // QPolygon::insert(int i, int n, const QPoint &amp; t)
-QTD_EXTERN QTD_DLL_PUBLIC void qtd_QPolygon_insert_int_int_QPoint
+QTD_EXTERN QTD_EXPORT void qtd_QPolygon_insert_int_int_QPoint
 (void* __this_nativeId,
  int i0,
  int n1,
@@ -1241,7 +1241,7 @@
     </inject-code>
     <inject-code class="native">
 // QPolygonF::insert(int i, const QPointF &amp; t)
-QTD_EXTERN QTD_DLL_PUBLIC void qtd_QPolygonF_insert_int_QPointF
+QTD_EXTERN QTD_EXPORT void qtd_QPolygonF_insert_int_QPointF
 (void* __this_nativeId,
  int i0,
  QPointF t1)
@@ -1252,7 +1252,7 @@
 }
 
 // QPolygonF::insert(int i, int n, const QPointF &amp; t)
-QTD_EXTERN QTD_DLL_PUBLIC void qtd_QPolygonF_insert_int_int_QPointF
+QTD_EXTERN QTD_EXPORT void qtd_QPolygonF_insert_int_int_QPointF
 (void* __this_nativeId,
  int i0,
  int n1,
--- a/include/ArrayOpsPrimitive.h	Mon Jul 12 22:50:58 2010 +0300
+++ b/include/ArrayOpsPrimitive.h	Fri Jul 16 20:04:29 2010 +0300
@@ -9,24 +9,24 @@
 #include "qtd_core.h"
 
 // int
-QTD_EXPORT_DECL(CORE, void, allocate_int_array, (void* arr, size_t len))
-QTD_EXPORT_DECL(CORE, void, assign_int_array_element, (void* arr, size_t pos, int elem))
-QTD_EXPORT_DECL(CORE, void, get_int_from_array, (void* arr, size_t pos, int* elem))
+QTD_FUNC_DECL(CORE, void, allocate_int_array, (void* arr, size_t len))
+QTD_FUNC_DECL(CORE, void, assign_int_array_element, (void* arr, size_t pos, int elem))
+QTD_FUNC_DECL(CORE, void, get_int_from_array, (void* arr, size_t pos, int* elem))
 
 // uint
-QTD_EXPORT_DECL(CORE, void, allocate_uint_array, (void* arr, size_t len))
-QTD_EXPORT_DECL(CORE, void, assign_uint_array_element, (void* arr, size_t pos, uint elem))
-QTD_EXPORT_DECL(CORE, void, get_uint_from_array, (void* arr, size_t pos, uint* elem))
+QTD_FUNC_DECL(CORE, void, allocate_uint_array, (void* arr, size_t len))
+QTD_FUNC_DECL(CORE, void, assign_uint_array_element, (void* arr, size_t pos, uint elem))
+QTD_FUNC_DECL(CORE, void, get_uint_from_array, (void* arr, size_t pos, uint* elem))
 
 // double
-QTD_EXPORT_DECL(CORE, void, allocate_double_array, (void* arr, size_t len))
-QTD_EXPORT_DECL(CORE, void, assign_double_array_element, (void* arr, size_t pos, double elem))
-QTD_EXPORT_DECL(CORE, void, get_double_from_array, (void* arr, size_t pos, double* elem))
+QTD_FUNC_DECL(CORE, void, allocate_double_array, (void* arr, size_t len))
+QTD_FUNC_DECL(CORE, void, assign_double_array_element, (void* arr, size_t pos, double elem))
+QTD_FUNC_DECL(CORE, void, get_double_from_array, (void* arr, size_t pos, double* elem))
 
 // string
-QTD_EXPORT_DECL(CORE, void, allocate_string_array, (void* arr, size_t len))
-QTD_EXPORT_DECL(CORE, void, assign_string_array_element, (void* arr, size_t pos, void* elem))
-QTD_EXPORT_DECL(CORE, void*, string_from_array, (void* arr, size_t pos))
-QTD_EXPORT_DECL(CORE, void, get_string_from_array, (void* arr, size_t pos, DArray* elem))
+QTD_FUNC_DECL(CORE, void, allocate_string_array, (void* arr, size_t len))
+QTD_FUNC_DECL(CORE, void, assign_string_array_element, (void* arr, size_t pos, void* elem))
+QTD_FUNC_DECL(CORE, void*, string_from_array, (void* arr, size_t pos))
+QTD_FUNC_DECL(CORE, void, get_string_from_array, (void* arr, size_t pos, DArray* elem))
 
 #endif // ARRAY_OPS_PRIMITIVE_H
--- a/include/qtd_core.h	Mon Jul 12 22:50:58 2010 +0300
+++ b/include/qtd_core.h	Fri Jul 16 20:04:29 2010 +0300
@@ -9,85 +9,77 @@
 #include <QAbstractItemModel>
 
 #define QTD_EXTERN extern "C"
+
 QTD_EXTERN typedef void (*VoidFunc)();
 
 #ifdef WIN32
-
-    #define QTD_DLL_EXPORT __declspec(dllexport)
-    #define QTD_DLL_IMPORT __declspec(dllimport)
-
-    #ifdef CPP_SHARED
-
-        #define QTD_EXPORT_DECL(MODULE, TYPE, NAME, ARGS) \
-            QTD_EXTERN typedef TYPE (*qtd_##NAME##_t)ARGS; \
-            QTD_EXTERN { extern QTD_##MODULE##_DLL_PUBLIC qtd_##NAME##_t qtd_##NAME; }
-
-        #define QTD_EXPORT(MODULE, NAME) \
-            QTD_EXTERN { QTD_##MODULE##_DLL_PUBLIC qtd_##NAME##_t qtd_##NAME; } \
-            QTD_EXTERN QTD_DLL_EXPORT void qtd_set_##NAME(VoidFunc func) { qtd_##NAME = (qtd_##NAME##_t)func; }
-
-    #endif
-
+    #define QTD_EXPORT __declspec(dllexport)
+    #define QTD_IMPORT __declspec(dllimport)
 #else
-
-    #define QTD_DLL_EXPORT
-    #define QTD_DLL_IMPORT
-
-    #define QTD_EXPORT_DECL(MODULE, TYPE, NAME, ARGS) \
-        QTD_EXTERN TYPE qtd_##NAME ARGS;
-
-    #define QTD_EXPORT(MODULE, NAME)
-
+    #define QTD_EXPORT
+    #define QTD_IMPORT
 #endif
 
-#define QTD_DLL_PUBLIC QTD_DLL_EXPORT
+#ifdef CPP_SHARED
+    #define QTD_FUNC_DECL(MODULE, TYPE, NAME, ARGS) \
+        QTD_EXTERN typedef TYPE (*qtd_##NAME##_t)ARGS; \
+        QTD_EXTERN { extern QTD_##MODULE##_PUBLIC qtd_##NAME##_t qtd_##NAME; }
+    #define QTD_FUNC(MODULE, NAME) \
+        QTD_EXTERN { QTD_##MODULE##_PUBLIC qtd_##NAME##_t qtd_##NAME; } \
+        QTD_EXTERN QTD_EXPORT void qtd_set_##NAME(VoidFunc func) { qtd_##NAME = (qtd_##NAME##_t)func; }
+#else
+    #define QTD_FUNC_DECL(MODULE, TYPE, NAME, ARGS) \
+        QTD_EXTERN TYPE qtd_##NAME ARGS;
+    #define QTD_FUNC(MODULE, NAME)
+#endif
 
+//TODO: these should be moved to module-specific includes
 #ifdef QTD_CORE
-    #define QTD_CORE_DLL_PUBLIC QTD_DLL_EXPORT
+    #define QTD_CORE_PUBLIC QTD_EXPORT
 #else
-    #define QTD_CORE_DLL_PUBLIC QTD_DLL_IMPORT
+    #define QTD_CORE_PUBLIC QTD_IMPORT
 #endif
 
 #ifdef QTD_GUI
-    #define QTD_GUI_DLL_PUBLIC QTD_DLL_EXPORT
+    #define QTD_GUI_PUBLIC QTD_EXPORT
 #else
-    #define QTD_GUI_DLL_PUBLIC QTD_DLL_IMPORT
+    #define QTD_GUI_PUBLIC QTD_IMPORT
 #endif
 
 #ifdef QTD_OPENGL
-    #define QTD_OPENGL_DLL_PUBLIC QTD_DLL_EXPORT
+    #define QTD_OPENGL_PUBLIC QTD_EXPORT
 #else
-    #define QTD_OPENGL_DLL_PUBLIC QTD_DLL_IMPORT
+    #define QTD_OPENGL_PUBLIC QTD_IMPORT
 #endif
 
 #ifdef QTD_NETWORK
-    #define QTD_NETWORK_DLL_PUBLIC QTD_DLL_EXPORT
+    #define QTD_NETWORK_PUBLIC QTD_EXPORT
 #else
-    #define QTD_NETWORK_DLL_PUBLIC QTD_DLL_IMPORT
+    #define QTD_NETWORK_PUBLIC QTD_IMPORT
 #endif
 
 #ifdef QTD_SVG
-    #define QTD_SVG_DLL_PUBLIC QTD_DLL_EXPORT
+    #define QTD_SVG_PUBLIC QTD_EXPORT
 #else
-    #define QTD_SVG_DLL_PUBLIC QTD_DLL_IMPORT
+    #define QTD_SVG_PUBLIC QTD_IMPORT
 #endif
 
 #ifdef QTD_XML
-    #define QTD_XML_DLL_PUBLIC QTD_DLL_EXPORT
+    #define QTD_XML_PUBLIC QTD_EXPORT
 #else
-    #define QTD_XML_DLL_PUBLIC QTD_DLL_IMPORT
+    #define QTD_XML_PUBLIC QTD_IMPORT
 #endif
 
 #ifdef QTD_WEBKIT
-    #define QTD_WEBKIT_DLL_PUBLIC QTD_DLL_EXPORT
+    #define QTD_WEBKIT_PUBLIC QTD_EXPORT
 #else
-    #define QTD_WEBKIT_DLL_PUBLIC QTD_DLL_IMPORT
+    #define QTD_WEBKIT_PUBLIC QTD_IMPORT
 #endif
 
 #ifdef QTD_QWT
-    #define QTD_QWT_DLL_PUBLIC QTD_DLL_EXPORT
+    #define QTD_QWT_PUBLIC QTD_EXPORT
 #else
-    #define QTD_QWT_DLL_PUBLIC QTD_DLL_IMPORT
+    #define QTD_QWT_PUBLIC QTD_IMPORT
 #endif
 
 //TODO: ditch
@@ -103,15 +95,7 @@
     void* ptr;
 };
 
-enum QtdObjectFlags
-{
-    qNone,
-    qNativeOwnership            = 0x01,
-    qDOwnership                 = 0x02
-    //gcManaged                 = 0x04
-};
-
-class QTD_CORE_DLL_PUBLIC QtdObjectLink
+class QTD_CORE_PUBLIC QtdObjectLink
 {
 public:
     void* dId;
@@ -132,7 +116,7 @@
     }
 };
 
-class QTD_CORE_DLL_PUBLIC QObjectLink : public QtdObjectLink, public QObjectUserData
+class QTD_CORE_PUBLIC QObjectLink : public QtdObjectLink, public QObjectUserData
 {
 public:
     enum Flags
@@ -154,8 +138,8 @@
 
 #define Array DArray
 
-QTD_EXPORT_DECL(CORE, void, toUtf8, (const unsigned short* arr, uint size, void* str))
-QTD_EXPORT_DECL(CORE, void, QtdObject_delete, (void* dId))
+QTD_FUNC_DECL(CORE, void, toUtf8, (const unsigned short* arr, uint size, void* str))
+QTD_FUNC_DECL(CORE, void, QtdObject_delete, (void* dId))
 
 QTD_EXTERN QModelIndex qtd_to_QModelIndex(QModelIndexAccessor mia);
 QTD_EXTERN QModelIndexAccessor qtd_from_QModelIndex(const QModelIndex &index);
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/wiki/common.css	Fri Jul 16 20:04:29 2010 +0300
@@ -0,0 +1,13 @@
+DIV.warning
+{
+	border: solid 1px;
+}
+
+SPAN.header1
+{
+	border-bottom: dotted 1px;
+}
+
+DIV.warning
+{
+}
\ No newline at end of file