[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: .so location dependent error - OSX, lua 5.1w4
- From: jym@...
- Date: 18 May 2005 12:55:59 +0100
Hi,
[Duped on the IcyNorth forum, but no response there - apologies]
I am using Lua 5.1(work4) on OSX 10.2.8 to load c modules using code thus:
LUA_PATH="./foo/temp1/?.so" -- as appropriate
foo = require("testcomp")
foo.hello()
I will post the module code if required, but the module loads and works
correctly if the .so is in the current working directory (the same
directory where the above loading code is run from), but not if it is
elsewhere, complaining of:
lua: test.lua:2: error loading package `testcomp'
(./foo/temp1/testcomp.so:1: unexpected symbol near `?') [that's an inverse
video ?]
A component built in another dirctory, then moved to the current working
directory does works. Building command for components is:
g++ -noprebind -shared -bundle -o foo/temp1/testcomp.so -I./include/
-L./lib/ -llua -llualib foo/temp1/testcomp.cpp
Im am using gcc v.3.4.3
I'm assuming its a missing compiler flag I need, as lua components do not
have this problem; possibly the compiler doing something freaky with names?
(all relevent methods have extern C linkage)
Any thoughts?
Cheers,
j
This message has been checked for viruses but the contents of an attachment
may still contain software viruses, which could damage your computer system:
you are advised to perform your own checks. Email communications with the
University of Nottingham may be monitored as permitted by UK legislation.