LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 01-01-2005, 02:28 PM   #1
darkarcon2015
Member
 
Registered: Jun 2004
Location: Potsdam, NY
Distribution: Fedora Core 6
Posts: 201

Rep: Reputation: 30
ncurses and conio help...


I have some code and I read that conio.h doesn't exist in Linux but ncurses.h is a Linux replacement for it. Well, my program uses conio.h and compiles in Windows but in Linux when I replace the include I get a lot of errors that resemble this:

Code:
/tmp/ccfERCrG.o(.text+0x19): In function `main':
: undefined reference to `std::basic_string<char, std::char_traits<char>, std::allocator<c
har> >::basic_string[in-charge]()'
Any help on fixing this problem is appreciated.
 
Old 01-01-2005, 10:57 PM   #2
irfanhab
Member
 
Registered: Jan 2004
Location: Pakistan
Distribution: OpenSuse 10.2, Slackware 11, Solaris 10
Posts: 415

Rep: Reputation: 34
Well yes ncurses is a equivalent to conio on windows but
you dont use it the same way.

For a short intro how to use conio have a look at this howto
http://www.tldp.org/HOWTO/NCURSES-Programming-HOWTO/
 
Old 01-02-2005, 09:00 AM   #3
deiussum
Member
 
Registered: Aug 2003
Location: Santa Clara, CA
Distribution: Slackware
Posts: 895

Rep: Reputation: 32
It appears that maybe you are using gcc to compile C++ code. Use g++ instead.
 
Old 01-02-2005, 03:20 PM   #4
darkarcon2015
Member
 
Registered: Jun 2004
Location: Potsdam, NY
Distribution: Fedora Core 6
Posts: 201

Original Poster
Rep: Reputation: 30
Haha, silly me. I was using gcc, not g++. That fixed my problem, thanks a lot.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Equivalents of the getch() from conio.h in curses and ncurses aneeshm Programming 1 09-11-2004 07:19 AM
ConIO.h Mohsen Linux - General 4 09-04-2004 03:46 PM
conio.h ??? Umanga Programming 3 09-02-2004 05:06 PM
conio.h matt_w_lambert Programming 9 07-19-2003 12:04 AM
ncurses-5.2-28 conflicts with file from package ncurses-5.2-12 tubby Linux - Software 4 06-16-2002 12:00 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 11:03 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration