From: lat AT iki DOT fi (Lassi A. Tuura) Subject: Re: Linker: Bug or Feature? 7 Nov 1998 00:57:13 -0800 Message-ID: References: Reply-To: "Lassi A. Tuura" Mime-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII To: mvoss AT kuttig DOT com Cc: gnu-win32 AT cygnus DOT com |> I get an "undefined reference to asmfunctionfoo...", the function in |> the .asm / .o file. [renaming .cpp to .c works] The C file probably says `extern int asmfunctionfoo (...)'? If the file extension is `.cpp', GCC compiles the file as C++ and function names will be mangled, e.g. `int asmfunctionfoo (void)' would become something like `asmfunctionfoo__Fv'. If it is compiled as C, the name is not mangled and the link succeeds. If you want to compile it as C++, use `extern "C"' instead of `extern'. Hope this helps, //lat -- With sufficient thrust, pigs fly just fine. However, this is not necessarily a good idea. It is hard to be sure where they are going to land, and it could be dangerous sitting under them as they fly overhead. --RFC1925, "The Twelve Networking Truths" - For help on using this list (especially unsubscribing), send a message to "gnu-win32-request AT cygnus DOT com" with one line of text: "help".