www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.learn - Buliding DSFML2? (64-bit Linux)

reply Sean Eskapp <eatingstaples gmail.com> writes:
I've been trying for weeks to build the D bindings of SFML2, but with little
success. The main issue is that I get a myriad of linker errors (documented at
http://www.sfml-dev.org/forum/viewtopic.php?p=28345#28345), but I can't figure
out what linking options would solve them.

Can anybody shed some light on this?
Mar 18 2011
next sibling parent reply Jonathan M Davis <jmdavisProg gmx.com> writes:
On Friday, March 18, 2011 17:56:44 Sean Eskapp wrote:
 I've been trying for weeks to build the D bindings of SFML2, but with
 little success. The main issue is that I get a myriad of linker errors
 (documented at http://www.sfml-dev.org/forum/viewtopic.php?p=28345#28345),
 but I can't figure out what linking options would solve them.
 
 Can anybody shed some light on this?

Just glancing at it, it looks like you might be missing pthreads, though that would be pretty weird. You don't normally need to specify -lpthread. But those symbols sure look like they're likely pthread-related. - Jonathan M Davis
Mar 18 2011
parent reply Sean Eskapp <eatingstaples gmail.com> writes:
== Quote from Jonathan M Davis (jmdavisProg gmx.com)'s article
 On Friday, March 18, 2011 17:56:44 Sean Eskapp wrote:
 I've been trying for weeks to build the D bindings of SFML2, but


 little success. The main issue is that I get a myriad of linker


 (documented at http://www.sfml-dev.org/forum/viewtopic.php?


 but I can't figure out what linking options would solve them.

 Can anybody shed some light on this?


 would be pretty weird. You don't normally need to specify -

 symbols sure look like they're likely pthread-related.
 - Jonathan M Davis

I've tried -lpthread and -lm, and neither seemed to help. Is it possible there are platform issues, since D (to my knowledge) is 32- bit, and I'm 64-bit?
Mar 18 2011
parent Sean Eskapp <eatingstaples gmail.com> writes:
== Quote from Jonathan M Davis (jmdavisProg gmx.com)'s article
 On Friday, March 18, 2011 18:58:49 Sean Eskapp wrote:
 == Quote from Jonathan M Davis (jmdavisProg gmx.com)'s article

 On Friday, March 18, 2011 17:56:44 Sean Eskapp wrote:
 I've been trying for weeks to build the D bindings of SFML2,




 with

 little success. The main issue is that I get a myriad of




 errors

 (documented at http://www.sfml-dev.org/forum/viewtopic.php?


p=28345#28345),
 but I can't figure out what linking options would solve




 Can anybody shed some light on this?

Just glancing at it, it looks like you might be missing



 though that

 would be pretty weird. You don't normally need to specify -

lpthread. But those
 symbols sure look like they're likely pthread-related.
 - Jonathan M Davis

I've tried -lpthread and -lm, and neither seemed to help. Is it possible there are platform issues, since D (to my knowledge) is


 bit, and I'm 64-bit?


 Linux, but if you don't pass it -m64 (or if you explicitly pass it

 will compile in 32-bit. And if it's compiling in 32-bit, then you

 bit versions of whatever libraries that you're using. pthread is

 So, if you don't have a 32-bit version of pthread installed, then

 explain it.
 - Jonathan M Davis

Perfect, thanks!
Mar 18 2011
prev sibling parent Jonathan M Davis <jmdavisProg gmx.com> writes:
On Friday, March 18, 2011 18:58:49 Sean Eskapp wrote:
 == Quote from Jonathan M Davis (jmdavisProg gmx.com)'s article
 
 On Friday, March 18, 2011 17:56:44 Sean Eskapp wrote:
 I've been trying for weeks to build the D bindings of SFML2, but


with
 little success. The main issue is that I get a myriad of linker


errors
 (documented at http://www.sfml-dev.org/forum/viewtopic.php?


p=28345#28345),
 but I can't figure out what linking options would solve them.
 
 Can anybody shed some light on this?

Just glancing at it, it looks like you might be missing pthreads,

though that
 would be pretty weird. You don't normally need to specify -

lpthread. But those
 symbols sure look like they're likely pthread-related.
 - Jonathan M Davis

I've tried -lpthread and -lm, and neither seemed to help. Is it possible there are platform issues, since D (to my knowledge) is 32- bit, and I'm 64-bit?

Well, as of dmd 2.052, if you pass -m64 to dmd, it'll compile in 64-bit on Linux, but if you don't pass it -m64 (or if you explicitly pass it -m32), it will compile in 32-bit. And if it's compiling in 32-bit, then you need the 32- bit versions of whatever libraries that you're using. pthread is one of them. So, if you don't have a 32-bit version of pthread installed, then that would explain it. - Jonathan M Davis
Mar 18 2011