Cant find library in /usr/bin/ld

0 votes

Whenever I try and compile my program, it gives me this error. also I'm using g++ commands:

usr/bin/ld: cannot find -l<nameOfTheLibrary>

I've created a symlink to my library lcated in the other directory. Is there anything else I need to do to make this work?

Mar 26 in Linux Administration by Damon Salvatore
• 5,510 points
40 views

1 answer to this question.

0 votes

Say your library "libxyz.so" is located in:

/home/user/myDir

then link it to your program using:

g++ -L/home/user/myDir -lxyz myprog.cpp -o myprog
answered Mar 26 by ajs3033
• 7,280 points

Related Questions In Linux Administration

0 votes
1 answer

How to find path of software installed in Linux?

There are multiple ways to find the ...READ MORE

answered May 19 in Linux Administration by Rishi
61 views
0 votes
1 answer
0 votes
1 answer

How to find the group associated with a user in linux?

To list all the groups groups or to list ...READ MORE

answered Jun 20 in Linux Administration by DareDev
• 6,810 points
30 views
0 votes
2 answers

How do I find all files containing specific text and rename in unix/linux

Hi, @Kal You can use this command below to ...READ MORE

answered Jul 2 in Linux Administration by Gitika
• 25,340 points

edited Jul 2 by Gitika 68 views
0 votes
1 answer
0 votes
1 answer

How do I set variable if a specific package version is installed in CFEngine?

Here is what you can do.Just use packagesmatching to ...READ MORE

answered Jul 12, 2018 in Other DevOps Questions by Atul
• 10,240 points
80 views
0 votes
1 answer

Making a program sleep for milliseconds?

There are no standard C API's that ...READ MORE

answered Mar 1 in Linux Administration by DareDev
• 6,810 points
31 views
0 votes
1 answer

ld unable to find existing library

your problem here is that your linker ...READ MORE

answered Mar 19 in Linux Administration by DareDev
• 6,810 points
55 views
0 votes
1 answer

How t find httpd.conf file in apache?

First f all, get apache's path: $ ps ...READ MORE

answered Feb 27 in Linux Administration by ajs3033
• 7,280 points
29 views
0 votes
1 answer

How to collect all output in one file?

You can use 2> to redirect it: foo ...READ MORE

answered Mar 1 in Linux Administration by ajs3033
• 7,280 points
27 views