# Setting directory ruby is compiled to (BCC32 & Ruby 1.8.4)

**URL:** <https://www.ruby-forum.com/t/setting-directory-ruby-is-compiled-to-bcc32-ruby-1-8-4/63398>\
**Category:** Ruby\
**Created:** [June 14, 2006, 10:10pm UTC](https://www.ruby-forum.com/t/setting-directory-ruby-is-compiled-to-bcc32-ruby-1-8-4/63398 "2006-06-14T22:10:15Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![krisleech](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/k/59ef9b/32.png) [@krisleech](https://www.ruby-forum.com/u/krisleech)\
**Post date:** [June 14, 2006, 10:10pm UTC](https://www.ruby-forum.com/t/setting-directory-ruby-is-compiled-to-bcc32-ruby-1-8-4/63398/1 "2006-06-14T22:10:15Z")

</div>

I have Ruby compiling fine using Borlands (free) C compiler for Windows.  
The only problem is I can’t set where ruby is compiled to, it just  
installs it to the current directory (c:\ruby\src\ruby-1.8.4\bcc32).  
Normally you can add --prefix=c:\ruby\bin to the configure command and  
that sets the directory.

configure --prefix=c:\ruby\bin  
make  
make test  
make install

I don’t use C much so it maybe something basic…

Many thanks, K.

---

<div class="post-metadata">

**Author:** ![krisleech](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/k/59ef9b/32.png) [@krisleech](https://www.ruby-forum.com/u/krisleech)\
**Post date:** [June 16, 2006, 11:53am UTC](https://www.ruby-forum.com/t/setting-directory-ruby-is-compiled-to-bcc32-ruby-1-8-4/63398/2 "2006-06-16T11:53:52Z")

</div>

Is there anyone who is using BCC to compile Ruby, I know the standard  
appears to be MS Visual C/C++.

Kris L. wrote:

> I have Ruby compiling fine using Borlands (free) C compiler for Windows.  
> The only problem is I can’t set where ruby is compiled to, it just  
> installs it to the current directory (c:\ruby\src\ruby-1.8.4\bcc32).  
> Normally you can add --prefix=c:\ruby\bin to the configure command and  
> that sets the directory.
> 
> configure --prefix=c:\ruby\bin  
> make  
> make test  
> make install
> 
> I don’t use C much so it maybe something basic…
> 
> Many thanks, K.

---

<div class="post-metadata">

**Author:** ![krisleech](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/k/59ef9b/32.png) [@krisleech](https://www.ruby-forum.com/u/krisleech)\
**Post date:** [June 16, 2006, 3:49pm UTC](https://www.ruby-forum.com/t/setting-directory-ruby-is-compiled-to-bcc32-ruby-1-8-4/63398/3 "2006-06-16T15:49:07Z")

</div>

Hi,

At Thu, 15 Jun 2006 05:10:33 +0900,  
Kris L. wrote in [ruby-talk:197320]:

> configure --prefix=c:\ruby\bin

prefix has no effects on Windows at all.

> make  
> make test  
> make DESTDIR=/path/to/anywhere/you/like/to install

---

<div class="post-metadata">

**Author:** ![krisleech](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/k/59ef9b/32.png) [@krisleech](https://www.ruby-forum.com/u/krisleech)\
**Post date:** [June 17, 2006, 1:16pm UTC](https://www.ruby-forum.com/t/setting-directory-ruby-is-compiled-to-bcc32-ruby-1-8-4/63398/4 "2006-06-17T13:16:01Z")

</div>

unknown wrote:

> Hi,
> 
> At Thu, 15 Jun 2006 05:10:33 +0900,  
> Kris L. wrote in [ruby-talk:197320]:
> 
> > configure --prefix=c:\ruby\bin
> 
> prefix has no effects on Windows at all.

It seemed to using djgpp. Anyways using BCC32 I finally found out:  
full\_path\_to\_bcc32\configure  
make  
make DESTDIR=c:\ruby install

> > make  
> > make test  
> > make DESTDIR=/path/to/anywhere/you/like/to install

---

<div class="post-metadata">

**Author:** ![krisleech](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/k/59ef9b/32.png) [@krisleech](https://www.ruby-forum.com/u/krisleech)\
**Post date:** [June 19, 2006, 2:49pm UTC](https://www.ruby-forum.com/t/setting-directory-ruby-is-compiled-to-bcc32-ruby-1-8-4/63398/5 "2006-06-19T14:49:47Z")

</div>

Hi,

At Mon, 19 Jun 2006 18:53:54 +0900,  
Kris L. wrote in [ruby-talk:198001]:

> It does not look like BCC32 has the correct configure files. It will  
> compile Ruby.exe but does not for some reason generate files like  
> strscan.so which should appear in the lib/1.8/i386-bcc32 (i think thats  
> correct, its somewhere in lib anyway). A simple helloworld will run, but  
> anything more and strscan gets used.

configure is a shell script, so it can’t run on Windows. There  
is bcc32/configure.bat for bcc32 instead.

---

<div class="post-metadata">

**Author:** ![krisleech](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/k/59ef9b/32.png) [@krisleech](https://www.ruby-forum.com/u/krisleech)\
**Post date:** [June 19, 2006, 11:53am UTC](https://www.ruby-forum.com/t/setting-directory-ruby-is-compiled-to-bcc32-ruby-1-8-4/63398/6 "2006-06-19T11:53:39Z")

</div>

It does not look like BCC32 has the correct configure files. It will  
compile Ruby.exe but does not for some reason generate files like  
strscan.so which should appear in the lib/1.8/i386-bcc32 (i think thats  
correct, its somewhere in lib anyway). A simple helloworld will run, but  
anything more and strscan gets used.

If I copy strscan from a pre-compiled version (I think which uses Visual  
C) I get an error about not being able to find init\_\_strscan.

---

<div class="post-metadata">

**Author:** ![krisleech](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/k/59ef9b/32.png) [@krisleech](https://www.ruby-forum.com/u/krisleech)\
**Post date:** [June 23, 2006, 11:04am UTC](https://www.ruby-forum.com/t/setting-directory-ruby-is-compiled-to-bcc32-ruby-1-8-4/63398/7 "2006-06-23T11:04:56Z")

</div>

Nobuyoshi N. wrote:

> Hi,
> 
> At Mon, 19 Jun 2006 18:53:54 +0900,  
> Kris L. wrote in [ruby-talk:198001]:
> 
> > It does not look like BCC32 has the correct configure files. It will  
> > compile Ruby.exe but does not for some reason generate files like  
> > strscan.so which should appear in the lib/1.8/i386-bcc32 (i think thats  
> > correct, its somewhere in lib anyway). A simple helloworld will run, but  
> > anything more and strscan gets used.
> 
> configure is a shell script, so it can’t run on Windows. There  
> is bcc32/configure.bat for bcc32 instead.

That is what I have been using 🙂

Can anyone confirm that is it possible to compile 1.8.4 or 1.8.2 with  
Borland BCC32?

Thanks.
