Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm Sender: cygwin-owner AT sourceware DOT cygnus DOT com Delivered-To: mailing list cygwin AT sourceware DOT cygnus DOT com X-Authentication-Warning: modi.xraylith.wisc.edu: khan owned process doing -bs Date: Mon, 10 May 1999 15:37:51 -0500 (CDT) From: Mumit Khan Reply-To: Mumit Khan To: "J.C. Ng" cc: cygwin AT sourceware DOT cygnus DOT com Subject: Re: No underscore option for g77 or f77 In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII On Mon, 10 May 1999, J.C. Ng wrote: > Thanks for the info. > Actually it is gcc/g++ which appends the underscore to the front of the > symbols within the libray. And this mucks up the compilation of my > executable. How can I disable this? GCC (all languages) *always* prepends an underscore PE-COFF. If you see otherwise, it's a bug. This underscore is an ABI (App. Binary Interface) issue, and hence can vary from system to system (Linux/ELF eg does not prepend the underscore). If you really want help, please stop rationing the information in small bits and pieces, and instead send a complete test case that shows the problem. At the very least, describe the problem in detail, with all the pertinent version information and some code if applicable, which will save all of us time at the end. Here's a way to test it: 1. create two files, a.c and b.f, with a function in each. /* a.c */ void cfoo () { } C b.f subroutine ffoo () return end 2. now compile both using egcs and look at the symbols. $ gcc -c -v a.c b.f $ nm a.o b.o a.o: 00000000 b .bss 00000000 d .data 00000000 t .text 00000000 t ___gnu_compiled_c 00000000 T _cfoo 00000000 t gcc2_compiled. b.o: 00000000 b .bss 00000000 d .data 00000000 t .text 00000000 t ___gnu_compiled_f77 00000000 T _ffoo_ 00000000 t gcc2_compiled. You'll see that *both* C and f77 functions have _ prepended, so there should be no conflict. Regards, Mumit -- Want to unsubscribe from this list? Send a message to cygwin-unsubscribe AT sourceware DOT cygnus DOT com