Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 194285
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T16:34:55+00:00 2026-05-11T16:34:55+00:00

Given a simple program such as the following, how would you: compile it as

  • 0

Given a simple program such as the following, how would you:

  1. compile it as a seperate image file to be loaded by the implementation, and what command line arguments would you use to load it?

  2. Compile it as a standalone binary that can be loaded and run as is.

    Note: I tried adding “:prepend-kernel t” when saving the application only to have the follow error thrown.

    Error: value NIL is not of the
    expected type REAL. While executing: 
    CCL::<-2, in process Initial(0).
    
  3. How would you supress the welcome message?

    The Program

    (defun main ()
      (format t "This is the program.")0)
    

Edit

Hate to answer part of my own question, but I found it none the less.

After the function has been loaded type the following to compile it:

(ccl:save-application "app")

This creates an image file. To load it by passing it to the implementation type (note: the ‘ccl’ binary is in my system path);

ccl -I app

To run a top level function pass it as a parameter

ccl -I app --eval (main)
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-11T16:34:56+00:00Added an answer on May 11, 2026 at 4:34 pm

    See the Clozure Common Lisp documentation under Saving Applications

    Compiling and Loading Lisp files

    You can compile a file named /foo/bar.lisp by calling

     (compile-file "/foo/bar.lisp")
    

    This will create a fasl (FASt Load) file, which contains native code.

    You can load the compiled file, the fasl file, with the function LOAD. LOAD and COMPILE-FILE are standard Common Lisp functions.

    Creating applications

    A few definitions:

    • CCL kernel: the part of CCL which provides low-level runtimes services like memory management.
    • Image: a saved dump of the Lisp heap
    • Application: CCL kernel + image. This can be in one file.

    You can save an application by calling a CCL specific function:

    (save-application "/foo/bar-image" :toplevel-function #'main)
    

    This will save an image, that you can run using the CCL kernel from a command shell:

    ccl -I /foo/bar-image
    

    To save an executable that includes the kernel use this from Lisp:

    (save-application "/foo/bar-app"
                      :toplevel-function #'main
                      :prepend-kernel t)
    

    You can call this executable as usual with /foo/bar-app from a command shell.

    In Clozure Common Lisp you can check

    *command-line-argument-list*
    

    for the list of provided command line arguments.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Given a simple statement, such as: <statement id=SelectProducts resultMap=???> SELECT * FROM Products </statement>
Given a simple (id, description) table t1, such as id description -- ----------- 1
Given the following simple example: List<string> list = new List<string>() { One, Two, Three,
If I'm given a .doc file with special tags in it such as [first_name],
Given a simple switch statement switch (int) { case 1 : { printf(1\n); break;
This is a purely theoretical question. Given three simple classes: class Base { }
Given a relatively simple CSS: div { width: 150px; } <div> 12333-2333-233-23339392-332332323 </div> How
Given a couple of simple tables like so: create table R(foo text); create table
Is there any simple way to generate a default crud (given an entity) with
Does anyone know any simple way to retrieve the country from a given IP

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.