Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: What libraries to link when building DSFML2? (64-bit Linux)  (Read 6631 times)

0 Members and 1 Guest are viewing this topic.

RobotGymnast

  • Jr. Member
  • **
  • Posts: 56
    • View Profile
What libraries to link when building DSFML2? (64-bit Linux)
« on: March 09, 2011, 12:30:07 am »
I'm trying to get the DSFML2 libs compiled, but I'm getting some "undefined symbol" errors. What libraries do I need to link? When building CSFML for the purpose of linking to DSFML, should SFML be shared or static? What external libraries need to be added in?

Code: [Select]
all.o: In function `_D5dsfml6system9dllloader9DllLoader9getSymbolMFAyaZPv':
vector.d:(.text._D5dsfml6system9dllloader9DllLoader9getSymbolMFAyaZPv+0x28): undefined reference to `dlsym'
all.o: In function `_D5dsfml6system9dllloader9DllLoader5closeMFZv':
vector.d:(.text._D5dsfml6system9dllloader9DllLoader5closeMFZv+0x17): undefined reference to `dlclose'
all.o: In function `_D5dsfml6system9dllloader9DllLoader6__ctorMFAyaZC5dsfml6system9dllloader9DllLoader':
vector.d:(.text._D5dsfml6system9dllloader9DllLoader6__ctorMFAyaZC5dsfml6system9dllloader9DllLoader+0x24): undefined reference to `dlopen'
/usr/lib/gcc/x86_64-linux-gnu/4.4.5/../../../../lib32/libphobos2.a(dmain2_56d_1a5.o): In function `_D2rt6dmain24mainUiPPaZi7runMainMFZv':
src/rt/dmain2.d:(.text._D2rt6dmain24mainUiPPaZi7runMainMFZv+0x16): undefined reference to `_Dmain'
/usr/lib/gcc/x86_64-linux-gnu/4.4.5/../../../../lib32/libphobos2.a(deh2_53c_525.o): In function `_D2rt4deh213__eh_finddataFPvZPS2rt4deh213DHandlerTable':
src/rt/deh2.d:(.text._D2rt4deh213__eh_finddataFPvZPS2rt4deh213DHandlerTable+0x4): undefined reference to `_deh_beg'
src/rt/deh2.d:(.text._D2rt4deh213__eh_finddataFPvZPS2rt4deh213DHandlerTable+0xc): undefined reference to `_deh_beg'
src/rt/deh2.d:(.text._D2rt4deh213__eh_finddataFPvZPS2rt4deh213DHandlerTable+0x13): undefined reference to `_deh_end'
src/rt/deh2.d:(.text._D2rt4deh213__eh_finddataFPvZPS2rt4deh213DHandlerTable+0x37): undefined reference to `_deh_end'
/usr/lib/gcc/x86_64-linux-gnu/4.4.5/../../../../lib32/libphobos2.a(lifetime.o): In function `_D2rt8lifetime18_sharedStaticCtor9FZv':
src/rt/lifetime.d:(.text._D2rt8lifetime18_sharedStaticCtor9FZv+0xf): undefined reference to `_tlsend'
src/rt/lifetime.d:(.text._D2rt8lifetime18_sharedStaticCtor9FZv+0x1d): undefined reference to `_tlsstart'
/usr/lib/gcc/x86_64-linux-gnu/4.4.5/../../../../lib32/libphobos2.a(thread_f6_258.o): In function `_D4core6thread6Thread6__ctorMFPFZvkZC4core6thread6Thread':
src/core/thread.d:(.text._D4core6thread6Thread6__ctorMFPFZvkZC4core6thread6Thread+0x1d): undefined reference to `_tlsend'
src/core/thread.d:(.text._D4core6thread6Thread6__ctorMFPFZvkZC4core6thread6Thread+0x27): undefined reference to `_tlsstart'
/usr/lib/gcc/x86_64-linux-gnu/4.4.5/../../../../lib32/libphobos2.a(thread_f6_258.o): In function `_D4core6thread6Thread6__ctorMFDFZvkZC4core6thread6Thread':
src/core/thread.d:(.text._D4core6thread6Thread6__ctorMFDFZvkZC4core6thread6Thread+0x1d): undefined reference to `_tlsend'
src/core/thread.d:(.text._D4core6thread6Thread6__ctorMFDFZvkZC4core6thread6Thread+0x27): undefined reference to `_tlsstart'
/usr/lib/gcc/x86_64-linux-gnu/4.4.5/../../../../lib32/libphobos2.a(thread_f6_258.o): In function `_D4core6thread6Thread6__ctorMFZC4core6thread6Thread':
src/core/thread.d:(.text._D4core6thread6Thread6__ctorMFZC4core6thread6Thread+0x1d): undefined reference to `_tlsend'
src/core/thread.d:(.text._D4core6thread6Thread6__ctorMFZC4core6thread6Thread+0x24): undefined reference to `_tlsstart'
/usr/lib/gcc/x86_64-linux-gnu/4.4.5/../../../../lib32/libphobos2.a(thread_f9_6e4.o): In function `thread_attachThis':
src/core/thread.d:(.text.thread_attachThis+0x53): undefined reference to `_tlsstart'
src/core/thread.d:(.text.thread_attachThis+0x5c): undefined reference to `_tlsend'
/usr/lib/gcc/x86_64-linux-gnu/4.4.5/../../../../lib32/libphobos2.a(thread_f3_713.o): In function `thread_entryPoint':
src/core/thread.d:(.text.thread_entryPoint+0x29): undefined reference to `_tlsend'
src/core/thread.d:(.text.thread_entryPoint+0x2f): undefined reference to `_tlsstart'
collect2: ld returned 1 exit status
--- errorlevel 1

RobotGymnast

  • Jr. Member
  • **
  • Posts: 56
    • View Profile
What libraries to link when building DSFML2? (64-bit Linux)
« Reply #1 on: March 19, 2011, 04:04:00 am »
Solved: It was a combination of issues; I was compiling 32-bit binaries but linking with 64-bit libraries, and I wasn't building with -lib.

Cukta

  • Newbie
  • *
  • Posts: 2
    • View Profile
What libraries to link when building DSFML2? (64-bit Linux)
« Reply #2 on: September 20, 2011, 03:48:48 am »
I've the same problem, but in a 32-bits machine with arch-linux, my question is how did you figure how to fix it becouse all I can find is related with  GDC's errors compiling.

Also, what do you mean with:

Quote
I wasn't building with -lib.


Do you mean something like:

Code: [Select]
dsss build -lib

deadalnix

  • Newbie
  • *
  • Posts: 45
    • View Profile
What libraries to link when building DSFML2? (64-bit Linux)
« Reply #3 on: September 21, 2011, 10:55:57 am »
DSFML require both CSFML and SFML to link against.

The current version of DSFML is outdated and you will experience problem with current versions of SFML. You have to use SFML 1.3 and CSFML 1.3 .