From: mvoss@kuttig.com
Subject: Linker: Bug or Feature?
6 Nov 1998 03:32:40 -0800
Message-ID: <C12566B3.004AFB18.00.cygnus.gnu-win32@notes.kuttig.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
To: gnu-win32@cygnus.com

Hello everyobody!

I recently discoverad an undocumented "feature" in  GCC from the
EGCS-1.1-MinGW32-Package accessible at Mumit Khan's HP.

As a small introduction: I recently started to name my C++ files *.cpp, and
my C-files *.c. Before, I used the same extension for both.


When trying this

gcc -o fooexe.exe source.cpp asm.o -lfoo -lbar -lfoobar -mwindows

with asm.o being - nomen est omen - a previously assembled file (VERY
SMALL, 12 lines / one func / NASM 097)), I get an "undefined reference to
asmfunctionfoo...", the function in the .asm / .o file. I tried for 45
minutes to compile it (I always compared my source with the coff-examples
in NASM, only to realize the there was NO programming error!)

The I tried, as a last resort, renaming the .cpp to .c -------and
magically, IT WORKED!

gcc -o fooexe.exe source.c   asm.o -lfoo -lbar -lfoobar -mwindows
                                              ####

Why that? This sucks, as far as I'm concerned!

What does GCC have to doecide about my extensions???!?


Angrily, :-)
 Moritz


-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request@cygnus.com" with one line of text: "help".
