Mixing 4GL with Curses Screen Handling
Posted in 1997
Topics: Stored Procedures & SPL, Connectivity: ESQL/C, 4GL & Embedded SQL
I'm working on making some modifications to an existing GUI written entirely in 'C' with curses screen handling. My mods include adding several new 4GL forms and modules to the existing application. Rather than rewriting existing portions of the GUI, I plan to combine 4GL screen handling with the curses handling. Now my problem... When I am building the new app, I seem to come across a problem with the linker and duplicate references to some curses library functions. I wrote a small test program that highlights the problem: /** test1.c **/ #include <cursesX.h> #include <fglapi.h> main () { WINDOW *wTest; wTest = newwin(24, 132, 0, 0 ); fgl_start( dummy ); fgl_call( do_fgltest, 0 ); fgl_exitfm(); fgl_end(); } { test2.4gl } database tester function do_fgltest() open form fTest from "test_form" display form fTest end function #Makfile test_prog: test1.o test2.o $(FGL_FORMS) c4gl test1.c test2.4gl -lcursesX -o test_prog Building from the Makefile above yields the following errors in Ultrix 4.4: /usr/informix/lib/libnforms.a(curses.o):_endwin:multiply defined /usr/informix/lib/libnforms.a(tputs.o):tputs:multiply defined /usr/informix/lib/libnforms.a(attrset.o):wattrset:multiply defined Now, if I modify the Makefile above and omit the cursesX library, the test program will compile without errors. However, if I add some additional cursesX calls such as 'mvwprintw', 'beep' etc. to the test program, these will will not be found during the link. Has anyone else experienced this or similar problems. Jim Welch mbsoft@ix.netcom.com MobileSoft Consulting, Inc. --the opinions expressed here are mine and my employers...in fact, we are one in the same--