This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

problems to compile DLL of a Lua wrap


Hello all.
I work with win XP pro and MinGW
I want use function in a DLL with Lua. So, I have to build a wrap for them.
To do this, I use SWIG on the header of the library (that I have) and it
generates me a c file with the wrapping code for my Lib.
Then I have to compile it in a DLL.
First, I do : gcc -c wrap.c
As the wrap.c has some #include, I have to put some header file coming from
the source of Lua 5.1.
It seems normal because the wrapping need some Lua functions.
GCC make for me a wrap.o file and Now, I have to build the final DLL.
So, I do : gcc -shared -o wrap.dll wrap.o
Here's my problem : I got a lot of undefined reference to the Lua functions
from the files I join in the construction of the .o file.
I found that there is a switch to add to link the external library.
So I try :  gcc -shared -o wrap.dll wrap.o -lua
But I got the error : ...ld.exe can't found -lua.
I try a lot of thing here : -lua51 -lua5.1 -L/lua/lua5.1/lua but nothing
works...
I just need help to finish this.
What must I link : the lua.c, the .h, the DLL ?
Have I to create a lua.o ?
How to specifie the path to the good lib ?
The path to Lua and all his bin and src is well define in the PATH variable
of my environemental variables.

Thank a lot for the help ^^

-- 
View this message in context: http://www.nabble.com/problems-to-compile-DLL-of-a-Lua-wrap-tp22534510p22534510.html
Sent from the gcc - Help mailing list archive at Nabble.com.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]