Author Topic: Error from ld linking dll  (Read 4344 times)

Offline jeffg

  • Single posting newcomer
  • *
  • Posts: 7
Error from ld linking dll
« on: October 24, 2007, 10:15:58 pm »
I have set up a clean environment using a nightly build of Code::Blocks. When trying to build a LUA plugin (plugin_lua.dll) I get a single error

ld: cannot find -llua

Please can you explain what this is telling me, so I can try to fix it?

Edit: a search showed up a similar problem which was solved by adding search directories for the linker. However I am not sure what I should set the path to. What should I see in the directory I am pointing to? List of .o files? .a files?
« Last Edit: October 24, 2007, 10:46:33 pm by jeffg »

Offline TDragon

  • Lives here!
  • ****
  • Posts: 943
    • TDM-GCC
Re: Error from ld linking dll
« Reply #1 on: October 25, 2007, 04:19:59 am »
Add the directory which contains liblua.a.
https://jmeubank.github.io/tdm-gcc/ - TDM-GCC compiler suite for Windows (GCC 9.2.0 2020-03-08, 32/64-bit, no extra DLLs)

Offline jeffg

  • Single posting newcomer
  • *
  • Posts: 7
Re: Error from ld linking dll
« Reply #2 on: October 25, 2007, 01:13:13 pm »
Many thanks. This is very odd though. I am using the same make setup from the SVN, but in my new environment it has created lua.a and lualib.a, whereas in the old environment it created liblua.a and liblualib.a

So my new environment is missing the lib prefix - is there something I have missed in my new cb settings?

Renaming the files manually cured the problem, anyway. Thanks again.

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7591
    • My Best Post
Re: Error from ld linking dll
« Reply #3 on: October 25, 2007, 01:35:18 pm »
Many thanks. This is very odd though. I am using the same make setup from the SVN, but in my new environment it has created lua.a and lualib.a, whereas in the old environment it created liblua.a and liblualib.a

So my new environment is missing the lib prefix - is there something I have missed in my new cb settings?

Renaming the files manually cured the problem, anyway. Thanks again.

Check "Project" -> "properties"
"Build Target" Tab
Select Target
Verify the "Output File Name"
Try checking "Auto Generate filename prefix"
Do rebuild

Tim S
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 64 bit.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline jeffg

  • Single posting newcomer
  • *
  • Posts: 7
Re: Error from ld linking dll
« Reply #4 on: October 25, 2007, 02:29:48 pm »
Thanks. That fixed it.