X-Recipient: archive-cygwin AT delorie DOT 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 X-Mailer: Mozilla 4.79 [en] (Windows NT 5.0; U) MIME-Version: 1.0 To: Nathan Thern CC: cygwin AT cygwin DOT com Subject: Re: .s file causing problems when linking References: <48864AB5 DOT 6D177B25 AT dessent DOT net> <488678FD DOT 1F211496 AT dessent DOT net> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-IsSubscribed: yes Reply-To: cygwin AT cygwin DOT com 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 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/