0

I've tried to use libxl library but there is no installation document for vs code even if I try to add header files there is an error message "no such file or directory"

I also set settings include path to libxl include directory

Vs Code (code and error)

settings

libxl setup for Visual Studio : https://www.libxl.com/vscpp.html

Here is my task.json file:

{
    "version": "2.0.0",
    "tasks": [
        {
            "type": "cppbuild",
            "label": "C/C++: g++.exe build active file",
            "command": "C:\\MinGW\\bin\\g++.exe",
            "args": [
                "-fdiagnostics-color=always",
                "-g",
                "${file}",
                "-o",
                "${fileDirname}\\${fileBasenameNoExtension}.exe"
            ],
            "options": {
                "cwd": "${fileDirname}"
            },
            "problemMatcher": [
                "$gcc"
            ],
            "group": {
                "kind": "build",
                "isDefault": true
            },
            "detail": "compiler: C:\\MinGW\\bin\\g++.exe"
        }
    ]
}

and launch.json file:

{
    // Use IntelliSense to learn about possible attributes.
    // Hover to view descriptions of existing attributes.
    // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
    "version": "0.2.0",
    "configurations": [
        {
            "name": "g++.exe - Build and debug active file",
            "type": "cppdbg",
            "request": "launch",
            "program": "${fileDirname}\\${fileBasenameNoExtension}.exe",
            "args": [],
            "stopAtEntry": false,
            "cwd": "${fileDirname}",
            "environment": [],
            "externalConsole": false,
            "MIMode": "gdb",
            "miDebuggerPath": "C:\\MinGW\\bin\\gdb.exe",
            "setupCommands": [
                {
                    "description": "Enable pretty-printing for gdb",
                    "text": "-enable-pretty-printing",
                    "ignoreFailures": true
                },
                {
                    "description": "Set Disassembly Flavor to Intel",
                    "text": "-gdb-set disassembly-flavor intel",
                    "ignoreFailures": true
                }
            ],
            "preLaunchTask": "C/C++: g++.exe build active file"
        }
    ]
}
Pegasuss
  • 1
  • 1
  • ***"no such file or directory"*** means you did not properly setup your include path in your tasks.json file so your compiler can't find where you put the header. – drescherjm May 14 '22 at 22:07
  • Looking at the Visual Studio Community documentation there is an include path you need to set, a linker path and linking to a library: [https://www.libxl.com/vscpp.html](https://www.libxl.com/vscpp.html) – drescherjm May 14 '22 at 22:11
  • I use Visual Studio Code and there is no documentation on it so I can't figure it out. – Pegasuss May 15 '22 at 07:33
  • This may help teach you how to use an external library in VSCode: [https://stackoverflow.com/questions/52910102/vscode-c-task-json-include-path-and-libraries](https://stackoverflow.com/questions/52910102/vscode-c-task-json-include-path-and-libraries) – drescherjm May 15 '22 at 11:55
  • Please provide enough code so others can better understand or reproduce the problem. – Community May 16 '22 at 08:11
  • I update my situation and still can't find the solution. – Pegasuss May 16 '22 at 08:54

0 Answers0