1

I need to know why VS code is not compiling ncurses.h. but it is possible to compile in the terminal ubuntu. this message is appearing on the VS code. (.text+0xd): undefined reference to `initscr'

ricardo
  • 27
  • 3

2 Answers2

1

I solved this problem adding "-lncurses" in the "args" (tasks.json)

"args": [
    "-g",
    "${file}",
    "-o",
    "${fileDirname}/${fileBasenameNoExtension}",
    "-lncurses" <--------- add the library ("-lncurses" ) here 
],
Andronicus
  • 25,419
  • 17
  • 47
  • 88
ricardo
  • 27
  • 3
0

the code runner extension configuration add -lncurses before -o

"code-runner.executorMap": { "c": "cd $dir && gcc $fileName -lncurses -o $fileNameWithoutExt && $dir$fileNameWithoutExt " }

ricardo
  • 27
  • 3
  • 1
    As it’s currently written, your answer is unclear. Please [edit] to add additional details that will help others understand how this addresses the question asked. You can find more information on how to write good answers [in the help center](/help/how-to-answer). – Community Oct 25 '21 at 01:40