![]() |
| | #1 |
| subminimalist Join Date: Jul 2008 Location: NYC
Posts: 3,944
| what to pass GNU ld ./a.out: error while loading shared libraries: libmpg123.so.0: cannot open shared object file: No such file or directory libmpg123.so.... is there, tho, so there must be some more different flags I need. [edit: should have tried ldconfig!] Given that I have the header and know where to find the libraries that I built from source, how can I determine (-lmpg123 was an easy guess) what flags I need to get everything to run? Maybe there is some reading related to this somewhere?
__________________ Accuracy and integrity mean nothing if you don't make it past the censors...PYTHAGORAS Last edited by MK27; 10-27-2008 at 10:20 AM. |
| MK27 is offline | |
| | #2 |
| Registered User Join Date: Jun 2008
Posts: 1,134
| |
| C_ntua is offline | |
| | #3 | |
| subminimalist Join Date: Jul 2008 Location: NYC
Posts: 3,944
| Quote: Anyone used _supported_decoders with mpg123 ? Or compiled anything with mpg123.h?[later] so i forgot to call ldconfig after I "make install'd" mpg123 (isn't that usually done automatically?) Anyway, for posterity, for at least some of the extended functions (the ones I tried so far), -lmpg123 is fine. But the proper flagset is in the examples makefile and it involves pkg-config: gcc test.c `pkg-config --cflags --libs libmpg123`
__________________ Accuracy and integrity mean nothing if you don't make it past the censors...PYTHAGORAS Last edited by MK27; 10-27-2008 at 10:17 AM. | |
| MK27 is offline | |
| | #4 | |
| Cat without Hat Join Date: Apr 2003
Posts: 8,439
| Quote:
__________________ All the buzzt! CornedBee"There is not now, nor has there ever been, nor will there ever be, any programming language in which it is the least bit difficult to write bad code." - Flon's Law | |
| CornedBee is offline | |
| | #5 |
| Senior software engineer Join Date: Mar 2007 Location: Portland, OR
Posts: 5,381
| The link is happening fine. You are passing the right library name. The problem is that the linker search path is not the same as the loader search path, so ld.so is unable to find the library. You'll need to either move the library to some standard location or provide its explicit path in LD_LIBRARY_PATH
__________________ "Congratulations on your purchase. To begin using your quantum computer, set the power switch to both off and on simultaneously." -- raftpeople@slashdot |
| brewbuck is offline | |
| | #6 | |
| subminimalist Join Date: Jul 2008 Location: NYC
Posts: 3,944
| Quote:
__________________ Accuracy and integrity mean nothing if you don't make it past the censors...PYTHAGORAS | |
| MK27 is offline | |
![]() |
| Tags |
| compiling, gcc, linker |
| Thread Tools | |
| Display Modes | |
|
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Speed test result | audinue | C Programming | 4 | 07-07-2008 05:18 AM |
| Is this claim correct: "Anywhere you pass in a function, you can pass in a functor"? | meili100 | C++ Programming | 3 | 11-22-2007 12:58 AM |
| Undefined symbols from ld? ; making bundle; gcc 3.3 | profxtjb | C Programming | 5 | 06-15-2004 01:31 AM |
| ld: linking | ilear_01 | C++ Programming | 0 | 06-10-2003 05:40 AM |
| pass be reference versus pass by value | Unregistered | C++ Programming | 2 | 08-01-2002 01:03 PM |