We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Original bug ID: 5593 Reporter: @alainfrisch Assigned to: @alainfrisch Status: closed (set by @xavierleroy on 2013-08-31T10:49:02Z) Resolution: fixed Priority: low Severity: tweak Category: ~DO NOT USE (was: OCaml general)
Consider a file a.ml with a reference to Unix.
The following command line fails as expected:
$ ocamlc -output-obj -o a.c a.cmo File "none", line 1, characters 0-1: Error: Error while linking a.cmo: Reference to undefined global `Unix'
But it leaves an incomplete file a.c. This is annoying because if one then fixes the command-line, the compiler refuses to overwrite this file:
$ ocamlc -output-obj -o a.c unix.cma a.cmo File "none", line 1, characters 0-1: Error: Cannot overwrite existing file a.c
I suggest to have "ocamlc -output-obj" removes its output in case of a linking error.
The text was updated successfully, but these errors were encountered:
Comment author: @alainfrisch
Fixed in trunk (commit 12356) and 4.00 (commit 12357).
Sorry, something went wrong.
ocaml#5593: Remove C file when -output-obj fails. (Cherry-picked from…
1f4a891
… trunk, commit 12356.) git-svn-id: http://caml.inria.fr/svn/ocaml/version/4.00@12357 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
alainfrisch
No branches or pull requests
Original bug ID: 5593
Reporter: @alainfrisch
Assigned to: @alainfrisch
Status: closed (set by @xavierleroy on 2013-08-31T10:49:02Z)
Resolution: fixed
Priority: low
Severity: tweak
Category: ~DO NOT USE (was: OCaml general)
Bug description
Consider a file a.ml with a reference to Unix.
The following command line fails as expected:
$ ocamlc -output-obj -o a.c a.cmo
File "none", line 1, characters 0-1:
Error: Error while linking a.cmo:
Reference to undefined global `Unix'
But it leaves an incomplete file a.c. This is annoying because if one then fixes the command-line, the compiler refuses to overwrite this file:
$ ocamlc -output-obj -o a.c unix.cma a.cmo
File "none", line 1, characters 0-1:
Error: Cannot overwrite existing file a.c
I suggest to have "ocamlc -output-obj" removes its output in case of a linking error.
The text was updated successfully, but these errors were encountered: