How to fix ncurses? [duplicate]












0
















This question already has an answer here:




  • What is an undefined reference/unresolved external symbol error and how do I fix it?

    32 answers




I'm a mac user, and I'm using the XCode developer tools and using CLion as a compiler. When I try to use ncurses and its functions, specifically getch(), I get the following error.




Undefined symbols for architecture x86_64:

"_stdscr", referenced from:

_main in main.cpp.o

"_wgetch", referenced from:

_main in main.cpp.o

ld: symbol(s) not found for architecture x86_64




I've tried to go online and reinstall ncurses, but it hasn't fixed anything. I would greatly appreciate any help.










share|improve this question















marked as duplicate by n.m. c++
Users with the  c++ badge can single-handedly close c++ questions as duplicates and reopen them as needed.

StackExchange.ready(function() {
if (StackExchange.options.isMobile) return;

$('.dupe-hammer-message-hover:not(.hover-bound)').each(function() {
var $hover = $(this).addClass('hover-bound'),
$msg = $hover.siblings('.dupe-hammer-message');

$hover.hover(
function() {
$hover.showInfoMessage('', {
messageElement: $msg.clone().show(),
transient: false,
position: { my: 'bottom left', at: 'top center', offsetTop: -7 },
dismissable: false,
relativeToBody: true
});
},
function() {
StackExchange.helpers.removeMessages();
}
);
});
});
Nov 21 '18 at 7:18


This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.























    0
















    This question already has an answer here:




    • What is an undefined reference/unresolved external symbol error and how do I fix it?

      32 answers




    I'm a mac user, and I'm using the XCode developer tools and using CLion as a compiler. When I try to use ncurses and its functions, specifically getch(), I get the following error.




    Undefined symbols for architecture x86_64:

    "_stdscr", referenced from:

    _main in main.cpp.o

    "_wgetch", referenced from:

    _main in main.cpp.o

    ld: symbol(s) not found for architecture x86_64




    I've tried to go online and reinstall ncurses, but it hasn't fixed anything. I would greatly appreciate any help.










    share|improve this question















    marked as duplicate by n.m. c++
    Users with the  c++ badge can single-handedly close c++ questions as duplicates and reopen them as needed.

    StackExchange.ready(function() {
    if (StackExchange.options.isMobile) return;

    $('.dupe-hammer-message-hover:not(.hover-bound)').each(function() {
    var $hover = $(this).addClass('hover-bound'),
    $msg = $hover.siblings('.dupe-hammer-message');

    $hover.hover(
    function() {
    $hover.showInfoMessage('', {
    messageElement: $msg.clone().show(),
    transient: false,
    position: { my: 'bottom left', at: 'top center', offsetTop: -7 },
    dismissable: false,
    relativeToBody: true
    });
    },
    function() {
    StackExchange.helpers.removeMessages();
    }
    );
    });
    });
    Nov 21 '18 at 7:18


    This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.





















      0












      0








      0









      This question already has an answer here:




      • What is an undefined reference/unresolved external symbol error and how do I fix it?

        32 answers




      I'm a mac user, and I'm using the XCode developer tools and using CLion as a compiler. When I try to use ncurses and its functions, specifically getch(), I get the following error.




      Undefined symbols for architecture x86_64:

      "_stdscr", referenced from:

      _main in main.cpp.o

      "_wgetch", referenced from:

      _main in main.cpp.o

      ld: symbol(s) not found for architecture x86_64




      I've tried to go online and reinstall ncurses, but it hasn't fixed anything. I would greatly appreciate any help.










      share|improve this question

















      This question already has an answer here:




      • What is an undefined reference/unresolved external symbol error and how do I fix it?

        32 answers




      I'm a mac user, and I'm using the XCode developer tools and using CLion as a compiler. When I try to use ncurses and its functions, specifically getch(), I get the following error.




      Undefined symbols for architecture x86_64:

      "_stdscr", referenced from:

      _main in main.cpp.o

      "_wgetch", referenced from:

      _main in main.cpp.o

      ld: symbol(s) not found for architecture x86_64




      I've tried to go online and reinstall ncurses, but it hasn't fixed anything. I would greatly appreciate any help.





      This question already has an answer here:




      • What is an undefined reference/unresolved external symbol error and how do I fix it?

        32 answers








      c++






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Nov 21 '18 at 6:57









      lagom

      1




      1










      asked Nov 21 '18 at 5:07









      user205073user205073

      31




      31




      marked as duplicate by n.m. c++
      Users with the  c++ badge can single-handedly close c++ questions as duplicates and reopen them as needed.

      StackExchange.ready(function() {
      if (StackExchange.options.isMobile) return;

      $('.dupe-hammer-message-hover:not(.hover-bound)').each(function() {
      var $hover = $(this).addClass('hover-bound'),
      $msg = $hover.siblings('.dupe-hammer-message');

      $hover.hover(
      function() {
      $hover.showInfoMessage('', {
      messageElement: $msg.clone().show(),
      transient: false,
      position: { my: 'bottom left', at: 'top center', offsetTop: -7 },
      dismissable: false,
      relativeToBody: true
      });
      },
      function() {
      StackExchange.helpers.removeMessages();
      }
      );
      });
      });
      Nov 21 '18 at 7:18


      This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.









      marked as duplicate by n.m. c++
      Users with the  c++ badge can single-handedly close c++ questions as duplicates and reopen them as needed.

      StackExchange.ready(function() {
      if (StackExchange.options.isMobile) return;

      $('.dupe-hammer-message-hover:not(.hover-bound)').each(function() {
      var $hover = $(this).addClass('hover-bound'),
      $msg = $hover.siblings('.dupe-hammer-message');

      $hover.hover(
      function() {
      $hover.showInfoMessage('', {
      messageElement: $msg.clone().show(),
      transient: false,
      position: { my: 'bottom left', at: 'top center', offsetTop: -7 },
      dismissable: false,
      relativeToBody: true
      });
      },
      function() {
      StackExchange.helpers.removeMessages();
      }
      );
      });
      });
      Nov 21 '18 at 7:18


      This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.


























          1 Answer
          1






          active

          oldest

          votes


















          0














          First of all, CLion isn't a compiler. It's an IDEA (integrated development
          environment). As I remember using it last time it uses CMake as a build tool. And CMake uses GCC, Clang, MSVC, whatever under the hood.



          As you don't post any code sample I will try to guess the problem. Usually
          when using ncurses you need to link with it as: -lncurses. For more info you
          should look man ncurses on your platform. Also check that you don't forget to include the required header. E.g. on my system it's #include <curses.h>.



          How to link with ncurses via CMake






          share|improve this answer
































            1 Answer
            1






            active

            oldest

            votes








            1 Answer
            1






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes









            0














            First of all, CLion isn't a compiler. It's an IDEA (integrated development
            environment). As I remember using it last time it uses CMake as a build tool. And CMake uses GCC, Clang, MSVC, whatever under the hood.



            As you don't post any code sample I will try to guess the problem. Usually
            when using ncurses you need to link with it as: -lncurses. For more info you
            should look man ncurses on your platform. Also check that you don't forget to include the required header. E.g. on my system it's #include <curses.h>.



            How to link with ncurses via CMake






            share|improve this answer






























              0














              First of all, CLion isn't a compiler. It's an IDEA (integrated development
              environment). As I remember using it last time it uses CMake as a build tool. And CMake uses GCC, Clang, MSVC, whatever under the hood.



              As you don't post any code sample I will try to guess the problem. Usually
              when using ncurses you need to link with it as: -lncurses. For more info you
              should look man ncurses on your platform. Also check that you don't forget to include the required header. E.g. on my system it's #include <curses.h>.



              How to link with ncurses via CMake






              share|improve this answer




























                0












                0








                0







                First of all, CLion isn't a compiler. It's an IDEA (integrated development
                environment). As I remember using it last time it uses CMake as a build tool. And CMake uses GCC, Clang, MSVC, whatever under the hood.



                As you don't post any code sample I will try to guess the problem. Usually
                when using ncurses you need to link with it as: -lncurses. For more info you
                should look man ncurses on your platform. Also check that you don't forget to include the required header. E.g. on my system it's #include <curses.h>.



                How to link with ncurses via CMake






                share|improve this answer















                First of all, CLion isn't a compiler. It's an IDEA (integrated development
                environment). As I remember using it last time it uses CMake as a build tool. And CMake uses GCC, Clang, MSVC, whatever under the hood.



                As you don't post any code sample I will try to guess the problem. Usually
                when using ncurses you need to link with it as: -lncurses. For more info you
                should look man ncurses on your platform. Also check that you don't forget to include the required header. E.g. on my system it's #include <curses.h>.



                How to link with ncurses via CMake







                share|improve this answer














                share|improve this answer



                share|improve this answer








                edited Nov 21 '18 at 5:54

























                answered Nov 21 '18 at 5:48









                dshildshil

                276110




                276110















                    Popular posts from this blog

                    'app-layout' is not a known element: how to share Component with different Modules

                    android studio warns about leanback feature tag usage required on manifest while using Unity exported app?

                    WPF add header to Image with URL pettitions [duplicate]