Building dynamic library: undefined references (Linux) #4775

nigredo-tori opened this Issue Sep 15, 2016 · 1 comment


None yet

2 participants

nigredo-tori commented Sep 15, 2016 edited

Here's the gist with a simple project: (run to reproduce the issue)
I build a Nim file as a dynamic library, and use it from the C file. However, the linker fails:

./ undefined reference to `cmdCount'
./ undefined reference to `cmdLine'
collect2: error: ld returned 1 exit status

This seems to be triggered by importing the logging module. Emitting code that defines the corresponding C variables allows to work around the issue.

vegansk commented Dec 22, 2016

The problem is in os module that exposes paramStr and paramCount functions when it shouldn't

@Araq Araq closed this in d35a8fa Jan 6, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment