On 05/25/2013 10:20 PM, estew wrote:
On Sunday, 26 May 2013 at 05:01:10 UTC, Ellery Newcomer wrote:
I have a project here which fails on link on ubuntu 12.10.

It give undefined reference errors for functions in libdl and libutil.
For some reason, ld won't cooperate unless you pass -ldl -lutil at the
end of the command string. Holy Ubuntu!

I can't seem to get dmd to do this though. Any suggestions?

I am using the beta, but apparently this is a thing with ubuntu.

I have the same on Fedora 18 using derelict and some other D libs which
I can't remember right now. My understanding is derelict requires libdl
for dynamic loading of libs at runtime.

My compiler flags are similar to this:

dmd -gc -w -Iderelict_import_dir -L-Lderelict_lib_dir -L-lDerelictGL3
-L-lDerelictGLFW3 -L-lDerelictUtil -L-lGL -L-lGLU -L-lglfw -L-ldl myapp.d

Could you post your compiler command line?

Cheers,
Stewart

huh. I haven't run into it on fedora. python is built differently, though.

dmd -L-lpthread -L-ldl -L-lutil -L-L/usr/lib -L-lz /usr/lib/python2.7/config/libpython2.7.a -debug -ofbuild/lib.linux-x86_64-2.7/link {lotsaobjectfiles} -L-ldl -L-lutil -v

Reply via email to