popc 
Author Message
 popc

Hi Poppers

I thought I would lean how to use popc but I have got stuck at the
first hurdle. I am trying to compile a file which uses getline but
popc does not seem able to find it.

Running the file from the pop11 command works

beowulf> pop11 ":load hello.p; hello();"
;;; LOADING hello.p
** [Hello World]
** <termin>
beowulf>

But if I try and compile it with popc then I get a compiler error.

beowulf> popc -e hello hello.p
    LIBRARY IDENTIFIER getline NOT FOUND

;;; MISHAP - POPC: FILE HAS COMPILATION ERRORS (see above)

beowulf>

If I replace the "uses" line with

weak global vars (getline);

I can compile it with the command

beowulf> popc -e hello $popautolib/getline.p hello.p
/packages/poplog15.0/pop/lib/auto/getline.p
hello.p
Linking ...
beowulf> ./a.out
** [Hello World]
** <termin>
beowulf>

But this mean I would have to modify every pop11 file
that uses "uses".

What am I doing wrong?

PS.

beowulf> pop11

Sussex Poplog (Version 15.0 Tue Feb 13 12:42:56 GMT 1996)
Copyright (c) 1982-1995 University of Sussex. All rights reserved.

Setpop
: pop_internal_version =>
** 150000

--
Anthony Worrall
The University of Reading,
Department of Computer Science,
Whiteknights, PO Box 225
Reading,
Berkshire, UK
RG6 6AY
Tel:   +44 (0)1734 318610
Fax:   +44 (0)1734 751994

[ hello.p < 1K ]
section ;

compile_mode :pop11 +strict;

uses getline;

define hello();
getline([Hello World]) =>
enddefine;

endsection;



Tue, 23 Mar 1999 03:00:00 GMT  
 popc

Hello Anthony

Quote:
>beowulf> popc -e hello hello.p
>    LIBRARY IDENTIFIER getline NOT FOUND

>;;; MISHAP - POPC: FILE HAS COMPILATION ERRORS (see above)

>beowulf>
>What am I doing wrong?

The standalone compiler handles libraries slightly differently from the
incremental compiler so you need to have already compiled the libraries
you want to use (which is why your second example works). You can build
all the standard Pop-11 libraries using a command script called
'buildobjlib' which sits in $popcom. Once you've run this (you'll need
write permission to the Poplog directories to do this), you should
be able to compile your program.

Julian
------------------------------------------------------------------------

Integral Solutions Limited,
Berk House, Basing View, Basingstoke, Hants RG21 4RG, UK
Tel. +44 (0)1256 55899, Fax. +44 (0)1256 63467
URL. http://www.isl.co.uk
------------------------------------------------------------------------



Fri, 26 Mar 1999 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. popc in version 15.53

2. Popc FAQ

3. popc

4. popc

5. query about popc and objectclass

6. query about popc and objectclass

7. POPC

 

 
Powered by phpBB® Forum Software