免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 1614 | 回复: 3
打印 上一主题 下一主题

请问在free bsd上用curses.h要链接哪个库? [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2004-01-09 21:14 |只看该作者 |倒序浏览
今天装了个free bsd 5.0,把自己写的一个窗口界面程序从aix移植到它上面,却编译不通过,看帮助也看不到,请大家帮忙。

论坛徽章:
1
2015年辞旧岁徽章
日期:2015-03-03 16:54:15
2 [报告]
发表于 2004-01-09 21:19 |只看该作者

请问在free bsd上用curses.h要链接哪个库?

提示什么错误?
你是怎么看帮助的?

论坛徽章:
0
3 [报告]
发表于 2004-01-09 21:28 |只看该作者

请问在free bsd上用curses.h要链接哪个库?

提示错误信息:
[Quote]cfc.o(.gnu.linkonce.d._ZTV10Tcomponent+0x8): undefined reference to `__cxa_pure_virtual'
cfc.o(.gnu.linkonce.d._ZTV10Tcomponent+0xc): undefined reference to `__cxa_pure_virtual'
cfc.o(.gnu.linkonce.d._ZTV10Tcomponent+0x10): undefined reference to `__cxa_pure_virtual'
cfc.o(.gnu.linkonce.d._ZTI10Tcomponent+0x0): undefined reference to `vtable for__cxxabiv1::__class_type_info'
cfc.o(.gnu.linkonce.d._ZTI5Tedit+0x0): undefined reference to `vtable for __cxxa
cfc.o(.eh_frame+0x11): undefined reference to `__gxx_personality_v0'[/Quote]
帮助就是用man看的,有些函数比如pthread_create就能查到要加-lc_r(在aix上是-lpthread),但是curses的帮助却找不到连接库的信息。

论坛徽章:
0
4 [报告]
发表于 2004-01-09 21:32 |只看该作者

请问在free bsd上用curses.h要链接哪个库?

我怎么又不会用引用了?
把代码贴一下,同时试一下code功能[code]/*------------------------------------------------------------------------------
curses foundation class
------------------------------------------------------------------------------*/
#ifndef CFC_H
#define CFC_H

#include <curses.h>;
#include <string.h>;



#define MAXCOMPONENT 50
#define MAXFORM 5000
#define LINELEN 80

#define EVENT_NULL 0
#define EVENT_CLOSE 1



typedef void (* Tevent_handle)(void);

class Tform;
class Tcomponent;

class  Tapplication
{
        private:
       
       
       
        const Tevent_handle on_run;
        const Tevent_handle on_close;
       
       
        public:


        int event;
        int form_count;
        Tform * forms[MAXFORM];

       
        Tapplication(Tevent_handle, Tevent_handle);
        void run();
};


class Tform
{
        private:
       
        const int height;
        const int left;
        const int top;
        const int width;
        const int have_border;
       
       
       
       
        public:
       
        Tapplication * const owner;
        WINDOW * form_win;
        int event;
        int focus;
        int component_count;
        Tcomponent * components[MAXCOMPONENT];

       
        Tform(Tapplication *, int, int, int, int,int,Tevent_handle,Tevent_handle);
        void run();
        void init();
        void next();
        void last();

        const Tevent_handle on_run;
        const Tevent_handle on_close;

};


class Tcomponent
{
        private:
       
        int focus_order;/*是
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP