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

Author Topic: rbSFML  (Read 159679 times)

0 Members and 4 Guests are viewing this topic.

Groogy

  • Hero Member
  • *****
  • Posts: 1469
    • MSN Messenger - groogy@groogy.se
    • View Profile
    • http://www.groogy.se
    • Email
rbSFML
« Reply #75 on: January 18, 2011, 05:54:08 pm »
How do you mean down? I'm at the website right now.
Developer and Maker of rbSFML and Programmer at Paradox Development Studio

TricksterGuy

  • Jr. Member
  • **
  • Posts: 66
    • View Profile
rbSFML
« Reply #76 on: January 22, 2011, 09:59:06 pm »
It was down at the time I made the post I couldn't access the server or something, but it is back up now

You did not mess anything up.

Also starting next week hopefully I will start working again.  I've been busy for the past couple of weeks.

Also to get this to compile/link successfully on windows I'd have to change the structure of the project a bit. I was not able to solve the linking issues and mingw doesn't have lazy link functionality (from what I've searched on the internet).

Groogy

  • Hero Member
  • *****
  • Posts: 1469
    • MSN Messenger - groogy@groogy.se
    • View Profile
    • http://www.groogy.se
    • Email
rbSFML
« Reply #77 on: January 22, 2011, 10:57:23 pm »
That's cool, the important thing is that it works ;)
Developer and Maker of rbSFML and Programmer at Paradox Development Studio

Groogy

  • Hero Member
  • *****
  • Posts: 1469
    • MSN Messenger - groogy@groogy.se
    • View Profile
    • http://www.groogy.se
    • Email
rbSFML
« Reply #78 on: January 26, 2011, 11:11:09 pm »
Just tried recompiling the rbSFML bindings on Linux... I keep getting "undefined symbol: glEnable" which is weird, that library should be included in the sfml-window-s library right?  I tried adding it manually but I got another undefined symbol from another library... So what am I doing wrong?

UPDATE: Made a quick fix in the Rakefile by adding all the external libraries to SFML.... This is a bad fix and should be dealt with. Though I do not understand why I have to manually link them, they are included in the static libraries.  :?
Developer and Maker of rbSFML and Programmer at Paradox Development Studio

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
rbSFML
« Reply #79 on: January 27, 2011, 07:44:11 am »
Nop. On Linux, external libraries are not included in SFML static libs. You shouldn't even use static libraries on Linux.
Laurent Gomila - SFML developer

Groogy

  • Hero Member
  • *****
  • Posts: 1469
    • MSN Messenger - groogy@groogy.se
    • View Profile
    • http://www.groogy.se
    • Email
rbSFML
« Reply #80 on: January 27, 2011, 07:57:36 am »
I know but you usually do on ruby extensions, I think... I know I read it somewhere. Think it was something like that you want the package / extension to be self-containing.

Don't know what is the better choice here actually.
Developer and Maker of rbSFML and Programmer at Paradox Development Studio

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
rbSFML
« Reply #81 on: January 27, 2011, 09:26:51 am »
Hum I think static linking is always the worst choice on Linux, shared libraries are just handled perfectly. To me, static linking is a hack which is necessary on Windows to workaround the lack of proper shared library management by the OS. Nothing more.

On Linux, your binding will be nicely packaged, its dependencies will be searched automatically and installed if necessary.
Laurent Gomila - SFML developer

Groogy

  • Hero Member
  • *****
  • Posts: 1469
    • MSN Messenger - groogy@groogy.se
    • View Profile
    • http://www.groogy.se
    • Email
rbSFML
« Reply #82 on: January 27, 2011, 10:27:01 am »
Quote from: "Laurent"
Hum I think static linking is always the worst choice on Linux, shared libraries are just handled perfectly. To me, static linking is a hack which is necessary on Windows to workaround the lack of proper shared library management by the OS. Nothing more.

On Linux, your binding will be nicely packaged, its dependencies will be searched automatically and installed if necessary.


Yeah your right. If I get any complaints it won't be hard modifying the rakefile to support both I think.

Update: Committed the new rakefile
Sorry trickster for messing up your stuff :P
Developer and Maker of rbSFML and Programmer at Paradox Development Studio

etam

  • Newbie
  • *
  • Posts: 5
    • View Profile
rbSFML
« Reply #83 on: February 05, 2011, 11:55:53 pm »
Something is broken, or I'm doing something wrong?

I just went to bindings/ruby directory, typed "rake" and that's what I got:
Code: [Select]
rake aborted!
/usr/src/packages/BUILD/sfml2-2.0/bindings/ruby/Rakefile:136: syntax error, unexpected ',', expecting ']'
file "#{SODIR}/#{so_file}.so" => [*objs, SODIR] do
                                       ^
/usr/src/packages/BUILD/sfml2-2.0/bindings/ruby/Rakefile:141: syntax error, unexpected kRESCUE, expecting kEND
/usr/src/packages/BUILD/sfml2-2.0/bindings/ruby/Rakefile:148: syntax error, unexpected kDO_BLOCK, expecting kEND
SO_SRCS.each_key do |so_file|
                  ^
/usr/src/packages/BUILD/sfml2-2.0/bindings/ruby/Rakefile:149: syntax error, unexpected tSTRING_BEG, expecting kDO or '{' or '('
sh "#{INSTALL} #{SODIR}/#{so_file}.so #{LOCATION}"
   ^
/usr/src/packages/BUILD/sfml2-2.0/bindings/ruby/Rakefile:151: syntax error, unexpected kRESCUE, expecting kEND
/usr/src/packages/BUILD/sfml2-2.0/bindings/ruby/Rakefile:158: syntax error, unexpected kDO_BLOCK, expecting kEND
SO_SRCS.each_key do |so_file|
                  ^
/usr/src/packages/BUILD/sfml2-2.0/bindings/ruby/Rakefile:159: syntax error, unexpected tSTRING_BEG, expecting kDO or '{' or '('
sh "rm -f #{LOCATION}/#{so_file}.so"
   ^
/usr/src/packages/BUILD/sfml2-2.0/bindings/ruby/Rakefile:162: syntax error, unexpected kRESCUE, expecting kEND
/usr/src/packages/BUILD/sfml2-2.0/bindings/ruby/Rakefile:167: syntax error, unexpected $end, expecting kEND


sources from https://sfml.svn.sourceforge.net/svnroot/sfml/branches/sfml2 rev 1789
ruby 1.8.7
rake 0.8.7

Groogy

  • Hero Member
  • *****
  • Posts: 1469
    • MSN Messenger - groogy@groogy.se
    • View Profile
    • http://www.groogy.se
    • Email
rbSFML
« Reply #84 on: February 06, 2011, 12:53:26 am »
I've used the latest official version of ruby(1.9.2p0) while developing this binding. I have no idea if it works on any older version. It worked compiling for me though, so that might be the issue.

Also the rake file is maintained by trickster, I have no idea of how rake works so we'll see if he responds to it.

EDIT: Just tried it and it worked like a charm :) I'm guessing on that you using the old 1.8.x ruby is the problem because we both have the same rake version.

The problem also seems to be syntax errors, which would pretty much confirm it, since there are some new syntax tricks to ruby-1.9.x
I could see if Trickster is willing to make the file compatible with 1.8.x but I'm not sure if it would still compile.

And a final note: You are allowed to create new threads on the forum for anything ruby-ish :)
Though I'm really glad to see that people are starting to use rbSFML ^^
Developer and Maker of rbSFML and Programmer at Paradox Development Studio

Mon ouïe

  • Newbie
  • *
  • Posts: 27
    • View Profile
rbSFML
« Reply #85 on: February 06, 2011, 08:47:32 am »
Using such splats is invalid in Ruby 1.8.7, hence the syntax errors.
It could easily be rewritten to work :
Code: [Select]
file "#{SODIR}/#{so_file}.so" => objs + [SODIR] do

(The latest version of 1.9.2 is ruby 1.9.2p136)

TricksterGuy

  • Jr. Member
  • **
  • Posts: 66
    • View Profile
rbSFML
« Reply #86 on: February 06, 2011, 10:02:35 am »
Yep that would fix that

sorry about that, etam!

Also I have made progress getting this to compile/link under windows I am able to at least open the window-demo program.

There are a few changes that will have to be made to the directory structure for this to all work however.  Consider this payback for messing with the rakefile I guess :P

Groogy

  • Hero Member
  • *****
  • Posts: 1469
    • MSN Messenger - groogy@groogy.se
    • View Profile
    • http://www.groogy.se
    • Email
rbSFML
« Reply #87 on: February 06, 2011, 11:08:48 am »
Hahaha it's cool ^^
It's great if it works for Windows, or else it wouldn't really be cross-OS now would it ;)

Will you implement the directory changes or will I do that?
Developer and Maker of rbSFML and Programmer at Paradox Development Studio

Groogy

  • Hero Member
  • *****
  • Posts: 1469
    • MSN Messenger - groogy@groogy.se
    • View Profile
    • http://www.groogy.se
    • Email
rbSFML
« Reply #88 on: February 08, 2011, 06:06:27 pm »
Trickster, just wondering when you think you will be ready with the structure for Windows?
Developer and Maker of rbSFML and Programmer at Paradox Development Studio

TricksterGuy

  • Jr. Member
  • **
  • Posts: 66
    • View Profile
rbSFML
« Reply #89 on: February 11, 2011, 01:53:51 pm »
So I have already changed the structure in my working version.

Basically I just created a shared folder with the things from the system folder that was used in the other folders. And edited all of the other files main.cpp as necessary.

As of now I am working to fix a bug in the window-demo that causes ruby to crash when you exit.  If you want to help find it I could commit what I have right now.

I'm shooting for sometime next week but I have exams keeping me busy unfortunately