This is the mail archive of the cygwin@sourceware.cygnus.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Linker: Bug or Feature?


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".


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]