Code::Blocks Forums

User forums => Help => Topic started by: jeffg on October 24, 2007, 10:15:58 pm

Title: Error from ld linking dll
Post by: jeffg 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?
Title: Re: Error from ld linking dll
Post by: TDragon on October 25, 2007, 04:19:59 am
Add the directory which contains liblua.a.
Title: Re: Error from ld linking dll
Post by: jeffg 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.
Title: Re: Error from ld linking dll
Post by: stahta01 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
Title: Re: Error from ld linking dll
Post by: jeffg on October 25, 2007, 02:29:48 pm
Thanks. That fixed it.