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

ocamlc -o doesn't work for C files #3904

Closed
vicuna opened this issue Dec 2, 2005 · 3 comments
Closed

ocamlc -o doesn't work for C files #3904

vicuna opened this issue Dec 2, 2005 · 3 comments

Comments

@vicuna
Copy link

vicuna commented Dec 2, 2005

Original bug ID: 3904
Reporter: anonymous
Status: closed (set by @mshinwell on 2016-12-08T14:03:05Z)
Resolution: duplicate
Priority: low
Severity: feature
Version: 3.09.0
Category: ~DO NOT USE (was: OCaml general)
Duplicate of: #2915
Related to: #3757 #6191

Bug description

Using ocaml -o with c files doesn't work: build files are produced in the directory of invocation.
The following steps show the difference between compiling .ml and .c files with -o

touch test.ml
touch stub.c
mkdir build
ocamlc -o build/test.cmo -c test.ml
ocamlc -o build/stub.o -c stub.c
ls build
test.cmi test.cmo
ls
build/ stub.c stub.o test.ml

Additional information

MacOS 10.4.3
daniel.buenzli@epfl.ch

File attachments

@vicuna
Copy link
Author

vicuna commented Dec 7, 2005

Comment author: anonymous

It would also be nice if a destination directory could be specified for ocamlmklib.

@vicuna
Copy link
Author

vicuna commented Dec 11, 2005

Comment author: @xavierleroy

There is no universal convention to tell the C compiler where to store
its .o files (cc -c -o bar/foo.o foo.c is gcc-specific). Keep as feature
wish but behaviour unlikely to change any time soon.

@vicuna
Copy link
Author

vicuna commented Dec 8, 2016

Comment author: @mshinwell

Discussion moved to #2915

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