<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html; charset=ISO-8859-1"
 http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Hi there,<br>
<br>
just FYI as this has cost me more than two days, such that others who
may run into this problem sometimes in the future can check on this as
well: <br>
<blockquote>the problem was using the "/Gr" switch ("__fastcall calling
conventions") for the MS compiler. Removing this compiler option
allowed the
linker to link successfully to the (Windows KDE) dbus library! <br>
</blockquote>
---rony<br>
<br>
<br>
<br>
On 19.08.2011 17:11, rony wrote:
<blockquote cite="mid:4E4E7D08.3040906@wu.ac.at" type="cite">
  <meta content="text/html; charset=ISO-8859-1"
 http-equiv="Content-Type">
Sorry, forgot to supply the MSC compile statement:<br>
  <blockquote>cl /nologo /EHsc /O2 /Gr /Gs /FAcs /MT /W3
/D_CRT_SECURE_NO_DEPRECATE /D_CRT_NONSTDC_NO_DEPRECATE -DWINDOWS
-DDBUSOOREXX_32 /c /Fodbusoorexx-32.obj dbusoorexx.cc<br>
  </blockquote>
---rony<br>
  <br>
On 19.08.2011 17:05, rony wrote:
  <blockquote cite="mid:4E4E7BC0.7050808@wu.ac.at" type="cite">
    <meta http-equiv="content-type"
 content="text/html; charset=ISO-8859-1">
Hi there,<br>
    <br>
the Windows KDE project has dbus binaries for Windows created by/for
different compilers. Eg. cf. <a moz-do-not-send="true"
 class="moz-txt-link-rfc2396E"
 href="http://www.winkde.org/pub/kde/ports/win32/releases/stable/">&lt;http://www.winkde.org/pub/kde/ports/win32/releases/stable/&gt;</a>,
or

    <a moz-do-not-send="true" class="moz-txt-link-rfc2396E"
 href="http://sourceforge.net/projects/kde-windows/files/dbus/1.4.1-2/">&lt;http://sourceforge.net/projects/kde-windows/files/dbus/1.4.1-2/&gt;</a>.

    <br>
    <br>
Compiling the language binding for Windows with MSC works, but the
linking process does not succeed. There are 78 messages like these:<br>
    <blockquote>dbusoorexx-32.obj : error LNK2019: unresolved external
symbol __imp_@dbus_threads_init_default@0 referenced in function
_dbusLoader@4<br>
dbusoorexx-32.obj : error LNK2019: unresolved external symbol
__imp_@dbus_get_version@12 referenced in function @DbusVersion_impl@4<br>
dbusoorexx-32.obj : error LNK2019: unresolved external symbol
__imp_@dbus_error_free@4 referenced in function @DbusValidate_impl@12<br>
... cut ...<br>
    </blockquote>
Researching the Internet there have been hints that the mostlikely case
for that MS linker error is that the library was not given/found.
AFAICT, the library should be found. (LIB contains the directory with
the "dbus-1.lib" file which is explicitly listed as one of the
libraries to link to). <br>
    <br>
Here are the paths to the lib-dirs:<br>
    <blockquote>E:\Programme\Microsoft Visual Studio
9.0\VC\ATLMFC\LIB;E:\Programme\Microsoft Visual Studio
9.0\VC\LIB;E:\Programme\Microsoft
SDKs\Windows\v7.0\lib;;e:\programme\dbus-1\lib;D:\Programme\ooRexx\api<br>
    </blockquote>
Here the link command in the nmake Makefile:<br>
    <blockquote>link /nologo /SUBSYSTEM:Windows rexx.lib rexxapi.lib
dbus-1.lib WS2_32.lib /def:dbusoorexx-32.def /DLL dbusoorexx-32.obj
-out:dbusoorexx-32.dll<br>
    </blockquote>
Also trying to create an import library directly off the dbus-1.dll
(using the MS tools "dumpbin /exports ..." and "lib /def:...")
succeeded, but the linking is not successful, giving the same linking
errors as above.<br>
    <br>
The version of the MS compiler (referred to as "vc90" for the dbus
binaries of the Windows-KDE project):<br>
    <blockquote>Microsoft (R) 32-bit C/C++ Optimizing Compiler Version
15.00.30729.01 for 80x86<br>
    </blockquote>
Probably (hopefully) I am doing something stupid, hence the request for
ideas, hints or pointers!<br>
    <br>
TIA,<br>
    <br>
---rony<br>
    <br>
P.S.: Also tried to create a Windows version of dbus from the latest
git using cygwin, which has not succeeded. Then downloaded cmake and
tried to follow the README.* files using the MS compiler, then also
downloaded and used MinGW, which all succeed with the configuration
part, but make does not run successfully. (The cmake MS variant at
least created a dbus-1.dll with lib- and exp-files. But using them
yields the same link error as above.)<br>
    <br>
  </blockquote>
</blockquote>
</body>
</html>