cplusplus
.com
TUTORIALS
REFERENCE
ARTICLES
FORUM
C++
Tutorials
Reference
Articles
Forum
Forum
Beginners
Windows Programming
UNIX/Linux Programming
General C++ Programming
Lounge
Jobs
Forum
Beginners
How do i link ncurses to c++, in gcc
How do i link ncurses to c++, in gcc
Mar 22, 2016 at 5:13pm UTC
aarongillbraun
(2)
How do i link ncurses to c++, in gcc? I am on a mac and I cant find out how to link it. I used -lncurses and -l:/Path/to/ncurses. I always get this error.
ld: library not found for -lcrt0.o
How can i fix this, please help.
Mar 22, 2016 at 7:22pm UTC
DirtyDan
(42)
Not sure if these will help you or not. (I also use a Mac)
http://www.cplusplus.com/forum/general/148651/
https://macosx.com/threads/c-and-ncurses.10734/
Mar 22, 2016 at 7:52pm UTC
aarongillbraun
(2)
thanks so much. I got it working. I even wrote a simple python script to speed up the process the forum thread suggested:
run.py
-------
#!/usr/bin/env python
import os, sys
os.system("gcc main.cpp -c")
os.system("clang++ main.o -lncurses -o program.bin")
os.system("chmod a+x program.bin")
os.system("/path/to/program.bin")
Topic archived. No new replies allowed.