Hi, At Thu, 3 Jan 2008 00:31:23 +0900, Mohit Sindhwani wrote in [ruby-talk:285660]: > 4. This died halfway through because it could not find c0x32.obj though > it was in the BDS\4.0\lib directory. To make this work, I went to the > Makefile.sub and updated it to pass the OBJ file path to the ilink32 > executable: > LD = ilink32 -q -Gn -j"D:\Program Files\Borland\BDS\4.0\lib\" It is that your setup wasn't enough, as you need the option in general, so put it in ilink32.cfg file. > [Building my application] > For the application, I chose the sample code in 'Programming Ruby' that > shows how to embed Ruby in your application. > 1. In Borland C++ Builder, I chose to build a C++ console application. > When I tried to link and build this, it gave me lots of errors about > re-definition (some shown below) > [C++ Error] stdio.h(393): E2167 '_strerror(const char *)' was > previously declared with the language 'C' A simple example of declarations with and without extern "C" doesn't err: extern "C" void foo(void); void foo(void); int main(void) { foo(); return 0; } I haven't tried to link C++ and am not sure why you failed. > 2. Then, I created the same thing as a C application and tried to link > it with the static library. Still no go! I got a few errors for > undefined references (below): > [Linker Error] Error: Unresolved external '_errno' referenced from > E:\RB_BCC\LIB\BCCWIN32-RUBY18-STATIC.LIB|file > [Linker Error] Error: Unresolved external '__doserrno' referenced from > E:\RB_BCC\LIB\BCCWIN32-RUBY18-STATIC.LIB|win32 > [Linker Error] Error: Unresolved external 'WSAEnumProtocolsA' > referenced from E:\RB_BCC\LIB\BCCWIN32-RUBY18-STATIC.LIB|win32 > [Linker Error] Error: Unresolved external 'WSASocketA' referenced from > E:\RB_BCC\LIB\BCCWIN32-RUBY18-STATIC.LIB|win32 Seems runtime libraries aren't linked. Anyway, bcc version ruby is almost dead now, and may be deprecated in the future. -- Nobu Nakada