Re: undefined reference to 'NewDouble'
- Posted by jimcbrown (admin) Apr 21, 2013
- 1815 views
I did find this, but since we aren't using -l here I'm not sure if it's relevant.
http://www.mingw.org/wiki/Specify_the_libraries_for_the_linker_to_use said...
Finally, please do not fall into the all-too-common trap of placing any "-l <name>" specification before the name of any source or object module which requires it. Where the source file bar.c has dependencies on the library archive libfoo.a, the command:
$ gcc -lfoo bar.c
is incorrect, and will surely lead to "undefined reference" errors. The correct form for this command is:
$ gcc bar.c -lfoo