Problems compiling Ruby extension in MSVC

Discussion in 'Ruby' started by Sriyansa, Jan 25, 2006.

  1. Sriyansa

    Sriyansa Guest

    I am trying to compile my ruby extension under Windows with the MSVC
    compiler shipped with Visual Studio 2003. I have followed the steps
    outlined here:

    http://www.koontzfamily.org/david/blog/?p=230

    However on doing nmake I get the following errors:

    cl : Command line warning D4024 : unrecognized source file type
    'files/ruby/lib/ruby/1.8/i386-mswin3
    2', object file assumed
    cl : Command line warning D4027 : source file
    'files/ruby/lib/ruby/1.8/i386-mswin32' ignored
    cl : Command line warning D4024 : unrecognized source file type
    'files/ruby/lib/ruby/1.8/i386-mswin3
    2', object file assumed
    cl : Command line warning D4027 : source file
    'files/ruby/lib/ruby/1.8/i386-mswin32' ignored
    Test.c
    Test.c(1) : fatal error C1083: Cannot open include file: 'ruby.h': No
    such file or directory
    NMAKE : fatal error U1077: 'cl' : return code '0x2'
    Stop.

    It seems that the compiler does not like spaces in the include path (My
    ruby install directory is D:\Program files\ruby). Is there any better
    way of getting extensions to work under windows?

    The ruby.h file is present at D:/Program
    files/ruby/lib/ruby/1.8/i386-mswin32.

    thanks,
    Sriyansa
     
    Sriyansa, Jan 25, 2006
    #1
    1. Advertising

  2. Sriyansa

    Guest

    > It seems that the compiler does not like spaces in
    > the include path (My ruby install directory is
    > D:\Program files\ruby).


    Try wrapping the path in quotes for example:

    "D:\Program files\ruby"

    Jussi Jumppanen
    Author: Zeus for Windows Ruby IDE
    http://www.zeusedit.com
     
    , Jan 25, 2006
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Dan
    Replies:
    0
    Views:
    1,106
  2. Faheem Mitha
    Replies:
    0
    Views:
    310
    Faheem Mitha
    Apr 8, 2004
  3. Babak
    Replies:
    23
    Views:
    727
  4. Eric Hofreiter

    Compiling C extensions with MSVC

    Eric Hofreiter, Nov 4, 2005, in forum: Ruby
    Replies:
    5
    Views:
    129
  5. Sergey Haritonov

    Compiling Ruby with MSVC

    Sergey Haritonov, Jan 17, 2009, in forum: Ruby
    Replies:
    0
    Views:
    224
    Sergey Haritonov
    Jan 17, 2009
Loading...

Share This Page