Groups | Search | Server Info | Login | Register


Groups > comp.lang.icon > #64

Re: Linking External File

From Jason Martin <jasonm@claudville.va>
Newsgroups comp.lang.icon
Subject Re: Linking External File
Date 2025-02-12 14:22 +0000
Organization A noiseless patient Spider
Message-ID <slrnvqpbkc.287.jasonm@claudville.va> (permalink)
References <voeh0t$1k64m$1@dont-email.me> <slrnvqmhsi.5bm.jasonm@claudville.va> <vogr0u$20v3q$1@dont-email.me>

Show all headers | View raw


On 2025-02-12, Sidney Reilley <sidney.reilley.ii@gmail.com> wrote:
> On 2025-02-11, Jason Martin <jasonm@claudville.va> wrote:
>> On 2025-02-11, Sidney Reilley <sidney.reilley.ii@gmail.com> wrote:
>>>
>>> I've got a script that uses `link' to include a file containing a few
>>> procedures.  This library that I'm trying to link lives in the same
>>> directory as the script file.  I compiled the library using `icont -c
>>><filename.icn>' which created filename.u1 and filename.u2.
>>> However, the code does not seem to be linked in as the script outputs
>>> wrong data.  What am I doing wrong?  TIA ..
>>>
>>> -- Duke
>>
>> Page 184 of the Icon book 3rd edition
>> [It will be Page 206 in your PDF viewer]
>> CREATING NEW LIBRARY MODULES
>> Keep reading about IPATH after that.
>> They may need to be in IPATH.
>
> I've got IPATH pointing to where all the scripts live.
> Any other ideas?

# mylib.icn
# Note: Libraries cannot have procedure main()
procedure one()
write("ONE")
end
procedure two()
write("TWO")
end

icont -c mylib.icn

# main.icn
link mylib
procedure main()
write("Main")
write(one())
write(two())
end

icon main.icn
# Works for me on GhostBSD without IPATH
Main
ONE
TWO

Back to comp.lang.icon | Previous | NextPrevious in thread | Next in thread | Find similar


Thread

Linking External File Sidney Reilley <sidney.reilley.ii@gmail.com> - 2025-02-11 03:43 +0000
  Re: Linking External File Jason Martin <jasonm@claudville.va> - 2025-02-11 12:50 +0000
    Re: Linking External File Sidney Reilley <sidney.reilley.ii@gmail.com> - 2025-02-12 00:46 +0000
      Re: Linking External File Jason Martin <jasonm@claudville.va> - 2025-02-12 14:22 +0000
        Re: Linking External File Jason Martin <jasonm@claudville.va> - 2025-02-12 14:44 +0000
          Re: Linking External File Sidney Reilley <sidney.reilley.ii@gmail.com> - 2025-02-13 22:47 +0000
          Re: Linking External File Sidney Reilley <sidney.reilley.ii@gmail.com> - 2025-02-13 23:04 +0000

csiph-web