# Help installing rubysdl gem

**URL:** <https://www.ruby-forum.com/t/help-installing-rubysdl-gem/185454>\
**Category:** Ruby\
**Created:** [March 20, 2010, 11:58am UTC](https://www.ruby-forum.com/t/help-installing-rubysdl-gem/185454 "2010-03-20T11:58:23Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![spinhoo](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/958977/32.png) [@spinhoo](https://www.ruby-forum.com/u/spinhoo)\
**Post date:** [March 20, 2010, 11:58am UTC](https://www.ruby-forum.com/t/help-installing-rubysdl-gem/185454/1 "2010-03-20T11:58:23Z")

</div>

Hi

```
I am trying to install rubysdl gem on 1.9.1p243. I have tried to

```

install using gem install and by compiling the source code. But the  
source code doesn’t compile. It throws the following error. I see the  
same output while trying to install using “gem install”. Could some one  
help me out here. I have no clue whats wrong.

Thanks in advance  
Venkat

ruby-sdl/rubysdl-2.0.1b$ sudo make  
gcc -I. -I/usr/local/include/ruby-1.9.1/i686-linux  
-I/usr/local/include/ruby-1.9.1/ruby/backward  
-I/usr/local/include/ruby-1.9.1 -I. -I/usr/X11R6/include  
-D\_FILE\_OFFSET\_BITS=64 -fPIC -O2 -g -Wall -Wno-parentheses  
-I/usr/local/include/SDL -D ENABLE\_OPENGL -o rubysdl\_ttf.o -c  
rubysdl\_ttf.c  
gcc -I. -I/usr/local/include/ruby-1.9.1/i686-linux  
-I/usr/local/include/ruby-1.9.1/ruby/backward  
-I/usr/local/include/ruby-1.9.1 -I. -I/usr/X11R6/include  
-D\_FILE\_OFFSET\_BITS=64 -fPIC -O2 -g -Wall -Wno-parentheses  
-I/usr/local/include/SDL -D ENABLE\_OPENGL -o rubysdl\_event\_key.o -c  
rubysdl\_event\_key.c  
rubysdl\_event\_key.c: In function â€˜define\_constâ€™:  
rubysdl\_event\_key.c:30: error: â€˜SDLK\_FIRSTâ€™ undeclared (first use in  
this function)  
rubysdl\_event\_key.c:30: error: (Each undeclared identifier is reported  
only once  
rubysdl\_event\_key.c:30: error: for each function it appears in.)  
rubysdl\_event\_key.c:108: error: â€˜SDLK\_WORLD\_0â€™ undeclared (first use in  
this function)  
rubysdl\_event\_key.c:109: error: â€˜SDLK\_WORLD\_1â€™ undeclared (first use in  
this function)  
rubysdl\_event\_key.c:110: error: â€˜SDLK\_WORLD\_2â€™ undeclared (first use in  
this function)  
rubysdl\_event\_key.c:111: error: â€˜SDLK\_WORLD\_3â€™ undeclared (first use in  
this function)  
rubysdl\_event\_key.c:112: error: â€˜SDLK\_WORLD\_4â€™ undeclared (first use in  
this function)  
rubysdl\_event\_key.c:113: error: â€˜SDLK\_WORLD\_5â€™ undeclared (first use in  
this function)  
rubysdl\_event\_key.c:114: error: â€˜SDLK\_WORLD\_6â€™ undeclared (first use in  
this function)  
rubysdl\_event\_key.c:115: error: â€˜SDLK\_WORLD\_7â€™ undeclared (first use in  
this function)  
rubysdl\_event\_key.c:116: error: â€˜SDLK\_WORLD\_8â€™ undeclared (first use in  
this function)  
rubysdl\_event\_key.c:117: error: â€˜SDLK\_WORLD\_9â€™ undeclared (first use in  
this function)  
rubysdl\_event\_key.c:118: error: â€˜SDLK\_WORLD\_10â€™ undeclared (first use in  
this function)  
rubysdl\_event\_key.c:119: error: â€˜SDLK\_WORLD\_11â€™ undeclared (first use in  
this function)  
rubysdl\_event\_key.c:120: error: â€˜SDLK\_WORLD\_12â€™ undeclared (first use in  
this function)  
rubysdl\_event\_key.c:121: error: â€˜SDLK\_WORLD\_13â€™ undeclared (first use in  
this function)  
rubysdl\_event\_key.c:122: error: â€˜SDLK\_WORLD\_14â€™ undeclared (first use in  
this function)  
rubysdl\_event\_key.c:123: error: â€˜SDLK\_WORLD\_15â€™ undeclared (first use in  
this function)  
rubysdl\_event\_key.c:124: error: â€˜SDLK\_WORLD\_16â€™ undeclared (first use in  
this function)  
rubysdl\_event\_key.c:125: error: â€˜SDLK\_WORLD\_17â€™ undeclared (first use in  
this function)  
rubysdl\_event\_key.c:126: error: â€˜SDLK\_WORLD\_18â€™ undeclared (first use in  
this function)  
rubysdl\_event\_key.c:127: error: â€˜SDLK\_WORLD\_19â€™ undeclared (first use in  
this function)  
rubysdl\_event\_key.c:128: error: â€˜SDLK\_WORLD\_20â€™ undeclared (first use in  
this function)  
rubysdl\_event\_key.c:129: error: â€˜SDLK\_WORLD\_21â€™ undeclared (first use in  
this function)  
rubysdl\_event\_key.c:130: error: â€˜SDLK\_WORLD\_22â€™ undeclared (first use in  
this function)  
rubysdl\_event\_key.c:131: error: â€˜SDLK\_WORLD\_23â€™ undeclared (first use in  
this function)  
rubysdl\_event\_key.c:132: error: â€˜SDLK\_WORLD\_24â€™ undeclared (first use in  
this function)  
rubysdl\_event\_key.c:133: error: â€˜SDLK\_WORLD\_25â€™ undeclared (first use in  
this function)  
rubysdl\_event\_key.c:134: error: â€˜SDLK\_WORLD\_26â€™ undeclared (first use in  
this function)  
rubysdl\_event\_key.c:135: error: â€˜SDLK\_WORLD\_27â€™ undeclared (first use in  
this function)  
rubysdl\_event\_key.c:136: error: â€˜SDLK\_WORLD\_28â€™ undeclared (first use in  
this function)  
rubysdl\_event\_key.c:137: error: â€˜SDLK\_WORLD\_29â€™ undeclared (first use in  
this function)  
rubysdl\_event\_key.c:138: error: â€˜SDLK\_WORLD\_30â€™ undeclared (first use in  
this function)  
rubysdl\_event\_key.c:139: error: â€˜SDLK\_WORLD\_31â€™ undeclared (first use in  
this function)  
rubysdl\_event\_key.c:140: error: â€˜SDLK\_WORLD\_32â€™ undeclared (first use in  
this function)  
rubysdl\_event\_key.c:141: error: â€˜SDLK\_WORLD\_33â€™ undeclared (first use in  
this function)  
rubysdl\_event\_key.c:142: error: â€˜SDLK\_WORLD\_34â€™ undeclared (first use in  
this function)  
rubysdl\_event\_key.c:143: error: â€˜SDLK\_WORLD\_35â€™ undeclared (first use in  
this function)  
rubysdl\_event\_key.c:144: error: â€˜SDLK\_WORLD\_36â€™ undeclared (first use in  
this function)  
rubysdl\_event\_key.c:145: error: â€˜SDLK\_WORLD\_37â€™ undeclared (first use in  
this function)  
rubysdl\_event\_key.c:146: error: â€˜SDLK\_WORLD\_38â€™ undeclared (first use in  
this function)  
rubysdl\_event\_key.c:147: error: â€˜SDLK\_WORLD\_39â€™ undeclared (first use in  
this function)  
rubysdl\_event\_key.c:148: error: â€˜SDLK\_WORLD\_40â€™ undeclared (first use in  
this function)  
rubysdl\_event\_key.c:149: error: â€˜SDLK\_WORLD\_41â€™ undeclared (first use in  
this function)  
rubysdl\_event\_key.c:150: error: â€˜SDLK\_WORLD\_42â€™ undeclared (first use in  
this function)  
rubysdl\_event\_key.c:151: error: â€˜SDLK\_WORLD\_43â€™ undeclared (first use in  
this function)  
rubysdl\_event\_key.c:152: error: â€˜SDLK\_WORLD\_44â€™ undeclared (first use in  
this function)  
rubysdl\_event\_key.c:153: error: â€˜SDLK\_WORLD\_45â€™ undeclared (first use in  
this function)  
rubysdl\_event\_key.c:154: error: â€˜SDLK\_WORLD\_46â€™ undeclared (first use in  
this function)  
rubysdl\_event\_key.c:155: error: â€˜SDLK\_WORLD\_47â€™ undeclared (first use in  
this function)  
rubysdl\_event\_key.c:156: error: â€˜SDLK\_WORLD\_48â€™ undeclared (first use in  
this function)  
rubysdl\_event\_key.c:157: error: â€˜SDLK\_WORLD\_49â€™ undeclared (first use in  
this function)  
rubysdl\_event\_key.c:158: error: â€˜SDLK\_WORLD\_50â€™ undeclared (first use in  
this function)  
rubysdl\_event\_key.c:159: error: â€˜SDLK\_WORLD\_51â€™ undeclared (first use in  
this function)  
rubysdl\_event\_key.c:160: error: â€˜SDLK\_WORLD\_52â€™ undeclared (first use in  
this function)  
rubysdl\_event\_key.c:161: error: â€˜SDLK\_WORLD\_53â€™ undeclared (first use in  
this function)  
rubysdl\_event\_key.c:162: error: â€˜SDLK\_WORLD\_54â€™ undeclared (first use in  
this function)  
rubysdl\_event\_key.c:163: error: â€˜SDLK\_WORLD\_55â€™ undeclared (first use in  
this function)  
rubysdl\_event\_key.c:164: error: â€˜SDLK\_WORLD\_56â€™ undeclared (first use in  
this function)  
rubysdl\_event\_key.c:165: error: â€˜SDLK\_WORLD\_57â€™ undeclared (first use in  
this function)  
rubysdl\_event\_key.c:166: error: â€˜SDLK\_WORLD\_58â€™ undeclared (first use in  
this function)  
rubysdl\_event\_key.c:167: error: â€˜SDLK\_WORLD\_59â€™ undeclared (first use in  
this function)  
rubysdl\_event\_key.c:168: error: â€˜SDLK\_WORLD\_60â€™ undeclared (first use in  
this function)  
rubysdl\_event\_key.c:169: error: â€˜SDLK\_WORLD\_61â€™ undeclared (first use in  
this function)  
rubysdl\_event\_key.c:170: error: â€˜SDLK\_WORLD\_62â€™ undeclared (first use in  
this function)  
rubysdl\_event\_key.c:171: error: â€˜SDLK\_WORLD\_63â€™ undeclared (first use in  
this function)  
rubysdl\_event\_key.c:172: error: â€˜SDLK\_WORLD\_64â€™ undeclared (first use in  
this function)  
rubysdl\_event\_key.c:173: error: â€˜SDLK\_WORLD\_65â€™ undeclared (first use in  
this function)  
rubysdl\_event\_key.c:174: error: â€˜SDLK\_WORLD\_66â€™ undeclared (first use in  
this function)  
rubysdl\_event\_key.c:175: error: â€˜SDLK\_WORLD\_67â€™ undeclared (first use in  
this function)  
rubysdl\_event\_key.c:176: error: â€˜SDLK\_WORLD\_68â€™ undeclared (first use in  
this function)  
rubysdl\_event\_key.c:177: error: â€˜SDLK\_WORLD\_69â€™ undeclared (first use in  
this function)  
rubysdl\_event\_key.c:178: error: â€˜SDLK\_WORLD\_70â€™ undeclared (first use in  
this function)  
rubysdl\_event\_key.c:179: error: â€˜SDLK\_WORLD\_71â€™ undeclared (first use in  
this function)  
rubysdl\_event\_key.c:180: error: â€˜SDLK\_WORLD\_72â€™ undeclared (first use in  
this function)  
rubysdl\_event\_key.c:181: error: â€˜SDLK\_WORLD\_73â€™ undeclared (first use in  
this function)  
rubysdl\_event\_key.c:182: error: â€˜SDLK\_WORLD\_74â€™ undeclared (first use in  
this function)  
rubysdl\_event\_key.c:183: error: â€˜SDLK\_WORLD\_75â€™ undeclared (first use in  
this function)  
rubysdl\_event\_key.c:184: error: â€˜SDLK\_WORLD\_76â€™ undeclared (first use in  
this function)  
rubysdl\_event\_key.c:185: error: â€˜SDLK\_WORLD\_77â€™ undeclared (first use in  
this function)  
rubysdl\_event\_key.c:186: error: â€˜SDLK\_WORLD\_78â€™ undeclared (first use in  
this function)  
rubysdl\_event\_key.c:187: error: â€˜SDLK\_WORLD\_79â€™ undeclared (first use in  
this function)  
rubysdl\_event\_key.c:188: error: â€˜SDLK\_WORLD\_80â€™ undeclared (first use in  
this function)  
rubysdl\_event\_key.c:189: error: â€˜SDLK\_WORLD\_81â€™ undeclared (first use in  
this function)  
rubysdl\_event\_key.c:190: error: â€˜SDLK\_WORLD\_82â€™ undeclared (first use in  
this function)  
rubysdl\_event\_key.c:191: error: â€˜SDLK\_WORLD\_83â€™ undeclared (first use in  
this function)  
rubysdl\_event\_key.c:192: error: â€˜SDLK\_WORLD\_84â€™ undeclared (first use in  
this function)  
rubysdl\_event\_key.c:193: error: â€˜SDLK\_WORLD\_85â€™ undeclared (first use in  
this function)  
rubysdl\_event\_key.c:194: error: â€˜SDLK\_WORLD\_86â€™ undeclared (first use in  
this function)  
rubysdl\_event\_key.c:195: error: â€˜SDLK\_WORLD\_87â€™ undeclared (first use in  
this function)  
rubysdl\_event\_key.c:196: error: â€˜SDLK\_WORLD\_88â€™ undeclared (first use in  
this function)  
rubysdl\_event\_key.c:197: error: â€˜SDLK\_WORLD\_89â€™ undeclared (first use in  
this function)  
rubysdl\_event\_key.c:198: error: â€˜SDLK\_WORLD\_90â€™ undeclared (first use in  
this function)  
rubysdl\_event\_key.c:199: error: â€˜SDLK\_WORLD\_91â€™ undeclared (first use in  
this function)  
rubysdl\_event\_key.c:200: error: â€˜SDLK\_WORLD\_92â€™ undeclared (first use in  
this function)  
rubysdl\_event\_key.c:201: error: â€˜SDLK\_WORLD\_93â€™ undeclared (first use in  
this function)  
rubysdl\_event\_key.c:202: error: â€˜SDLK\_WORLD\_94â€™ undeclared (first use in  
this function)  
rubysdl\_event\_key.c:203: error: â€˜SDLK\_WORLD\_95â€™ undeclared (first use in  
this function)  
rubysdl\_event\_key.c:263: error: â€˜SDLK\_RMETAâ€™ undeclared (first use in  
this function)  
rubysdl\_event\_key.c:264: error: â€˜SDLK\_LMETAâ€™ undeclared (first use in  
this function)  
rubysdl\_event\_key.c:278: error: â€˜SDLK\_LASTâ€™ undeclared (first use in  
this function)  
rubysdl\_event\_key.c: In function â€˜Key\_s\_scanâ€™:  
rubysdl\_event\_key.c:311: warning: implicit declaration of function  
â€˜SDL\_GetKeyStateâ€™  
rubysdl\_event\_key.c:311: warning: assignment makes pointer from integer  
without a cast  
rubysdl\_event\_key.c: In function â€˜Key\_s\_press\_pâ€™:  
rubysdl\_event\_key.c:320: error: â€˜SDLK\_FIRSTâ€™ undeclared (first use in  
this function)  
rubysdl\_event\_key.c:320: error: â€˜SDLK\_LASTâ€™ undeclared (first use in  
this function)  
make: \*\*\* [rubysdl\_event\_key.o] Error 1

---

<div class="post-metadata">

**Author:** ![spinhoo](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/958977/32.png) [@spinhoo](https://www.ruby-forum.com/u/spinhoo)\
**Post date:** [March 23, 2010, 9:13am UTC](https://www.ruby-forum.com/t/help-installing-rubysdl-gem/185454/2 "2010-03-23T09:13:19Z")

</div>

Any Help!

---

<div class="post-metadata">

**Author:** ![spinhoo](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/958977/32.png) [@spinhoo](https://www.ruby-forum.com/u/spinhoo)\
**Post date:** [March 23, 2010, 9:55am UTC](https://www.ruby-forum.com/t/help-installing-rubysdl-gem/185454/3 "2010-03-23T09:55:38Z")

</div>

Hello Bill

Thanks for the reply.

sdl-config --version returns 1.3.0

Venkat

Bill K. wrote:

> Venkat A. wrote:
> 
> > rubysdl\_event\_key.c  
> > rubysdl\_event\_key.c: In function â€˜define\_constâ€™:  
> > rubysdl\_event\_key.c:30: error: â€˜SDLK\_FIRSTâ€™ undeclared (first use in  
> > this function)
> 
> Which version of SDL is installed on your system?
> 
> Seems perhaps rubysdl may not have been tested with  
> the version of SDL on your system.
> 
> (This is purely a guess based on the error message,  
> which seems to indicate that even though  
> rubysdl\_event\_key.c’s #include’s have succeeded,  
> the defines it is expecting aren’t available.)
> 
> Regards,
> 
> Bill

---

<div class="post-metadata">

**Author:** ![spinhoo](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/958977/32.png) [@spinhoo](https://www.ruby-forum.com/u/spinhoo)\
**Post date:** [March 23, 2010, 9:48am UTC](https://www.ruby-forum.com/t/help-installing-rubysdl-gem/185454/4 "2010-03-23T09:48:57Z")

</div>

Venkat A. wrote:

> rubysdl\_event\_key.c  
> rubysdl\_event\_key.c: In function â€˜define\_constâ€™:  
> rubysdl\_event\_key.c:30: error: â€˜SDLK\_FIRSTâ€™ undeclared (first use in  
> this function)

Which version of SDL is installed on your system?

Seems perhaps rubysdl may not have been tested with  
the version of SDL on your system.

(This is purely a guess based on the error message,  
which seems to indicate that even though  
rubysdl\_event\_key.c’s #include’s have succeeded,  
the defines it is expecting aren’t available.)

Regards,

Bill

---

<div class="post-metadata">

**Author:** ![spinhoo](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/958977/32.png) [@spinhoo](https://www.ruby-forum.com/u/spinhoo)\
**Post date:** [March 23, 2010, 10:19am UTC](https://www.ruby-forum.com/t/help-installing-rubysdl-gem/185454/5 "2010-03-23T10:19:59Z")

</div>

Venkat A. wrote:

> sdl-config --version returns 1.3.0

My understanding is that SDL 1.3 is still evolving  
( [http://wiki.libsdl.org/moin.cgi/Roadmap](http://wiki.libsdl.org/moin.cgi/Roadmap) )  
and that several API’s may have changed since SDL  
1.2.

I’d suggest installing the latest stable release  
of SDL 1.2 ( [Simple DirectMedia Layer - SDL version 1.2.15 (historic)](http://www.libsdl.org/download-1.2.php) )

Might have better luck building rubysdl against  
that version. (But again, I am only guessing.)

Regards,

Bill

---

<div class="post-metadata">

**Author:** ![spinhoo](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/958977/32.png) [@spinhoo](https://www.ruby-forum.com/u/spinhoo)\
**Post date:** [March 23, 2010, 10:35am UTC](https://www.ruby-forum.com/t/help-installing-rubysdl-gem/185454/6 "2010-03-23T10:35:12Z")

</div>

Thanks Bill

```
 Uninstalled the 1.3.0 version and found that there is 1.2.13 

```

already installed on the system. Built and installed rubysdl. It worked  
like a charm.

Venkat

Bill K. wrote:

> Venkat A. wrote:
> 
> > sdl-config --version returns 1.3.0
> 
> My understanding is that SDL 1.3 is still evolving  
> ( [http://wiki.libsdl.org/moin.cgi/Roadmap](http://wiki.libsdl.org/moin.cgi/Roadmap) )  
> and that several API’s may have changed since SDL  
> 1.2.
> 
> I’d suggest installing the latest stable release  
> of SDL 1.2 ( [Simple DirectMedia Layer - SDL version 1.2.15 (historic)](http://www.libsdl.org/download-1.2.php) )
> 
> Might have better luck building rubysdl against  
> that version. (But again, I am only guessing.)
> 
> Regards,
> 
> Bill
