From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 1164f8,fb451bc31714e55,start X-Google-Attributes: gid1164f8,public From: awang@cs.bgsu.edu (Aiyuan Wang) Subject: C++ and XLIB Date: 1995/06/15 Message-ID: <3robk9$q3g@infoserver.bgsu.edu> X-Deja-AN: 104450972 organization: Bowling Green State University keywords: VMS newsgroups: comp.sys.dec Hello!!! I need your help. I have the following program. I have used cxx main/define=VMS to compile it, but it gives me many odd errors about standard X libraries. Anyone can help me, please give me an email. Thank you. window.h: #ifndef ZWINDOW_H #define ZWINDOW_H #pragma extern_prefix save #pragma extern_prefix "" extern "C" { #include #include #include #include #include #include #pragma extern_prefix restore } class ZWindow{ public: ZWindow(int, int, int, int, int, int, int, int); ~ZWindow(){ XDestroyWindow( pDisp, mainWin);}; void line(int, int, int, int); void lineto( int, int); void lineto( int, int); void moveto(int, int); void main_loop(){while(1) ;}; Display *get_disp(){ return(pDisp);}; Window get_win(){ return(mainWin); }; protected: XPoint p0, cp; Display *pDisp; Window mainWin; GC gc; XGCValues xgcv; XSizeHints xsh; unsigned long mask, fgPix, bgPix; XEvent the_event; }; #endif window.cxx: #pragma extern_prefix save #pragma extern_prefix "" #include #include #include #include #include #include #include #include "window.h" #pragma extern_prefix restore ZWindow::ZWindow(int x1, int y1, int x2, int y2, int x, int y, int width, int h` { p0.x = x1; p0.y = y1; cp.x = x2; cp.y = y2; xsh.x = x; xsh.y = y; xsh.width = width; xsh.height = height; cout<<"I am in the win constructor."< #include #include #include "window.h" #pragma extern_prefix restore // #include "line.h" main(){ ZWindow win(0, 0, 0, 0, 100, 100, 800, 800); ZWindow win1(0, 0, 0, 0, 0, 0, 80, 80); ZWindow win2(0, 0, 0, 0, 80,0, 80, 80); ZWindow win3(0, 0, 0, 0, 160, 0, 80, 80); ZWindow win4(0, 0, 0, 0, 240, 0, 80, 80); // line l1(10, 20, 100, 100); // l1.set_disp_win(win.get_disp(), win.get_win()); // l1.draw(); cout<<"jjj"<