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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T17:06:59+00:00 2026-06-02T17:06:59+00:00

I followed the instructions here for setting installing a library in site-lib using ocamlfind

  • 0

I followed the instructions here for setting installing a library in site-lib using ocamlfind install. I had two libraries: one called logic and another called boolean. In each case I installed the .cmo, .cmx, .cmi and .mli files in the library, for example:

ocamlfind install boolean META boolean.cmo boolean.cmx boolean.cmi boolean.mli

Then when I went to build another project that depends on logic and boolean using ocamlbuild, I got the following error message:

$ocamlbuild -use-ocamlfind test_logic.native -classic-display
...
/home/phil/godi-3.12.1.0/bin/ocamlfind ocamlopt -c -package boolean -package deriving-    ocsigen -package deriving-ocsigen.syntax -package logic -package oUnit -package unix -syntax   camlp4o -o test_logic.cmx test_logic.ml
/home/phil/godi-3.12.1.0/bin/ocamlfind ocamlopt -linkpkg -linkpkg -package boolean -package deriving-ocsigen -package deriving-ocsigen.syntax -package logic -package oUnit -package unix -syntax camlp4o vhdl.cmx fsm.cmx test_logic.cmx -o test_logic.native
+ /home/phil/godi-3.12.1.0/bin/ocamlfind ocamlopt -linkpkg -linkpkg -package boolean -package deriving-ocsigen -package deriving-ocsigen.syntax -package logic -package oUnit -package unix -syntax camlp4o vhdl.cmx fsm.cmx test_logic.cmx -o test_logic.native
gcc: /home/phil/godi-3.12.1.0/lib/ocaml/site-lib/logic/logic.o: No such file or directory
gcc: /home/phil/godi-3.12.1.0/lib/ocaml/site-lib/boolean/boolean.o: No such file or directory
File "caml_startup", line 1, characters 0-1:
Error: Error during linking
Command exited with code 2.

I then copied the .o files from the logic and boolean projects over to their respective areas in site-lib and it compiled and linked fine.

I’m wondering why the .o files were needed and why gcc is involved here?

Here’s my _tags file in case it helps:

<*.ml> or "test_logic.native" or "test_loginc.byte": package(boolean),package(unix),     package(oUnit), package(deriving-ocsigen), package(deriving-ocsigen.syntax), syntax(camlp4o), package(logic)
  • 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-02T17:07:00+00:00Added an answer on June 2, 2026 at 5:07 pm

    See Section 11.1 of the OCaml Manual:

    From the file x.ml, the ocamlopt compiler produces two files: x.o, containing native object code, and x.cmx, containing extra information for linking and optimization of the clients of the unit. The compiled implementation should always be referred to under the name x.cmx (when given a .o or .obj file, ocamlopt assumes that it contains code compiled from C, not from Caml).

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

Sidebar

Related Questions

This is the first time I install a library. I followed the instructions here
(Using iOS 5 and Xcode 4.2.) I've followed the instructions here: http://developer.apple.com/library/ios/#documentation/UserExperience/Conceptual/LocationAwarenessPG/AnnotatingMaps/AnnotatingMaps.html#//apple_ref/doc/uid/TP40009497-CH6-SW15 and used
Is this possible? I've followed the instructions from here ( http://www.jetbrains.net/confluence/display/TCD4/Setting+up+an+External+Database#SettingupanExternalDatabase-MicrosoftSQLServer2005 ) but I
I followed the instructions here on how to create an Android library project, and
I'm using compiled OpenSSL for an iPhone app. I followed the instructions here http://www.x2on.de/kontakt/
I followed the instructions here to delete a binary file from my repo using
I've followed the instructions here http://msdn.microsoft.com/en-us/library/ms464040.aspx to the letter, when I run disco.exe I
I have followed the instructions here [MDC - Adding Extensions using the Windows Registry],
I have followed all the instructions here: http://www.tonyspencer.com/2003/10/22/curl-with-php-and-apache-on-windows/ to install & config apache get
I followed the instructions here to run Django using the built-in webserver and was

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.