Home > OS >  When performing the make, tip error/ld: can't find - ltbhand how to deal with. Thank you.
When performing the make, tip error/ld: can't find - ltbhand how to deal with. Thank you.

Time:09-16

Make
The Compiling config. O... .
The Compiling servmgr. O... .
The Compiling main. O... .
The Compiling queue. O...
The Compiling utility. O...
The Compiling ascbin. O...
Linking elec - front...
The/usr/bin/ld: can't find - ltbhand
Collect2: error: ld return 1
Make: * * */elec - front error 1

CodePudding user response:

 LIB_PATH=L/path/to/where/tbhand/is 
Target: prerequisite
The ${CC} ${LIB_PATH} ${ANY_OTHER_REQUIRED}

CodePudding user response:

reference 1st floor alittlenewbiek response:
 LIB_PATH=L/path/to/where/tbhand/is 
Target: prerequisite
The ${CC} ${LIB_PATH} ${ANY_OTHER_REQUIRED}


Thank you very much, do you listed this is placed in the MAKEFILE file? Also has the/usr/bin/ld in the ld is a directory or a file, and this - ltbhand is a parameter/function or a file, thank you very much, looking forward to your reply,

CodePudding user response:

refer to the second floor eisldkw response:
Quote: refer to 1st floor alittlenewbiek response:
 LIB_PATH=L/path/to/where/tbhand/is 
Target: prerequisite
The ${CC} ${LIB_PATH} ${ANY_OTHER_REQUIRED}


Thank you very much, do you listed this is placed in the MAKEFILE file? Also has the/usr/bin/ld in the ld is a directory or a file, and this - ltbhand is a parameter/function or a file, thank you very much, looking forward to your reply,


Look at your use of the software itself is what project management tools,
May be a Makefile, may also be CMakelists. TXT, can all,
(this increased overhead, you need to see the contents of the can only see a Makefile)

- ltbhand is specified using a library file, called libtbhand
Role is to provide the definition of the entire program need (definition),

Ld be would, that is, the linker,
Role is to put the declaration (declaration) and library files in the program provides the definition of associated,

Use - ltbhand is equivalent to told ld,
Hey, give me a ld to link libtbhand library;
But ld don't know where to look for, so an error,

So use the -l provide search path;
But as the case, you directly to the same directory libtbhand file in application should also can,
Because the makefile will automatically find,

CodePudding user response:

reference alittlenewbiek reply: 3/f
Quote: refer to the second floor eisldkw response:
Quote: refer to 1st floor alittlenewbiek response:
 LIB_PATH=L/path/to/where/tbhand/is 
Target: prerequisite
The ${CC} ${LIB_PATH} ${ANY_OTHER_REQUIRED}


Thank you very much, do you listed this is placed in the MAKEFILE file? Also has the/usr/bin/ld in the ld is a directory or a file, and this - ltbhand is a parameter/function or a file, thank you very much, looking forward to your reply,


Look at your use of the software itself is what project management tools,
May be a Makefile, may also be CMakelists. TXT, can all,
(this increased overhead, you need to see the contents of the can only see a Makefile)

- ltbhand is specified using a library file, called libtbhand
Role is to provide the definition of the entire program need (definition),

Ld be would, that is, the linker,
Role is to put the declaration (declaration) and library files in the program provides the definition of associated,

Use - ltbhand is equivalent to told ld,
Hey, give me a ld to link libtbhand library;
But ld don't know where to look for, so an error,

So use the -l provide search path;
But as the case, you directly to the same directory libtbhand file in application should also can,
Because the makefile will automatically find,


Thank you very, very, excuse me, what you speak of these contents which are on the books, or which study on the video, thank you again,

CodePudding user response:

Books video I don't know, may be only 10% less than the length will be involved,

In my opinion, the contents of these are very fragile,

Specifically for online, or watching the content of C/C + + advanced,

CodePudding user response:

reference 5 floor alittlenewbiek reply:
video I don't know, the book would probably only 10% less than the length of involved,

In my opinion, the contents of these are very fragile,

Specifically for online, or watching the content of C/C + + advanced,


Thank you very much, could you please tell me:

LIB_PATH=L/path/to/where/tbhand/is
Target: prerequisite
The ${CC} ${LIB_PATH} ${ANY_OTHER_REQUIRED}

This is written in the makefile or write in other places?
  • Related