public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* cygwin DLL and mingw main
@ 2014-06-30 12:25 Soren Hein
  2014-06-30 12:44 ` ezmlm problems with yahoo/AT&T senders tednolan
  2014-06-30 13:25 ` cygwin DLL and mingw main Jan Nijtmans
  0 siblings, 2 replies; 5+ messages in thread
From: Soren Hein @ 2014-06-30 12:25 UTC (permalink / raw)
  To: cygwin

Below are (1) a simple dll (dds.dll) and (2) a simple main program 
(dtest.cpp).  After much experimentation I have reduced my problem to this 
tiny test case.

If I compile (1) with cygwin and (2) with mingw, the resulting program 
segfaults when run.

(1) with cygwin and (2) with cygwin works.
(1) with mingw and (2) with mingw works.
(1) with mingw and (2) with cygwin works.

There are also combinations with Microsoft cl that work.

Why does it segfault?  It's driving me nuts.

g++ v4.8.3, mingw v4.8.2.
% uname -a
CYGWIN_NT-6.1-WOW64 CDD-NB01 1.7.30(0.272/5/3) 2014-05-23 10:36 i686 Cygwin


Thanks,
Soren
-----

% cat dds.cpp
#include <windows.h>
#include <stdio.h>

extern "C" __declspec(dllexport) int __stdcall identify()
{
  return 17;
}

% cat dtest.cpp
#include <windows.h>
#include <stdio.h>

extern "C" __declspec(dllimport) int __stdcall identify();

int main(int argc, char * argv[])
{
  printf("Return value is %d\n", identify());
  return TRUE;
}


This compilation leads to the fail:
g++ -o dds.dll -shared dds.cpp -Wl,--subsystem,windows
i686-w64-mingw32-g++ -o dtest dtest.cpp -Wl,--subsystem,windows -L./ -ldds

This compilation works:
i686-w64-mingw32-g++ -shared dds.cpp -Wl,--subsystem,windows -o dds.dll
g++ dtest.cpp -Wl,--subsystem,windows -L./ -ldds -o dtest



--
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

^ permalink raw reply	[flat|nested] 5+ messages in thread

* ezmlm problems with yahoo/AT&T senders
  2014-06-30 12:25 cygwin DLL and mingw main Soren Hein
@ 2014-06-30 12:44 ` tednolan
  2014-06-30 13:42   ` Larry Hall (Cygwin)
  2014-06-30 13:25 ` cygwin DLL and mingw main Jan Nijtmans
  1 sibling, 1 reply; 5+ messages in thread
From: tednolan @ 2014-06-30 12:44 UTC (permalink / raw)
  To: cygwin

I've tried reporting this several different ways, apparently into a
black hole, so I'll try it here on the front list.

I preiodically get messages from ezmlm to the effect


	Hi! This is the ezmlm program. I'm managing the
	cygwin#cygwin.com mailing list.


	Messages to you from the cygwin mailing list seem to
	have been bouncing. I've attached a copy of the first bounce
	message I received.

The referenced attached message is from the Yahoo/AT&T mailer and
the key thing is an error message + URL, which apparently ezmlm never
passes to anyone responsible:

	Permanent Failure: 
	554 REPLY: 554_5.7.9_Message_not_accepted_for_policy_reasons.
	See_http://postmaster.yahoo.com/errors/postmaster-28.html

Checking the supplied URL reveals that the cygwin list does not comply
with the sender verification magic that Yahoo wants to see when an email
comes from a  Yahoo/AT&T address and is to be distributed to an AT&T/Yahoo
adress.

I have a bellsouth.net address which now falls under Yahoo/AT&T
(and I'm sure there are many others on the list in a similar situation).
This means that *any* message *to* the cygwin list *from* an AT&T/Yahoo
address will not be delivered to me (or any other AT&T/Yahoo user)
and will be kicked back, putting us all on ezmlm's naughty list.

This is not something I can fix -- it has to be addressed at the mailing
list level as noted in the error URL.

I apologize for putting this here, but hopefully someone wil now see it.

Ted Nolan

--
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

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: cygwin DLL and mingw main
  2014-06-30 12:25 cygwin DLL and mingw main Soren Hein
  2014-06-30 12:44 ` ezmlm problems with yahoo/AT&T senders tednolan
@ 2014-06-30 13:25 ` Jan Nijtmans
  1 sibling, 0 replies; 5+ messages in thread
From: Jan Nijtmans @ 2014-06-30 13:25 UTC (permalink / raw)
  To: cygwin

2014-06-30 14:25 GMT+02:00 Soren Hein <soren.hein@gmail.com>:
> If I compile (1) with cygwin and (2) with mingw, the resulting program
> segfaults when run.
....
> Why does it segfault?  It's driving me nuts.

Probably it crashes because the internals of cygwin1.dll
are not initialized. Somehow you will need to call
the function cygwin_dll_init() during initialization
(if it's possible at all what you are trying to do .....).

See:
    <http://cygwin.com/faq/faq.html#faq.programming.msvs-mingw>

Regards,
        Jan Nijtmans

--
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

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: ezmlm problems with yahoo/AT&T senders
  2014-06-30 12:44 ` ezmlm problems with yahoo/AT&T senders tednolan
@ 2014-06-30 13:42   ` Larry Hall (Cygwin)
  2014-06-30 13:53     ` tednolan
  0 siblings, 1 reply; 5+ messages in thread
From: Larry Hall (Cygwin) @ 2014-06-30 13:42 UTC (permalink / raw)
  To: cygwin

On 06/30/2014 08:05 AM, tednolan wrote:
> I've tried reporting this several different ways, apparently into a
> black hole, so I'll try it here on the front list.

<snip>

> I apologize for putting this here, but hopefully someone wil now see it.

There are other possibilities for why you haven't received a response to
your previous reports.  They range from you sent to the wrong address
to someone hasn't investigated the report yet.  Since this is really a
private matter between you, Yahoo, and cygwin-owner and while
we appreciate your previous efforts to address this issue directly,
engaging the list on this is really off-topic.  Also, it may not have
been obvious to you but your email to the list on this topic usurped
a thread on a totally different subject.

<https://cygwin.com/ml/cygwin/2014-06/msg00443.html>

We ask that email sent to this list that isn't in response to an
existing thread be composed as a new message.


-- 
Larry

_____________________________________________________________________

A: Yes.
 > Q: Are you sure?
 >> A: Because it reverses the logical flow of conversation.
 >>> Q: Why is top posting annoying in email?

--
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

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: ezmlm problems with yahoo/AT&T senders
  2014-06-30 13:42   ` Larry Hall (Cygwin)
@ 2014-06-30 13:53     ` tednolan
  0 siblings, 0 replies; 5+ messages in thread
From: tednolan @ 2014-06-30 13:53 UTC (permalink / raw)
  To: cygwin

In message <53B16935.4040201@cygwin.com>you write:
>On 06/30/2014 08:05 AM, tednolan wrote:
>been obvious to you but your email to the list on this topic usurped
>a thread on a totally different subject.
>
><https://cygwin.com/ml/cygwin/2014-06/msg00443.html>
>
>We ask that email sent to this list that isn't in response to an
>existing thread be composed as a new message.
>
>
>-- 
>Larry
>

Yes, my bad, sorry.  I forgot to trim the references.

--
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

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2014-06-30 13:53 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-06-30 12:25 cygwin DLL and mingw main Soren Hein
2014-06-30 12:44 ` ezmlm problems with yahoo/AT&T senders tednolan
2014-06-30 13:42   ` Larry Hall (Cygwin)
2014-06-30 13:53     ` tednolan
2014-06-30 13:25 ` cygwin DLL and mingw main Jan Nijtmans

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).