Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

C object files not included in cmxa #8248

Closed
vicuna opened this issue Aug 25, 2003 · 1 comment
Closed

C object files not included in cmxa #8248

vicuna opened this issue Aug 25, 2003 · 1 comment

Comments

@vicuna
Copy link

vicuna commented Aug 25, 2003

Original bug ID: 1796
Reporter: administrator
Status: closed
Resolution: won't fix
Priority: normal
Severity: feature
Category: ~DO NOT USE (was: OCaml general)

Bug description

Full_Name: Achim Blumensath
Version: 3.07beta1
OS: Linux
Submission from: diabolo.informatik.rwth-aachen.de (137.226.53.122)

When creating a native-code library including C object files only a reference
to
these files is included in the cmxa file. This has the disadvantage that, when
changing the working directory these object files will not be found:

cd subdir
ocamlopt -a -o foo.cmxa foo.cmx bar.o
cd ..
ocamlopt -o main subdir/foo.cmxa main.cmx

yields an error that bar.o can't be found. As workaround one can use an
absolute
path:

ocamlopt -a -o foo.cmxa foo.cmx $(pwd)/bar.o

But it would be better if bar.o was added to foo.a instead of just storing
a reference in foo.cmxa.

@vicuna
Copy link
Author

vicuna commented Aug 26, 2003

Comment author: administrator

ocamlopt must do that by compatibility with ocamlc. Recommended practice is to
put the C objects in a C library and use the -llib notation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant