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

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - RobotGymnast

Pages: [1] 2 3 4
1
D / Can't build with DSFML2
« on: April 16, 2011, 09:09:17 pm »
Bump..

2
D / Can't build with DSFML2
« on: March 22, 2011, 09:55:43 pm »
I'm running on 64-bit Ubuntu Linux with dmd v2.052, and I'm having trouble getting any project with DSFML2 working (revision 1814).

I built the SFML and CSFML libraries using shared libs + release builds, and installed them, then built the DSFML bindings like this:

Code: [Select]

me@lappy486:~/devl/sfml2/bindings/d/import/dsfml/system$ dmd -m64 -lib *.d -of../../../lib/libdsfml-system.a
me@lappy486:~/devl/sfml2/bindings/d/import/dsfml/system$ cd ../window
me@lappy486:~/devl/sfml2/bindings/d/import/dsfml/window$ dmd -m64 -lib *.d -of../../../lib/libdsfml-window.a
me@lappy486:~/devl/sfml2/bindings/d/import/dsfml/window$ cd ../graphics
me@lappy486:~/devl/sfml2/bindings/d/import/dsfml/graphics$ dmd -m64 -lib *.d -of../../../lib/libdsfml-graphics.a
me@lappy486:~/devl/sfml2/bindings/d/import/dsfml/graphics$ cd ../audio
me@lappy486:~/devl/sfml2/bindings/d/import/dsfml/audio$ dmd -m64 -lib *.d -of../../../lib/libdsfml-audio.a


When trying to build a project to use them, I get the following errors:

Code: [Select]

me@lappy486:~/devl/d/Gossamer$ dmd -m64 *.d game/*.d graphics/*.d -L"-L/home/me/devl/sfml2/bindings/d/lib -ldsfml-system -ldsfml-window -ldsfml-graphics -ldsfml-audio"
collision.o:(.data+0xab0): undefined reference to `_D5dsfml8graphics5color12__ModuleInfoZ'
collision.o:(.data+0xb18): undefined reference to `_D5dsfml6system9exception16LoadingException7__ClassZ'
collision.o:(.data+0xbe0): undefined reference to `_D5dsfml8graphics3all12__ModuleInfoZ'
collision.o:(.data+0xd38): undefined reference to `_D5dsfml8graphics3all12__ModuleInfoZ'
collision.o:(.data+0xd40): undefined reference to `_D5dsfml6window3all12__ModuleInfoZ'
collision.o:(.data+0xdd8): undefined reference to `_D5dsfml6system9exception16LoadingException7__ClassZ'
collision.o:(.data+0xf40): undefined reference to `_D5dsfml8graphics3all12__ModuleInfoZ'
collision.o: In function `_D8graphics5image5Image6__ctorMFAyaZC8graphics5image5Image':
graphics/text.d:(.text._D8graphics5image5Image6__ctorMFAyaZC8graphics5image5Image+0x17): undefined reference to `_D5dsfml8graphics6sprite6Sprite7__ClassZ'
graphics/text.d:(.text._D8graphics5image5Image6__ctorMFAyaZC8graphics5image5Image+0x2a): undefined reference to `_D5dsfml8graphics5image5Image7__ClassZ'
graphics/text.d:(.text._D8graphics5image5Image6__ctorMFAyaZC8graphics5image5Image+0x67): undefined reference to `_D5dsfml8graphics5image5Image6__ctorMFAyaZC5dsfml8graphics5image5Image'
graphics/text.d:(.text._D8graphics5image5Image6__ctorMFAyaZC8graphics5image5Image+0xa3): undefined reference to `_D5dsfml8graphics5color4RGBA5WHITEyS5dsfml8graphics5color4RGBA'
graphics/text.d:(.text._D8graphics5image5Image6__ctorMFAyaZC8graphics5image5Image+0xac): undefined reference to `_D5dsfml8graphics6sprite6Sprite6__ctorMFC5dsfml8graphics5image5ImagefffffS5dsfml8graphics5color4RGBAZC5dsfml8graphics6sprite6Sprite'
collision.o: In function `_D8graphics6screen6Screen5clearMFZv':
graphics/text.d:(.text._D8graphics6screen6Screen5clearMFZv+0xa): undefined reference to `_D5dsfml8graphics5color4RGBA5BLACKyS5dsfml8graphics5color4RGBA'
collision.o: In function `_D8graphics6screen6Screen6__ctorMFAyakkZC8graphics6screen6Screen':
graphics/text.d:(.text._D8graphics6screen6Screen6__ctorMFAyakkZC8graphics6screen6Screen+0x24): undefined reference to `_D5dsfml8graphics12renderwindow12RenderWindow7__ClassZ'
graphics/text.d:(.text._D8graphics6screen6Screen6__ctorMFAyakkZC8graphics6screen6Screen+0x73): undefined reference to `_D5dsfml8graphics12renderwindow12RenderWindow6__ctorMFS5dsfml6window9videomode9VideoModeAyaE5dsfml6window6window5StyleS5dsfml6window6window15ContextSettingsZC5dsfml8graphics12renderwindow12RenderWindow'
collision.o: In function `_D8graphics4text4Font6__ctorMFAyaZC8graphics4text4Font':
graphics/text.d:(.text._D8graphics4text4Font6__ctorMFAyaZC8graphics4text4Font+0x17): undefined reference to `_D5dsfml8graphics4font4Font7__ClassZ'
graphics/text.d:(.text._D8graphics4text4Font6__ctorMFAyaZC8graphics4text4Font+0x54): undefined reference to `_D5dsfml8graphics4font4Font6__ctorMFAyaZC5dsfml8graphics4font4Font'
collision.o: In function `_D8graphics4text4Text6__ctorMFC8graphics4text4FontAyakS5dsfml8graphics5color4RGBAZC8graphics4text4Text':
graphics/text.d:(.text._D8graphics4text4Text6__ctorMFC8graphics4text4FontAyakS5dsfml8graphics5color4RGBAZC8graphics4text4Text+0x19): undefined reference to `_D5dsfml8graphics4text4Text7__ClassZ'
graphics/text.d:(.text._D8graphics4text4Text6__ctorMFC8graphics4text4FontAyakS5dsfml8graphics5color4RGBAZC8graphics4text4Text+0x3b): undefined reference to `_D5dsfml8graphics4text4Text6__ctorMFAyaC5dsfml8graphics4font4FontkZC5dsfml8graphics4text4Text'
collect2: ld returned 1 exit status
--- errorlevel 1


Can somebody help with this? I haven't been able to get it to work.

3
D / DSFML2: soundstream.d error
« on: March 19, 2011, 04:11:01 am »
Running Linux 64-bit, with dmd v2.052. When compiling dsfml-audio, I get

Code: [Select]
soundstream.d(268): Error: cannot implicitly convert expression (temp.m_dummy.Samples.length) of type ulong to uint

Can be solved with an explicit cast.

4
D / What libraries to link when building DSFML2? (64-bit Linux)
« 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.

5
Graphics / Trouble linking SFML2
« on: March 11, 2011, 12:51:04 pm »
I tried it with shared libraries, and got linker errors as a result. For some reason, it's working now, though. Thanks.

6
Graphics / Trouble linking SFML2
« on: March 11, 2011, 12:16:41 am »
Some more linker errors required linking with jpeg, GLEW, and Xrandr.

7
Graphics / Trouble linking SFML2
« on: March 10, 2011, 11:59:20 pm »
Thanks - maybe that should be more explicit in the tutorial?

8
Graphics / Trouble linking SFML2
« on: March 10, 2011, 10:39:04 pm »
I'm compiling a simple program on Linux to open a window, but I'm getting linker errors in Render.cpp

Code: [Select]

Linking console executable: bin/Debug/RenderingTests
//usr/local/lib/libsfml-graphics-s.a(Renderer.cpp.o): In function `sf::Renderer::Initialize()':
Renderer.cpp:(.text+0xda): undefined reference to `glDisable'
Renderer.cpp:(.text+0xe4): undefined reference to `glDisable'
Renderer.cpp:(.text+0xee): undefined reference to `glEnable'
Renderer.cpp:(.text+0xf8): undefined reference to `glEnable'
Renderer.cpp:(.text+0x105): undefined reference to `glAlphaFunc'
Renderer.cpp:(.text+0x10f): undefined reference to `glMatrixMode'
Renderer.cpp:(.text+0x114): undefined reference to `glLoadIdentity'
Renderer.cpp:(.text+0x11e): undefined reference to `glMatrixMode'
Renderer.cpp:(.text+0x123): undefined reference to `glLoadIdentity'
//usr/local/lib/libsfml-graphics-s.a(Renderer.cpp.o): In function `sf::Renderer::SaveGLStates()':
Renderer.cpp:(.text+0x15a): undefined reference to `glPushAttrib'
Renderer.cpp:(.text+0x164): undefined reference to `glMatrixMode'
Renderer.cpp:(.text+0x169): undefined reference to `glPushMatrix'
Renderer.cpp:(.text+0x173): undefined reference to `glMatrixMode'
//usr/local/lib/libsfml-graphics-s.a(Renderer.cpp.o): In function `sf::Renderer::RestoreGLStates()':
Renderer.cpp:(.text+0x185): undefined reference to `glPopAttrib'
Renderer.cpp:(.text+0x18f): undefined reference to `glMatrixMode'
Renderer.cpp:(.text+0x194): undefined reference to `glPopMatrix'
Renderer.cpp:(.text+0x19e): undefined reference to `glMatrixMode'
//usr/local/lib/libsfml-graphics-s.a(Renderer.cpp.o): In function `sf::Renderer::Clear(sf::Color const&)':
Renderer.cpp:(.text+0x1ec): undefined reference to `glClearColor'
//usr/local/lib/libsfml-graphics-s.a(Renderer.cpp.o): In function `sf::Renderer::SetProjection(sf::Matrix3 const&)':
Renderer.cpp:(.text+0x4aa): undefined reference to `glMatrixMode'
//usr/local/lib/libsfml-graphics-s.a(Renderer.cpp.o): In function `sf::Renderer::SetViewport(sf::Rect<int> const&)':
Renderer.cpp:(.text+0x5c2): undefined reference to `glViewport'
//usr/local/lib/libsfml-graphics-s.a(Renderer.cpp.o): In function `sf::Renderer::SetBlendMode(sf::Blend::Mode)':
Renderer.cpp:(.text+0x64a): undefined reference to `glEnable'
Renderer.cpp:(.text+0x65e): undefined reference to `__GLEW_EXT_blend_func_separate'
Renderer.cpp:(.text+0x67f): undefined reference to `__glewBlendFuncSeparateEXT'
Renderer.cpp:(.text+0x693): undefined reference to `glBlendFunc'
Renderer.cpp:(.text+0x6d6): undefined reference to `glDisable'
Renderer.cpp:(.text+0x6e8): undefined reference to `glBlendFunc'
Renderer.cpp:(.text+0x6fb): undefined reference to `glBlendFunc'
//usr/local/lib/libsfml-graphics-s.a(Renderer.cpp.o): In function `sf::Renderer::SetTexture(sf::Image const*)':
Renderer.cpp:(.text+0x7a8): undefined reference to `glBindTexture'
//usr/local/lib/libsfml-graphics-s.a(Renderer.cpp.o): In function `sf::Renderer::SetShader(sf::Shader const*)':
Renderer.cpp:(.text+0x844): undefined reference to `__glewUseProgramObjectARB'
//usr/local/lib/libsfml-graphics-s.a(Renderer.cpp.o): In function `sf::Renderer::AddVertex(float, float)':
Renderer.cpp:(.text+0x91c): undefined reference to `glColor4f'
Renderer.cpp:(.text+0x927): undefined reference to `glTexCoord2f'
//usr/local/lib/libsfml-graphics-s.a(Renderer.cpp.o): In function `sf::Renderer::AddVertex(float, float, float, float)':
Renderer.cpp:(.text+0x9b8): undefined reference to `glColor4f'
Renderer.cpp:(.text+0x9c9): undefined reference to `glTexCoord2f'
//usr/local/lib/libsfml-graphics-s.a(Renderer.cpp.o): In function `sf::Renderer::AddVertex(float, float, sf::Color const&)':
Renderer.cpp:(.text+0xa83): undefined reference to `glColor4f'
Renderer.cpp:(.text+0xa8e): undefined reference to `glTexCoord2f'
//usr/local/lib/libsfml-graphics-s.a(Renderer.cpp.o): In function `sf::Renderer::AddVertex(float, float, float, float, sf::Color const&)':
Renderer.cpp:(.text+0xb4f): undefined reference to `glColor4f'
Renderer.cpp:(.text+0xb60): undefined reference to `glTexCoord2f'
//usr/local/lib/libsfml-graphics-s.a(Renderer.cpp.o): In function `sf::Renderer::ProcessVertex(float, float, float, float, float, float, float, float)':
Renderer.cpp:(.text+0xc02): undefined reference to `glColor4f'
Renderer.cpp:(.text+0xc13): undefined reference to `glTexCoord2f'
//usr/local/lib/libsfml-graphics-s.a(Renderer.cpp.o): In function `sf::Renderer::SaveGLStates()':
Renderer.cpp:(.text+0x17c): undefined reference to `glPushMatrix'
//usr/local/lib/libsfml-graphics-s.a(Renderer.cpp.o): In function `sf::Renderer::RestoreGLStates()':
Renderer.cpp:(.text+0x1a7): undefined reference to `glPopMatrix'
//usr/local/lib/libsfml-graphics-s.a(Renderer.cpp.o): In function `sf::Renderer::Clear(sf::Color const&)':
Renderer.cpp:(.text+0x1fa): undefined reference to `glClear'
//usr/local/lib/libsfml-graphics-s.a(Renderer.cpp.o): In function `sf::Renderer::SetProjection(sf::Matrix3 const&)':
Renderer.cpp:(.text+0x4b3): undefined reference to `glLoadMatrixf'
//usr/local/lib/libsfml-graphics-s.a(Renderer.cpp.o): In function `sf::Renderer::Begin(sf::Renderer::PrimitiveType)':
Renderer.cpp:(.text+0x86e): undefined reference to `glBegin'
Renderer.cpp:(.text+0x87e): undefined reference to `glBegin'
Renderer.cpp:(.text+0x88e): undefined reference to `glBegin'
Renderer.cpp:(.text+0x8a6): undefined reference to `glBegin'
//usr/local/lib/libsfml-graphics-s.a(Renderer.cpp.o): In function `sf::Renderer::End()':
Renderer.cpp:(.text+0x8b1): undefined reference to `glEnd'
//usr/local/lib/libsfml-graphics-s.a(Renderer.cpp.o): In function `sf::Renderer::AddVertex(float, float)':
Renderer.cpp:(.text+0x941): undefined reference to `glVertex2f'
//usr/local/lib/libsfml-graphics-s.a(Renderer.cpp.o): In function `sf::Renderer::AddVertex(float, float, float, float)':
Renderer.cpp:(.text+0x9e3): undefined reference to `glVertex2f'


Could somebody shed some light on this?

9
D / 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

10
C / "Could not read symbols: Bad value" when building
« on: March 08, 2011, 01:14:40 pm »
Edit: This is a GCC bug; compiling the code with GCC 4.5 solves the problem, but only with SFML built as shared libraries.

When linking CSFML in Ubuntu, I'm getting this error:

Code: [Select]

..
/usr/bin/ld: /usr/local/lib/libsfml-system-s.a(Clock.cpp.o): relocation R_X86_64_32 against `__gxx_personality_v0' can not be used when making a shared object; recompile with -fPIC
/usr/local/lib/libsfml-system-s.a: could not read symbols: Bad value
...


This happens whether SFML is compiled as a shared object or not. The libraries certainly exist, but they appear to not work properly.

11
C / SFML_DIR not found (SFML2)
« on: March 08, 2011, 12:57:39 pm »
Oh geez, apparently it's been way too long since I was on linux.

Oh, yes, I see it now, right at the bottom. I missed it before. Sorry, and thanks!

12
C / SFML_DIR not found (SFML2)
« on: March 08, 2011, 02:41:20 am »
How does one "install" SFML? I'm running on Ubuntu, and the project generated only seems to build the libraries.

13
C / SFML_DIR not found (SFML2)
« on: March 07, 2011, 01:03:45 pm »
Code: [Select]
CMake Error at src/SFML/CMakeLists.txt:22 (find_package):
  Could not find module FindSFML.cmake or a configuration file for package
  SFML.

  Adjust CMAKE_MODULE_PATH to find FindSFML.cmake or set SFML_DIR to the
  directory containing a CMake configuration file for SFML.  The file will
  have one of the following names:

    SFMLConfig.cmake
    sfml-config.cmake



CMake Warning (dev) at cmake/Macros.cmake:87 (target_link_libraries):
  Link library type specifier "optimized" is followed by specifier "debug"
  instead of a library name.  The first specifier will be ignored.
Call Stack (most recent call first):
  src/SFML/System/CMakeLists.txt:24 (csfml_add_library)
This warning is for project developers.  Use -Wno-dev to suppress it.

CMake Error at cmake/Macros.cmake:87 (target_link_libraries):
  The "debug" argument must be followed by a library.
Call Stack (most recent call first):
  src/SFML/System/CMakeLists.txt:24 (csfml_add_library)


Do I have to set path variables (sfml_inlcude and sfml_lib)? Is there no way to just set the variables inside CMake?

14
C / SFML_DIR not found (SFML2)
« on: March 07, 2011, 02:07:43 am »
I've built the main SFML project as static libraries (but didn't move them to any special directories), then tried configuring the CSFML project in CMake. It tells me SFML_DIR isn't found; I tried manually setting it to the build output directory of the SFML project, as well as the lib subfolder, but clicking Configure again simply caused it to give the same error message and overwrite my changes.

Can somebody help?

15
General / Repository down?
« on: March 06, 2011, 08:06:06 pm »
Oops, thanks.

Pages: [1] 2 3 4