Re: Help with compiling and linking 4gl code
Posted in 1996
In article <4ddsvg$s9g@newsbf02.news.aol.com> sotas@aol.com "SOTAS" writes: > We are having a problem compiling a 4gl program to a UNIX binary. We are > able to make a p-code runner and object code, however, when we link the > object code we get a linker error that says that we have an undefined > symbol in one of our object codes. I particular, we are doing a square > root function is our C code that uses the sqrt function in math.h. math.h > is included in our C code, we have tried hard coding the path as well as > copying math.h to $INFORMIXDIR/incl. We are using Solaris 2.4 and SPARC > Works 3.01 compiler. Any help would be greatly appreciated. You need to include the maths library at the link phase of either creating a bespoke runner (e.g. using 'cfglgo') or compilling your 4GL program - '-lm' should do the trick. For RDS runner make a private copy of 'cfglgo' and append '-lm' to the libaries listed in 'LIBES='. For a 4GL program (e.g. producing a '.4ge') you need to amend the makefile (or whatever) you are using to control the build to include '-lm' where is is using 'cc' to link the '.o' files into the '.4ge'. -- ============================================================================ Sally Woolrich | This mail contains my personal sally@excelsis.demon.co.uk | views not those of my employer! ============================================================================