Help Linking Library!! Please!!
Hi mates! I have a problem linking a my code when I use g++. The problem is that I can't make g++ to find the library where a function I need is. I 've found two ways of compiling successfully in my university but they fail misserably in my laptop. There are:
'g++ -L./scope-src/ -o anything LBPROT.cpp -lscope' (Suggested by rch. Many thanks mate!! :D ) and 'g++ LBPROT.cpp ./scope-src/libscope.a -o LBPROT' The g++ version I use is fine as you can see below: At home: [bash$] g++ --version g++ (GCC) 3.2.2 20030222 (Red Hat Linux 3.2.2-5) In my university: bash-2.04$ g++ --version 2.96 The error I always get is: /tmp/ccYYTJfA.o(.text+0x27): In function `getimagef(char*, image_data*)': : reference to `getimage(data*, char*, char*)' non-defined collect2: ld returned the output state 1 Any suggestion will be really welcome. Do you have any???:confused: Thanks to all for you help!! :D |
From what you posted it's not quite clear
whether there's actually two functions (same name, varied parameters) present or not. If there aren't you can safely assume that the error lies in the compiler at the uni ;) and it SHOULD fail, too. Cheers, Tink P.S.: Really this one belongs in the programming forum :} |
All times are GMT -5. The time now is 08:59 PM. |