Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Ruby > msvcr*.dll

Reply
Thread Tools

msvcr*.dll

 
 
Morris Brodersen
Guest
Posts: n/a
 
      06-28-2007
hi,

i'm trying to build a ruby extension in c on windows, using mingw32's
gcc.

these are the two compile commands i use:

gcc -o tga.o tga.c -c -I c:/ruby/lib/ruby/1.8/i386-mswin32
gcc -shared -o tga.so tga.o
-Wl,c:/ruby/bin/msvcrt-ruby18.dll,c:/windows/system32/msvcrt.dll

everything compiles, with a few warnings, but tga.so is created. it has
also a valid Init_tga() function, because otherwise is just get "could
not find Init_tga()".

however, when i try to require tga.so, i get an error that "msvcr80.dll"
is missing. my question is: how did the compiler link to that dll
anyway? i didnt mention it. anyways i'd like to know how to fix this
problem.

by the way, its the one-click-installer of ruby 1.8.6 and windows xp
home

-morris

--
Posted via http://www.ruby-forum.com/.

 
Reply With Quote
 
 
 
 
Morris Brodersen
Guest
Posts: n/a
 
      06-29-2007
Morris Brodersen wrote:
>
> however, when i try to require tga.so, i get an error that "msvcr80.dll"
> is missing.

i downloaded the msvcr80.dll somewhere and moved it into c:/windows.
this didnt fix the problem, i now get a runtime error "application is
trying to initialize a library incorrectly".

btw, should i post this topic somewhere else? im new to ruby-forum. dont
know wether its the right category.

--
Posted via http://www.ruby-forum.com/.

 
Reply With Quote
 
 
 
 
Morris Brodersen
Guest
Posts: n/a
 
      07-01-2007
could it be that something in ruby.h is calling some function of any
msvcr*.dll?


--
Posted via http://www.ruby-forum.com/.

 
Reply With Quote
 
Morris Brodersen
Guest
Posts: n/a
 
      07-02-2007
well, i kind of fixed that problem... seems like the only thing i had to
do is to put tga.so into c:/ruby/lib/ruby/site_ruby/1.8/i386-msvcrt/. it
just works.

if somebody knows why this is happening i'd be very grateful because
i have other .so's which are definitely not in there but work.

-morris

--
Posted via http://www.ruby-forum.com/.

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off




Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57