# Can I use Tcc to compile ruby c extension?

**URL:** <https://www.ruby-forum.com/t/can-i-use-tcc-to-compile-ruby-c-extension/139252>\
**Category:** Ruby\
**Created:** [June 2, 2008, 9:39am UTC](https://www.ruby-forum.com/t/can-i-use-tcc-to-compile-ruby-c-extension/139252 "2008-06-02T09:39:38Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![shinwoo](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/df705f/32.png) [@shinwoo](https://www.ruby-forum.com/u/shinwoo)\
**Post date:** [June 2, 2008, 9:39am UTC](https://www.ruby-forum.com/t/can-i-use-tcc-to-compile-ruby-c-extension/139252/1 "2008-06-02T09:39:38Z")

</div>

I want to use a small compiler to compile some simple c code. I tried  
with tcc but I get some error that it cannot detect my ruby library:

I try to generate an extension for ruby which compiles using mingw gcc.  
When I compile it with tcc here is the error message:

C:\tcc\>make  
tcc -shared -o mytest.so MyTest.o -L"."  
-L"C:/Devel/installer3/sandbox/ruby\_mingw/lib" -L. -Wl  
-lmsvcrt-ruby18 -lws2\_32  
tcc: cannot find -lmsvcrt-ruby18  
make: \*\*\* [mytest.so] Error 1

I check the path : "C:/Devel/installer3/sandbox/ruby\_mingw/lib  
And I definitely has the libmsvcrt-ruby18.dll.a file inside that folder.  
So, may be that is not possible to link a library file generate by gcc  
in tcc?  
My working platform is winxp.

So, did anyone had been successful to use Tcc to compile extension for  
ruby before?
