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

Extra linker options for MSVC/Windows #3319

Closed
vicuna opened this issue Apr 28, 2002 · 1 comment
Closed

Extra linker options for MSVC/Windows #3319

vicuna opened this issue Apr 28, 2002 · 1 comment

Comments

@vicuna
Copy link

vicuna commented Apr 28, 2002

Original bug ID: 1130
Reporter: administrator
Status: closed
Resolution: fixed
Priority: normal
Severity: feature
Category: ~DO NOT USE (was: OCaml general)

Bug description

Full_Name: Dmitry Bely
Version: 3.04
OS: Windows 2000
Submission from: d218.p9.col.ru (212.248.7.218)

I need to pass extra MSVC linking options to ocamlc -custom/ocamlopt (e.g. to
debug CamlIDL-generated C stubs and linked C libraries with MS Visual Studio).
Unfortunately the standard -ccopt way cannot help: MSVC requires the linking
options to be the very last in the command line. In my case:

cl /link /debug

So if I use, say

ocamlc -custom ... -ccopt /link -ccopt /debug

it will call cl as

  • cl ... /link /debug

That is the syntax error for cl.

What I would propose to resolve this issue:

  1. For MSVC-build Ocaml place all -ccopt contents to the very end of the command
    line (it's also OK for MSVC compiler options)
    (or)
  2. Add new -linkopt (-ldopt?) option to ocamlc/ocamlopt which will append
    -linkopt contents to the end of the command line with "/link" prefix. For
    non-MSVC ocamlc/ocamlopt make it equivalent to -ccopt.
@vicuna
Copy link
Author

vicuna commented Jun 20, 2002

Comment author: administrator

Implemented as suggested (option 1) by XL, 2002-06-20.

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