c-extension problem

J

Jon Egil Strand

Dear list.

After reading through this walkthrough (1) of compiling c-extensions on
Windows I was finally able to build the pickaxe example on two different
PC's. One with Visual Studio 2003, the other with Visual C++ express 2005.
Both compiled, only one worked. This raises some issues.

I) Should I try to fix this? I mean, will working with C-extensions bring
me down the road of never-ending versioning/library/compiler/...
problems.

II) If yes, how to fix the technical issues at hand today?

Any suggestions would be very welcome.

Anyway, here's what happened.


Building on VS 2003 gave a working result at first try. C++ express 2005
however gave two distinct errors when running



irb: require 'Test'

GUI warning-box:
ruby.exe - Unable to Locate Component
This application has failed to start because MSVCR80.dll was not found.
Re-installing the application may fix this problem.

irb: Load error 126 ...



After searching from mscvr80.dll, finding it here(2) and copying it to
c:\windows\system32 the following error appeared:

irb: require 'Test'

GUI warning-box
Microsoft Visual C++ Runtime Library
Rumtime Error!
Program: c:\progra~1\ruby\bin\ruby.exe
R6034
An application has made an attempt to load the C runtime library
incorrectly
Please contact the application's support team for more information.

irb: Load error 1114...


All the best
Jon Egil Strand


(1) http://www.koontzfamily.org/david/blog/?p=230
Note that I had to install Microsofts Platform SDK from MSDN seperately.

(2)
C:\WINDOWS\WinSxS\x86_Microsoft.VC80.CRT_1fc8b3b9a1e18e3b_8.0.50727.42_x-ww_0de06acd
 
R

ruby talk

------=_Part_16181_27889948.1137875734957
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
Content-Disposition: inline

Hello,
How did you compile the example in 2003? I am tring to do it with the
makefile not a compiler. When I create a blank c++ console project for the
code it gives me linking errors.
Thank you for any help
Becker
 
J

Jon Egil Strand

Becker

Sorry about the lack of details. I also used the makefile approach.

I used textpad, a simple text-editor, for writing the .c-code and then
extconf.rb and nmake.exe from VS 2003.exe. The walkthrough in footnote (1)
was very helpfull, although I must agree that this i cumbersome.

Note that I had to install not only VS2003, but also the Platform SDK (for
2003-server, but works for my XP-sp2) to get it all going.
 
R

ruby talk

------=_Part_16301_16209738.1137877121811
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
Content-Disposition: inline

Sorry to bug you for more details. How do you run nmake.exe from 2003?

Becker

Becker

Sorry about the lack of details. I also used the makefile approach.

I used textpad, a simple text-editor, for writing the .c-code and then
extconf.rb and nmake.exe from VS 2003.exe. The walkthrough in footnote (1= )
was very helpfull, although I must agree that this i cumbersome.

Note that I had to install not only VS2003, but also the Platform SDK (fo= r
2003-server, but works for my XP-sp2) to get it all going.

------=_Part_16301_16209738.1137877121811--
 
R

ruby talk

hello
A few more questions, Where was your source file? I used the one click
installer and i do not see the scr folder. I downloaded the tar source
from the ruby website and i am using that.

Nmake. When i type it in the command line it does not recognize it. I
set up the variables for the system like the website said to. If I use
the nmake in the VC7\bin i get the cl is not recognized

The echo shows what should be there and extconf.rb does what is should.

Its the damn Nmake!

Becker
 
A

Austin Ziegler

After reading through this walkthrough (1) of compiling c-extensions on
Windows I was finally able to build the pickaxe example on two different
PC's. One with Visual Studio 2003, the other with Visual C++ express 2005=
 
R

ruby talk

I get this error when tring nmake.
cl -nologo -LD -FeTest.so TcTest.obj Test.obj msvcrt-ruby18.lib
oldname
s.lib user32.lib advapi32.lib wsock32.lib -link -incremental:no -debug
-opt:ref
-opt:icf -dll -libpath:"c:/ruby/lib" -def:Test-i386-mswin32.def
cl : Command line warning D4024 : unrecognized source file type '.', object
file
assumed
LINK : fatal error LNK1104: cannot open file '.'
NMAKE : fatal error U1077: 'F:\WINDOWS\system32\cmd.exe' : return code '0x2=
'
Stop.

I dont see where in the make file that line is. also where in that
line there just just a dot?

Becker
 
A

Austin Ziegler

I get this error when tring nmake.
cl -nologo -LD -FeTest.so TcTest.obj Test.obj msvcrt-ruby18.lib
oldname
s.lib user32.lib advapi32.lib wsock32.lib -link -incremental:no -debug
-opt:ref
-opt:icf -dll -libpath:"c:/ruby/lib" -def:Test-i386-mswin32.def
cl : Command line warning D4024 : unrecognized source file type '.', obje= ct
file
assumed
LINK : fatal error LNK1104: cannot open file '.'
NMAKE : fatal error U1077: 'F:\WINDOWS\system32\cmd.exe' : return code '0= x2'
Stop.

I dont see where in the make file that line is. also where in that
line there just just a dot?

Again, if you're trying this with Visual Studio 2005, please hold off.
I am preparing a comprehensive set of instructions.

-austin
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,994
Messages
2,570,223
Members
46,812
Latest member
GracielaWa

Latest Threads

Top