How to fix ncurses? [duplicate]
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.
c++
marked as duplicate by n.m.
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.
add a comment |
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.
c++
marked as duplicate by n.m.
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.
add a comment |
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.
c++
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++
c++
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.
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.
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.
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
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
add a comment |
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
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
add a comment |
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
add a comment |
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
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
edited Nov 21 '18 at 5:54
answered Nov 21 '18 at 5:48
dshildshil
276110
276110
add a comment |
add a comment |