X-Recipient: archive-cygwin AT delorie DOT com DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:subject:to:references:from:message-id:date :mime-version:in-reply-to:content-type :content-transfer-encoding; q=dns; s=default; b=PAbWn0bntXD+EQlp 9jGHMLWM3Q6dUEUe+P7wwX+g0DLg3i1oorESfPU+HJQo0wYpHh0/CJnKeNqPGdVs 7DvHmVO/Mvfj4gbIHn8unZnI0V9BlitrGgMo+ps0ph7XyPHQIacCjmgX5TpgvElb zjoNjpIBjhoH2Qkaea51PGJ/VZk= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:subject:to:references:from:message-id:date :mime-version:in-reply-to:content-type :content-transfer-encoding; s=default; bh=HVop6L0gXH73suN+5dtZHE ipUEU=; b=Wj8GETH5oHAVTalbZ0Oy+7aKIcNVjz/3mm+i+VyzDixJZu0i0tGkQo ouY0VdLmiAeKOXP3PEX2nF4VTSE0ylRNnosZ1P0JodqQxp5HTr07fhTMjYFKVb8T aHev2xyLNRmQPobXJ6Ujm1YKj4cERqbrX9QsFFfmJesMueJiF2LyI= Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=ham version=3.3.1 spammy=H*f:sk:c9486fc, dlldll, H*f:sk:gFdeYeZ, UD:dll.dll X-HELO: mail-wr1-f48.google.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:references:from:message-id:date:user-agent:mime-version :in-reply-to:content-transfer-encoding; bh=G/DFspE5BHXpOVFvmRMwUoNKYMLgOZPzXvcrRebLaxM=; b=AZFFQR2e33hzjpirGV7LeGDB+EtB38B2YIE9IV4NU4VNUc1lUZH7kLFK9KLeCYd7GU teJDs+j90ylMgfhjlj/ixFfjSb4Emly6umypDa83AZQkCWBU/bDhl+i/g7VC/rRw4nWK /zYF4hY7ry1A1yxIdsgyxHVjSSPA8+Zut2WPhp7+Cwk65UdwiGiJUwOFU59pgjWw076g aik19gsisftcfDD1o+FGSlb9jBo1H7Ghk/HS9DHxbpkW8M+pr3e7JAI82JY+2Al9ZzMf IBdre9sy4ZcXAHjYgKGoQLGZthOfu7I/75hZJnW0z0LbiJl+kDL3kQghu/dS2mxs5Lsd YlcA== Subject: Re: DllMain not called To: cygwin AT cygwin DOT com References: From: Marco Atzeri Message-ID: <101a7ee1-5ee3-78af-1c1f-ac8b7d97c49b@gmail.com> Date: Fri, 7 Feb 2020 16:46:32 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.4.2 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes Am 07.02.2020 um 16:07 schrieb Olivia Nelson: > I compile it like this: > gcc dll.c -shared -fPIC -o dll.dll > > I tried to run it with LoadLibraryA > > But DllMain is not called. > > you are building a Cygwin dll, that requires the Cygwin1.dll but probably do you not intend it and need a standalone one that requires only the MS system dll's. install the Mingw crosscompiler x86_64-w64-mingw32-gcc.exe that is in the package $ cygcheck -f /usr/bin/x86_64-w64-mingw32-gcc.exe mingw64-x86_64-gcc-core-7.4.0-1 and compile as x86_64-w64-mingw32-gcc.exe -Wall dll.c -shared -fPIC -o dll.dll Regards Marco -- 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