App release build crashes

Steve Teale steve.teale at britseyeview.com
Thu Feb 6 23:43:04 PST 2014


I was attempting to to build my app COMPO using a Makefile this 
morning, and at first this worked to some extent, but after some 
fiddling with compiler flags to make a release version that then 
had problems, I reverted to my original makefile as of yesterday. 
That builds and links the app, but when I run it I get

Fatal Error while loading 
'/usr/lib/i386-linux-gnu/libphobos2.so.0.64':
	The module 'std.regex' is already defined in './compo'.

My Makefile has:

LFLAGS = -L-L/usr/lib/i386-linux-gnu -L-L/usr/local/lib 
-L-L/home/steve/COMPO -L-lusps4cb -L-lgtkd-2 -L-lrsvg -L-lphobos2 
-L-ldl -L-lpthread -L-lm -L-lrt

compo: $(OBJFILES)
	gcc -o compo $(OBJFILES) $(LFLAGS)

If I use static phobos2 -L-l:libphobos2.a, it runs OK. Building 
via CodeBlocks using phobos2 shared library works OK judging by 
the smaller executable size.

What is wrong with my linker flags?


More information about the Digitalmars-d-learn mailing list