Path: news.daimi.aau.dk!jlk From: jlk@daimi.aau.dk (J|rgen Lindskov Knudsen) Newsgroups: comp.lang.beta Subject: Re: problems with fragment system / compiler Date: 31 May 1995 07:27:14 GMT Organization: DAIMI, Computer Science Dept. at Aarhus University Lines: 67 Message-ID: <3qh5oi$m4g@belfort.daimi.aau.dk> References: <3qh4ul$lss@belfort.daimi.aau.dk> Reply-To: jlknudsen@daimi.aau.dk (Jorgen Lindskov Knudsen) NNTP-Posting-Host: lithium.daimi.aau.dk In <3qh4ul$lss@belfort.daimi.aau.dk> Thus spake Thomas Rosanski : >e.g.: Take the example from MIA 90-02(1.3) August 1994, page 15 and 16: >(shortened) >"Introduce the following SLOTs: (filename 'stack.bet') > ORIGIN '~beta/basiclib/current/betaenv'; > BODY 'stackImp' > --- Lib: attributes --- > stack: > (# element:, Object; > private: @<>; > push: (# (* some code with another slot *) #); > (* more attributes *) > #) >Create a new fragment file 'stackImp.bet': > ORIGIN 'stack'; > --- private: descriptor --- > (# A: ,[100] ^element; > top: @intger; > #) > (* some more fragment descriptions *) " >I am useing the Mjolner Beta System 5.0(2) for Linux(Intel 386/486) and >I can not compile the library fragment 'stack.bet'. After typeing >'beta stack' I get the following message: >Mjolner BETA System version 5.0(2) for Linux(Intel 386/486) >Target machine type linux >Building dependency graph for: 'stack' ... >Parsing: 'stack' >Parsing: 'stackImp' >Translating fragments ... >Open: '~beta/basiclib/current/betaenv' >Basic BETA environment: '~beta/basiclib/current/betaenv' >Bind fragments in: 'stack'!Checking!Code generation. >assembling /home/linux/beta/linux/stackImp..s >assembling /home/linux/beta/linux/stack..s >Linking >/usr/local/beta-3.0/basiclib/current/linux/betaenv.o: Undefined symbol >> >>> T1PROGRAM referenced from text segment >As far as I understood, the fragment system should include the facility >to compile fragments seperatly. So what did I do wrong? Absolutely nothing :-) As stated in the BETA FAQ, question C11, point 3, you are trying to link an incomplete program, which naturally will cause link problems. Just compile the fragents with the -nolink option, and everything will be fine. Actually, everything went fine in your compilation, you just wasted time on an unsuccessfull linking. I can inform you (and the rest of you BETA fans), that the next version of the BETA compiler will realize, that it compiles an incomplete program, and therefore avoids invoking the linker. Regards, -- Jorgen Lindskov Knudsen, Computer Science Department, Aarhus University Ny Munkegade 116, DK-8000 Aarhus C, DENMARK E-mail: jlknudsen@daimi.aau.dk, Phone: +45 89 42 32 33, Fax: +45 89 42 32 55