X-Recipient: archive-cygwin@delorie.com
X-Spam-Check-By: sourceware.org
Message-ID: <488858D0.A307DD96@dessent.net>
Date: Thu, 24 Jul 2008 03:26:24 -0700
From: Brian Dessent <brian@dessent.net>
X-Mailer: Mozilla 4.79 [en] (Windows NT 5.0; U)
MIME-Version: 1.0
To: Nathan Thern <nthern@gmail.com>
CC: cygwin@cygwin.com
Subject: Re: .s file causing problems when linking
References: <a07c15f00807221329k544d2079ia14421e724fe6fd@mail.gmail.com> 	 <48864AB5.6D177B25@dessent.net> 	 <a07c15f00807221617o20061c0dy135f955181472469@mail.gmail.com> 	 <488678FD.1F211496@dessent.net> <a07c15f00807231443i3ce6b0c2qf82f305b78213761@mail.gmail.com>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-IsSubscribed: yes
Reply-To: cygwin@cygwin.com
Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.com

Nathan Thern wrote:

> That sounds great. However, I can't get it to work:
> "gcc -o scheme.exe *.o -Wl,--out-implib,scheme.dll.a" creates a
> working scheme.exe, but silently doesn't create scheme.dll.a
> and

For the last time, please read the link I gave.  Specifically this part:

>   However, keep in mind that the GNU linker's auto-export feature
> (which normally allows you to skip the practice of requiring
> __declspec(dllexport) when declaring symbols you want to export) does
> not apply when linking an executable.  Therefore, when linking an
> executable that exports symbols you need to do one of:
> 
> A) -Wl,--export-all-symbols
> B) declare the symbols to be exported with __declspec(dllexport)
> C) supply the .def file to the linker

> "gcc -shared -o scheme.exe *.o -Wl,--out-implib,scheme.dll.a" creates
> scheme.dll.a and creates a scheme.exe that dies with "-bash:
> scheme.exe: Permission denied" upon invocation.

-shared creates a dll.  You can't use that to link an executable.

Brian

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

