[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: More Compiling Adventures
- From: CRIBBSJ <CRIBBSJ@...>
- Date: Thu, 24 Jan 2002 15:56:01 -0500
David Cuny's postings concerning his quest to compile lua using BCC
motivated me to get off my butt and try to do the same. I have to admit
that for the last few months I have been getting by using the iuplua.exe
compiled by Mark at Tecgraf (Thanks Mark!). This exe has iup, lua,
luasocket, and luasql compiled in, which pretty much satisfies my needs.
But there has always been something in the back of my head gnawing at
me to try to compile my own lua. I can't rely on Mark to keep compiling
new versions for the rest of my life (of course, Mark, you can correct
me if I am wrong! :) ).
Well, I tried BCC every which way I could think of, but couldn't get it
to compile lua. So, I downloaded mingw and after a lot of trial and
error, I was able to get lua compiled. Although I didn't know it at the
time 'cause I hadn't read his post, I ended up doing something similar
to David. I took all the .c and .h files from /include, /src/,
/src/lib, and /src/lua and put them into one directory. Then I ran "gcc
-c *.c" to create the object files. Next, I moved lua.o up one
directory. Then, I moved up to that directory. Finally, I typed "gcc
-o lua lua.o ./lua/*.o" and got a working lua.exe!
Well, flushed with success, I downloaded the source to luasocket. I
copied luasocket.h and luasocket.c to the directory containing all of
the source files and tried the above process. I got close, but when I
got to the linking step, I got a bunch of errors like "luasocket.c:
undefined reference to gethostbyname@4".
I know almost nothing about C and compiling and I feel lucky to have
gotten the base lua to compile. I would appreciate any help in this matter.
Jamey Cribbs