No output from an executable when linked to a dll (both executable and dll build by me)

stavros vagionitis stavros.vagionitis@gmail.com
Sat Jan 16 13:30:00 GMT 2016


Hi ppl,

I have a problem when running an executable, it seems that is running
fine, but I don't get any output in the console.

I need to build the [Paho MQQT
Client](https://eclipse.org/paho/clients/c/) in Cygwin. So I modified
the Makefile in order to build .dll instead of .so files. I have
attached the changes I made to the Makefile(Makefile_cygwin.patch). I
followed the instructions
[here](https://cygwin.com/cygwin-ug-net/dll.html) for the dll.

The client comes with some sample applications, so I tried to run one
of them, MQTTAsync_publish.exe. I would expect to get the following
output (I run it in a linux box)

$ Waiting for publication of Hello World!
$ on topic MQTT Examples for client with ClientID: ExampleClientPub
$ Connect failed, rc 0

but I don't get anything in the console and the application seems to
run without any other output or any indication. First I thought that I
hadn't linked correctly the dll, but I executed the following

$ cygcheck.exe ./MQTTAsync_publish.exe
C:\cygwin64-fresh\home\svagionitis\workspace\org.eclipse.paho.mqtt.c.git\build\output\samples\MQTTAsync_publish.exe
  C:\cygwin64-fresh\bin\cygwin1.dll
    C:\Windows\system32\KERNEL32.dll
      C:\Windows\system32\API-MS-Win-Core-RtlSupport-L1-1-0.dll
      C:\Windows\system32\ntdll.dll
      C:\Windows\system32\KERNELBASE.dll
      C:\Windows\system32\API-MS-Win-Core-ProcessThreads-L1-1-0.dll
      C:\Windows\system32\API-MS-Win-Core-Heap-L1-1-0.dll
      C:\Windows\system32\API-MS-Win-Core-Memory-L1-1-0.dll
      C:\Windows\system32\API-MS-Win-Core-Handle-L1-1-0.dll
      C:\Windows\system32\API-MS-Win-Core-Synch-L1-1-0.dll
      C:\Windows\system32\API-MS-Win-Core-File-L1-1-0.dll
      C:\Windows\system32\API-MS-Win-Core-IO-L1-1-0.dll
      C:\Windows\system32\API-MS-Win-Core-ThreadPool-L1-1-0.dll
      C:\Windows\system32\API-MS-Win-Core-LibraryLoader-L1-1-0.dll
      C:\Windows\system32\API-MS-Win-Core-NamedPipe-L1-1-0.dll
      C:\Windows\system32\API-MS-Win-Core-Misc-L1-1-0.dll
      C:\Windows\system32\API-MS-Win-Core-SysInfo-L1-1-0.dll
      C:\Windows\system32\API-MS-Win-Core-Localization-L1-1-0.dll
      C:\Windows\system32\API-MS-Win-Core-ProcessEnvironment-L1-1-0.dll
      C:\Windows\system32\API-MS-Win-Core-String-L1-1-0.dll
      C:\Windows\system32\API-MS-Win-Core-Debug-L1-1-0.dll
      C:\Windows\system32\API-MS-Win-Core-ErrorHandling-L1-1-0.dll
      C:\Windows\system32\API-MS-Win-Core-Fibers-L1-1-0.dll
      C:\Windows\system32\API-MS-Win-Core-Util-L1-1-0.dll
      C:\Windows\system32\API-MS-Win-Core-Profile-L1-1-0.dll
      C:\Windows\system32\API-MS-Win-Security-Base-L1-1-0.dll
  C:\cygwin64-fresh\usr\local\lib\cygpaho-mqtt3a.dll.1.0

and it seems that the library is there. I have installed all the
produced libraries in the /usr/local/lib and I have added the
/usr/local/lib to the PATH.

I am not sure what might be the problem, is it something related to
the output or something else? I am open to any suggestions of how to
pinpoint the problem.

Thank you in advance.

Regards,

Stavros

P.S. I have attached the cygcheck.out for more info of the system.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: cygcheck.out
Type: application/octet-stream
Size: 34858 bytes
Desc: not available
URL: <http://cygwin.com/pipermail/cygwin/attachments/20160116/6955e601/attachment.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Makefile_cygwin.patch
Type: text/x-patch
Size: 10422 bytes
Desc: not available
URL: <http://cygwin.com/pipermail/cygwin/attachments/20160116/6955e601/attachment.bin>
-------------- next part --------------
--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple


More information about the Cygwin mailing list