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

Author Topic: rbSFML  (Read 159775 times)

0 Members and 2 Guests are viewing this topic.

vivo

  • Jr. Member
  • **
  • Posts: 50
    • View Profile
    • Email
Re: rbSFML
« Reply #195 on: April 22, 2012, 01:06:01 pm »
great!
I've updated rbSFML with git pull and loadFromFile works :)

How do i get the fix branch?

Groogy

  • Hero Member
  • *****
  • Posts: 1469
    • MSN Messenger - groogy@groogy.se
    • View Profile
    • http://www.groogy.se
    • Email
Re: rbSFML
« Reply #196 on: April 22, 2012, 01:19:00 pm »
You do this:
Code: [Select]
git checkout -b linux_fix
git pull <remote_name> linux_fix
And just replace <remote_name> with whatever you named it.
Developer and Maker of rbSFML and Programmer at Paradox Development Studio

vivo

  • Jr. Member
  • **
  • Posts: 50
    • View Profile
    • Email
Re: rbSFML
« Reply #197 on: April 22, 2012, 08:10:38 pm »
Now i've already got the fix branch version,
I still got the same errors
 -when closing a window:
SFML::Texture(800x600, 0x9ebc810)
XIO:  fatal IO error 11 (Resource temporarily unavailable) on X server ""
      after 1812 requests (1811 known processed) with 0 events remaining.
AL lib: ALc.c:1420: alcDestroyContext(): deleting 1 Source(s)
AL lib: ALc.c:1818: alcCloseDevice(): deleting 3 Buffer(s)
ruby: /build/buildd/openal-soft-1.12.854/OpenAL32/Include/alMain.h:107: DeleteCriticalSection: Assertion `ret == 0' failed.
Abortado

 -When loading an non-existing file

Will I be updated in this branch or shall I switch to the main one

Groogy

  • Hero Member
  • *****
  • Posts: 1469
    • MSN Messenger - groogy@groogy.se
    • View Profile
    • http://www.groogy.se
    • Email
Re: rbSFML
« Reply #198 on: April 22, 2012, 09:29:19 pm »
Switch to the main one. Don't think I'll be able to fix it. As I have no idea where this comes from.
Developer and Maker of rbSFML and Programmer at Paradox Development Studio

Ceylo

  • Hero Member
  • *****
  • Posts: 2325
    • View Profile
    • http://sfemovie.yalir.org/
    • Email
Re: rbSFML
« Reply #199 on: April 23, 2012, 02:40:17 pm »
Hello,

I'm totally new to Ruby but I wanted to test the game at http://en.sfml-dev.org/forums/index.php?topic=7673.msg50939;topicseen#new on Mac OS X.

So I downloaded rbSFML, tested what was already installed. Both Ruby and Rake were already there. Then I typed "sudo gem install yard" and downloaded rbSFML.

I didn't install the latest version of Ruby as there is already one installed, plus I couldn't build Ruby from the latest sources because of an unknown linking flag (and I couldn't find where it's defined).

So with my current version of Ruby, here is what I get :
Code: [Select]
[ ceylo ceylo-pc ~/Desktop/rbSFML ] ruby --version
ruby 1.8.7 (2010-01-10 patchlevel 249) [universal-darwin11.0]
[ ceylo ceylo-pc ~/Desktop/rbSFML ] rake --version
rake, version 0.8.7
[ ceylo ceylo-pc ~/Desktop/rbSFML ] rake
(in /Users/ceylo/Desktop/rbSFML)
rake aborted!
/Users/ceylo/Desktop/rbSFML/Rakefile:260: syntax error, unexpected ':', expecting ')'
    ruby("#{sample}", verbose: true) { }
                              ^

(See full trace by running task with --trace)

Do you know why I get this error message?
I admit I'm a bit lazy to search among the 14 pages of this topic, and a search didn't give anything.
Thanks,

Ceylo
Want to play movies in your SFML application? Check out sfeMovie!

vivo

  • Jr. Member
  • **
  • Posts: 50
    • View Profile
    • Email
Re: rbSFML
« Reply #200 on: April 23, 2012, 03:53:30 pm »
Hi, you need the last version of ruby

Groogy

  • Hero Member
  • *****
  • Posts: 1469
    • MSN Messenger - groogy@groogy.se
    • View Profile
    • http://www.groogy.se
    • Email
Re: rbSFML
« Reply #201 on: April 23, 2012, 03:57:18 pm »
You have version 1.8.x while I have based the bindings on 1.9.x which have changes to the actual syntax.
So you will need to upgrade to a newer version of Linux ^^
Developer and Maker of rbSFML and Programmer at Paradox Development Studio

Ceylo

  • Hero Member
  • *****
  • Posts: 2325
    • View Profile
    • http://sfemovie.yalir.org/
    • Email
Re: rbSFML
« Reply #202 on: April 23, 2012, 06:14:01 pm »
Hmm ok, so I suppose I'll have to install Fink in order to get up-to-date binaries.

Thanks!


Edit: actually Fink just provides Ruby 1.8.7 too ...
Edit 2: but MacPort provides Ruby 1.9 :D
« Last Edit: April 23, 2012, 06:27:00 pm by Ceylo »
Want to play movies in your SFML application? Check out sfeMovie!

Ceylo

  • Hero Member
  • *****
  • Posts: 2325
    • View Profile
    • http://sfemovie.yalir.org/
    • Email
Re: rbSFML
« Reply #203 on: April 23, 2012, 07:45:48 pm »
I finally got Ruby 1.9 installed thanks to MacPort.
Now I get this:

Code: [Select]
[ ceylo ceylo-pc ~/Desktop/rbSFML ] rake
Compiling ext/System/Clock.cpp
In file included from ext/System/Clock.cpp:24:
In file included from ext/System/Clock.hpp:26:
ext/rbSFML.hpp:54:16: error: call to function 'ToRuby' that is neither visible in the template definition nor found by argument-dependent lookup
        return ToRuby( object, aKlass );
               ^
ext/System/Clock.cpp:32:43: note: in instantiation of function template specialization 'rbMacros::Allocate<sf::Clock>' requested here
    rb_define_alloc_func( rbClock::Class, rbMacros::Allocate< sf::Clock > );
                                          ^
ext/rbSFML.hpp:78:25: note: 'ToRuby' should be declared prior to the call site or in namespace 'sf'
    static inline VALUE ToRuby( T* anObject, VALUE aKlass )
                        ^
1 error generated.
rake aborted!
Command failed with status (1): [/usr/bin/clang++ -pipe -O2 -Iinclude -Iext...]

Tasks: TOP => default => all => system
(See full trace by running task with --trace)
Want to play movies in your SFML application? Check out sfeMovie!

Groogy

  • Hero Member
  • *****
  • Posts: 1469
    • MSN Messenger - groogy@groogy.se
    • View Profile
    • http://www.groogy.se
    • Email
Re: rbSFML
« Reply #204 on: April 23, 2012, 07:56:16 pm »
What compiler are you using? Haven't tried for Mac so we'll have to see if we can solve this. So far it looks like your compiler doesn't like my template definitions. Can you have a look in rbSFML. hpp and just check what would be valid on your compiler?

There will probably come up more problems. Just so you are ready for it.
Developer and Maker of rbSFML and Programmer at Paradox Development Studio

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Re: rbSFML
« Reply #205 on: April 23, 2012, 08:17:34 pm »
If I were you, I'd do what the compiler says ;)
Quote
'ToRuby' should be declared prior to the call site
Laurent Gomila - SFML developer

Groogy

  • Hero Member
  • *****
  • Posts: 1469
    • MSN Messenger - groogy@groogy.se
    • View Profile
    • http://www.groogy.se
    • Email
Re: rbSFML
« Reply #206 on: April 23, 2012, 08:28:29 pm »
The thing is that the template function has been declared prior to the call site. So I have no idea what his compiler is complaining about. I'll look at it when I get home of course.
Developer and Maker of rbSFML and Programmer at Paradox Development Studio

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Re: rbSFML
« Reply #207 on: April 23, 2012, 08:32:15 pm »
Where? I can only see it below, at line 78.
Laurent Gomila - SFML developer

Ceylo

  • Hero Member
  • *****
  • Posts: 2325
    • View Profile
    • http://sfemovie.yalir.org/
    • Email
Re: rbSFML
« Reply #208 on: April 23, 2012, 08:37:19 pm »
What compiler are you using?
According to the error message: Clang. I don't know how to tell Rake to use GCC though.

Haven't tried for Mac so we'll have to see if we can solve this. So far it looks like your compiler doesn't like my template definitions. Can you have a look in rbSFML. hpp and just check what would be valid on your compiler?
What am I supposed to find ? There is no #ifdef except for the inclusion guard.
Want to play movies in your SFML application? Check out sfeMovie!

Groogy

  • Hero Member
  • *****
  • Posts: 1469
    • MSN Messenger - groogy@groogy.se
    • View Profile
    • http://www.groogy.se
    • Email
Re: rbSFML
« Reply #209 on: April 23, 2012, 09:05:59 pm »
Can you test doing a prototype declaration? Because to me it looks like it is calling the definition of the function as a calling point? I don't get it. My network card is messing with me. So is writing from my tablet.

And if you want GCC then change manually the variable CXX and LINK. Though currently these are retrived from ruby. So if ruby says Clang lets first try that.
« Last Edit: April 23, 2012, 09:11:37 pm by Groogy »
Developer and Maker of rbSFML and Programmer at Paradox Development Studio