You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using {.link: "path/to/lib/lib.so.} to link pragma, it can cause undefined reference issues because it is not placed at the end of the compilation line (typically if --as-needed is specifiedin the system gcc).
I believe that either the manual should be changed to specify that {.link.} should not be used for libraries and no examples using it should be provided or {.link.} should be modified to place link argument at the end of the compile line.
The text was updated successfully, but these errors were encountered:
When using
{.link: "path/to/lib/lib.so.}
to link pragma, it can cause undefined reference issues because it is not placed at the end of the compilation line (typically if--as-needed
is specifiedin the system gcc).It is used in the manual chapter importcpp (https://nim-lang.org/docs/manual.html#implementation-specific-pragmas-importcpp-pragma), and I believe it is a bad example to give as it may work or not depending on environment (It was typically breaking during CI but not locally for me).
I believe that either the manual should be changed to specify that
{.link.}
should not be used for libraries and no examples using it should be provided or{.link.}
should be modified to place link argument at the end of the compile line.The text was updated successfully, but these errors were encountered: