-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
compiler flag --clib prefixes unnecessary path component to library name #16937
Comments
I met the same question on my project, and I finally build a modified compiler which seems to be worked properly. Simply, I changed this line to: |
capocasa
pushed a commit
to capocasa/Nim
that referenced
this issue
Mar 31, 2023
…iler correctly (nim-lang#19754) * Fix 16937: Make --clib option works * Make tests/compiler/tcmdlineclib.nim works from any current dir * Try to fix link error on macosx * Add a comment to tests/compiler/tcmdlineclib.nims Co-authored-by: Clay Sweetser <[email protected]>
narimiran
pushed a commit
that referenced
this issue
Apr 24, 2023
…rectly (#19754) * Fix 16937: Make --clib option works * Make tests/compiler/tcmdlineclib.nim works from any current dir * Try to fix link error on macosx * Add a comment to tests/compiler/tcmdlineclib.nims Co-authored-by: Clay Sweetser <[email protected]> (cherry picked from commit 2a34d14)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Currently the compiler flag
--clib:...
prefixes the project src path to the specified C library name.Example
I have created an example project here: https://github.com/samdmarshall/nim-compiler-clib-bug
The relevant files are the
nim.cfg
:generates the following command:
Current Output
at the end of this command the flags are ordered as such:
Expected Output
Possible Solution
currently, using
--passL: "-lnotmuch"
flag instead of the preferred--clib:"notmuch"
flag allows for the correct flags to be passed to the linker.Additional Information
Nim Compiler:
The text was updated successfully, but these errors were encountered: