Question

I am trying to call system function from CLIPS environment. I've used the example given in the Programming Tutorial however it doesn't seem to work on Ubuntu. I used the following code but I got the message:

System function not fully defined for this system.

My code:

(defrule start-program ""
    (not (started on))
    =>
    (assert (print-directory /home/username/Desktop))
    (assert (started on))
)

(defrule print-directory
    (print-directory ?directory)
    =>
    (system "ls " ?directory)
)

Any idea?

Thanks in advance.

Was it helpful?

Solution

If you're running version 6.24, try changing the flag in setup.h from GENERIC to either UNIX_V or UNIX_7 and recompile. If you're running version 6.3, try changing the flag in setup.h from GENERIC to LINUX and if that doesn't work try UNIX_V or UNIX_7.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top