jeudi 9 avril 2020

Undefined Reference To, VSCODE, Cant Link static library to header files

I have a problem and I can't fix it no matter what I do. My university is using Stanford CS106B c++ Library for a course and only IDE that seems to work on windows is Microsoft Visual C++ 2008 Express.

I would like to write assignments in Visual Studio Code but I can't link header files with complied static library.

My VSCode Extensions: C/C++, C++ Intellisense, Code Runner. My Compiler: GCC(6.3.0) MinGW64

Details: This is how the assignment folder looks like. In the StanfordCPPLib folder, there are header files and compiled .lib file. in the numeric Conversions folder is .CPP file that I have to fill in.

├───1 - Numeric Conversions
│   ├───Numeric Conversions
│   └───StanfordCPPLib
│       └───private
|
└───.vscode

VSCode can see those header files (when I press CTRL and hover over them it shows contents), but cant Link them to .lib file, thus I get error Undefined reference to....

I do not know how to set up tasks.JSON file which seems to be the problem(this was pointed out to me on multiple forums).

Aucun commentaire:

Enregistrer un commentaire