X-Recipient: archive-cygwin AT delorie DOT com X-Spam-Check-By: sourceware.org Message-ID: Date: Tue, 22 Jul 2008 15:29:38 -0500 From: "Nathan Thern" To: cygwin AT cygwin DOT com Subject: .s file causing problems when linking MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline X-IsSubscribed: yes 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 I am attempting to compile MIT/GNU Scheme on cygwin. The build proceeds fine through the main executable, but fails when linking a dynamically openable module. The main executable is created with this command: > gcc -o scheme.exe cmpauxmd.o cmpauxmd.o is created by: > ./makegen/m4.sh cmpauxmd.m4 > cmpauxmd.s > as -o cmpauxmd.o cmpauxmd.s The are all compiled from .c files. The first module fails to link as follows: > gcc -shared -o prbfish.dll prbfish.o --> Lots of "prbfish.o:prbfish.c: undefined reference to X" where the X's are symbols defined in both cmpauxmd.o and So I tried to create a helper lib just to provide symbols for prbfish.dll: > gcc -shared -o libscheme.dll cmpauxmd.o --> Cannot export asm_sc_apply_generic: symbol not found --> several more "Cannot export"s All the "Cannot export" symbols are defined in cmpauxmd.o In fact, I get the same error when I try > gcc -shared -o prbfish.dll prbfish.o cmpauxmd.o --> Cannot export asm_sc_apply_generic: symbol not found ... Is my approach of building a helper lib the correct one? If so, how do I resolve the "Cannot export" errors? OR ... Is there another (better) way to inform ld of the symbols in scheme.exe in order to succesfully link the module .dll's? regards, NT -- 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/