-
Notifications
You must be signed in to change notification settings - Fork 37.3k
Closed
Description
The linker is not obeying the commands to find some shared libraries.
I am trying to compile a C project in MS Visual Studio Code on Centos 7. THe shared libraries are located in /usr/lib64. I can't seem to get the compiler to swallow my loader options in the cpp command line. No matter whether i specify the paths explicitly, or add the .so suffix, etc. , no matter what i do to my tasks.json file, i get loader errors saying "/usr/bin/ld: Cannot find -lllibpthread", etc.
Here is my tasks.json file:
{
"tasks": [
{
"type": "cppbuild",
"label": "C/C++: gcc build active file",
"command": "/usr/bin/gcc",
"args": [
"-std=c99",
"-g",
"${fileDirname}/*.h",
"${fileDirname}/*.c",
"-o",
"${fileDirname}/${fileBasenameNoExtension}",
"-L/usr/lib64/",
"-llibpthread",
"-llibpcap"
],
"options": {
"cwd": "${workspaceFolder}"
},
"problemMatcher": [
"$gcc"
],
"group": {
"kind": "build",
"isDefault": true
},
"detail": "Task generated by Debugger."
}
],
"version": "2.0.0"
}
Metadata
Metadata
Assignees
Labels
No labels