Ask a Question related to Ruby, Design and Development.
-
DaZoner #1
Newbie question : Extending Ruby
I'm making my first extension to Ruby. The C file declarations look
like:
__declspec(dllexport) VALUE cImage8 = Qnil;
__declspec(dllexport) void Init_Image8()
{
printf("I get here ...\n");
cImage8 = rb_define_class("Image8",rb_cObject);
printf(" ... but I never get here.\n");
[SNIP: other methods defined ]
}
I get a segmentation fault during the call to rb_define_class(). The
call to Init_Image8() is started by a 'require Image8' statement in my
main Ruby file.
I'm using Microsoft Visual Studio .NET to create my DLL (compiling it as
C) and I'm linking with the mswin32-ruby16.lib without error. Are these
mismatched in some way? Or is there something simple I need to know? I
get the same behavior if I do not export cImage8.
Any help greatly appreciated. At this point I'm stuck.
DaZoner Guest
-
newbie question for Ruby and/or PHP
Hi, with some of your help, I manage to extract a delimited record into mysql database using ruby. I have the following structure in my MySQL... -
Extending Ruby : segment violation
I'm making my first extension to Ruby. The C file declarations look like: __declspec(dllexport) VALUE cImage8 = Qnil; __declspec(dllexport)... -
Ruby OO-newbie design-question
Hi! I'm not at all new to programming, I know OO-concepts but I don't have any hands-on experience with designing/programming OO except for small... -
[ruby-talk] newbie locale/ascii sort question
Hi, In message " Re: newbie locale/ascii sort question" on 03/07/01, Bengt Dahlqvist <bengt.dahlqvist@ling.uu.se> writes: |Does such utilities... -
[WIN] Compiling / Extending ruby using Visual Studio IDE
"Shashank Date" <sdate@everestkc.net> writes: I have, and was too succesfull with lcc-win32. I strongly suggest you check out how extconf.rb... -
Lyle Johnson #2
Re: Newbie question : Extending Ruby
DaZoner wrote:
How are you compiling your DLL (i.e. which compiler flags, etc.)?> I'm using Microsoft Visual Studio .NET to create my DLL (compiling it as
> C) and I'm linking with the mswin32-ruby16.lib without error. Are these
> mismatched in some way? Or is there something simple I need to know? I
> get the same behavior if I do not export cImage8.
Generally speaking, you're better off writing an extconf.rb script (as
described in "Programming Ruby" and elsewhere) so that you don't have to
guess which settings to use.
Lyle Johnson Guest
-
Aleksei Guzev #3
Re: Newbie question : Extending Ruby
On Mon, 13 Oct 2003 11:36:55 -0500, Lyle Johnson
<lyle@users.sourceforge.net> wrote:
> DaZoner wrote:
>>>> I'm using Microsoft Visual Studio .NET to create my DLL (compiling it
>> as C) and I'm linking with the mswin32-ruby16.lib without error. Are
>> these mismatched in some way? Or is there something simple I need to
>> know? I get the same behavior if I do not export cImage8.
> How are you compiling your DLL (i.e. which compiler flags, etc.)?
> Generally speaking, you're better off writing an extconf.rb script (as
> described in "Programming Ruby" and elsewhere) so that you don't have to
> guess which settings to use.
>
Is there any Visual studio project to build Ruby? Those makefiles are
great, but I like the nevironment becouse of a lot of features.
Aleksei Guzev
Aleksei Guzev Guest



Reply With Quote

