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 8560279
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T16:14:26+00:00 2026-06-11T16:14:26+00:00

I am having trouble adding adding a library to ocamlmktop. I have a directory

  • 0

I am having trouble adding adding a library to ocamlmktop.

I have a directory com, with an object file com/com.cma.

If I run ocamlmktop com.cma -o top within the com directory, then the resulting executable top seems to have the library; i.e, I can enter “Com.foo;;” and it will give the type signature of foo in the module Com.

However, if I run ocamlmktop com/com.cma -o top within the directory above com, then the resulting executable does not seem to have the library; i.e, it responds to “Com.foo;;” with “Error: Unbound module Com”.

Is there a way to include libraries from different folders, or do I need to put all the .cma files in the same folder?

Also, I’m using the OASIS build system; can I inform OASIS that I want a toplevel with these libraries?

Edit:

I’ve found a partial solution: ocamlc -pack a/a.cmo b/b.cmo -o everything.cmo, and then ocamlmktop everything.cmo -o top; however, this requires duplicating all the libraries and forces them to be submodules of a single supermodule.

  • 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-06-11T16:14:28+00:00Added an answer on June 11, 2026 at 4:14 pm

    The reason that you cannot use toplevel from the directory above is that toplevels do not include interface files (.cmi) and the toplevel needs to find them on disk when the user accesses some module. So, either load toplevel with -I com switch or after loading issue #directory "com";;.

    NB OASIS should support building toplevels natively in the next release (0.4.0).

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

Sidebar

Related Questions

I'm having trouble adding a static library from another Xcode project ( CloudApp API
I am having a lot of trouble adding the WEKA library to a project
I am having trouble adding ajax functionality to existing asp.net 4 website. I have
I'm having trouble adding Facebook Connect to my iPhone Project. Here's the directory structure:
having a bit of trouble adding some data to a database. I have the
I'm having trouble adding a slashed slug and nested routes. If I have these
I am having trouble adding property changes to a directory on a changelist using
I've having trouble adding a rtf file to license agreement installation window, does anyone
I'm having trouble adding an image in xCode 4.2. When I'm inserting an UIimageview
I'm having trouble adding my ZTE warp to my desktop machine for android development.

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.