Hi, cygwiners, 2009/8/12 Dave Korn <dave.korn.cyg...@googlemail.com>: > Javier Sedano wrote: > >> /home/jsedano/prj/uc3m/ao/Labs_J/LibAO/testBypass.c:26: undefined >> reference to `_testBP_1' >> /home/jsedano/prj/uc3m/ao/Labs_J/LibAO/testBypass.c:26: undefined >> reference to `___aoAsBypassCall' > >> jsed...@ender:~/prj/uc3m/ao/Labs_J/LibAO> nm libao-g.a | grep _testBP_1 >> jsed...@ender:~/prj/uc3m/ao/Labs_J/LibAO> nm libao-g.a | grep testBP_1 >> 00000166 T testBP_1 > > You're trying to use a library binary that was originally compiled on Linux, > aren't you? That can't work, sorry; you need to recompile the library from > source on Cygwin. >
On a first though I was about to say "no"... but on second though... not sure. I've got several .s files (assembly code) that seems to be hand-written (they have lots of the kind of comments that humans use to do, so does not seem to be compiled). See trace below. So let's see if I understand the problem: when I define (and implement) a function f1(), gcc on Linux will use the name f1 for the function, but gcc on cygwin will use _f1. So if my .s has been created with Linux on mind, the developer used f1, and cygwin can not find it. Right so far? So any other idea? Any modifier to gcc not to use the leading _? jsed...@ender:~/prj/uc3m/ao/Labs_J/LibAO> grep -r testBP_1 . ./bypassCall.s: .global testBP_1, testBP_2, testBP_3, testBP_4, testBP_5, testBP_6 ./bypassCall.s:testBP_1: ./testBypass.c:void testBP_1(); ./testBypass.c: returned = __aoAsBypassCall(&testBP_1, // Function to call jsed...@ender:~/prj/uc3m/ao/Labs_J/LibAO> grep -B5 -A5 testBP_1 bypassCall.s toTransfer: .int 0 .text .globl __aoAsBypassDiagnostics, __aoAsBypassCall .global testBP_1, testBP_2, testBP_3, testBP_4, testBP_5, testBP_6 # Function to catch the invocation of certain function and # perform some checks in the way parameters and result is # manipulated. Also this method allows to transfer the result # from an arbitrary register in to %eax to facilitate the -- ################################################################################ # ---------------------------------------------------------------------- # Does nothing # ---------------------------------------------------------------------- testBP_1: ret # ---------------------------------------------------------------------- # Returns 31 in ebx # ---------------------------------------------------------------------- jsed...@ender:~/prj/uc3m/ao/Labs_J/LibAO> -- -- Javier Sedano javier.sed...@gmail.com -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple