Problem linking Squirrel language with SqPlus
Hey,
I've been getting into the Squirrel scripting language lately. I was able to use strictly the Squirrel language and it's standard library, but when trying to add SqPlus (the binding lib) I gett a bunch of linking errors and warning: http://rafb.net/p/npscZs75.html
I was hoping someone could look at my project, and see if they can get it to compile?
http://www.sendspace.com/file/779q6a
The only thing that would need to be changed is the file path the test.nut. I'm running an Intel Mac, and I'm not sure if the libs are UB.
If anyone feels like compiling the Squirrel and SqPlus, they can be found here: squirrel-lang.org (and SqPlus can be found on the wiki).
Thanks!
-Jedd
I've been getting into the Squirrel scripting language lately. I was able to use strictly the Squirrel language and it's standard library, but when trying to add SqPlus (the binding lib) I gett a bunch of linking errors and warning: http://rafb.net/p/npscZs75.html
I was hoping someone could look at my project, and see if they can get it to compile?
http://www.sendspace.com/file/779q6a
The only thing that would need to be changed is the file path the test.nut. I'm running an Intel Mac, and I'm not sure if the libs are UB.
If anyone feels like compiling the Squirrel and SqPlus, they can be found here: squirrel-lang.org (and SqPlus can be found on the wiki).
Thanks!
-Jedd
without looking at the source...
Code:
extern "C" {
#include <squirrel.h>
}
// the rest of your C++ code here
Now, I'm only getting undefined references and symbols to SqPlus object files (.o).
Btw, in the Build Results window, I switched it so I could see the Build Log, but now I can't switch it back to only the warnings/errors, because the 4 little button you see in the window have disappeared.
Btw, in the Build Results window, I switched it so I could see the Build Log, but now I can't switch it back to only the warnings/errors, because the 4 little button you see in the window have disappeared.
Oh, you've got a single-architecture library and you're trying to build a universal binary.
Edit - I tried making a project, created three different targets (squirrel, squirrel standard lib, and sqplus), and added the appropriate source/header files. I built each one, no problems there. So, now I go to add to my other project where I'm actually building an example, and I get the same errors. Just thought I'd mention this.
How can I edit the makefile to build UB libs? Or is it possible to build lib files with Xcode, and just dump the source files into a Xcode project, and let Xcode build a UB .a file?
Thanks OSC!!
Squirrel makefile:
Squirrel Standard Lib Makefile:
SqPlus Makefile:
How can I edit the makefile to build UB libs? Or is it possible to build lib files with Xcode, and just dump the source files into a Xcode project, and let Xcode build a UB .a file?
Thanks OSC!!
Squirrel makefile:
Code:
SQUIRREL= ..
OUT= $(SQUIRREL)/lib/libsquirrel.a
INCZ= -I$(SQUIRREL)/include -I. -Iinclude
DEFS=
LIB=
OBJS= \
sqapi.o \
sqbaselib.o \
sqcompiler.o \
sqdebug.o \
sqlexer.o \
sqobject.o \
sqparser.o \
sqstate.o \
sqtable.o \
sqvm.o \
sqmem.o \
sqclass.o
SRCS= \
sqapi.cpp \
sqbaselib.cpp \
sqfuncstate.cpp \
sqdebug.cpp \
sqlexer.cpp \
sqobject.cpp \
sqcompiler.cpp \
sqstate.cpp \
sqtable.cpp \
sqmem.cpp \
sqvm.cpp \
sqclass.cpp
sq32:
gcc -O2 -fno-rtti -Wall -c $(SRCS) $(INCZ) $(DEFS)
ar rc $(OUT) *.o
rm *.o
sqprof:
gcc -O2 -pg -fno-rtti -pie -gstabs -g3 -Wall -c $(SRCS) $(INCZ) $(DEFS)
ar rc $(OUT) *.o
rm *.o
sq64:
gcc -O2 -D_SQ64 -fno-rtti -Wall -c $(SRCS) $(INCZ) $(DEFS)
ar rc $(OUT) *.o
rm *.oSquirrel Standard Lib Makefile:
Code:
SQUIRREL= ..
OUT= $(SQUIRREL)/lib/libsqstdlib.a
INCZ= -I$(SQUIRREL)/include -I. -Iinclude
SRCS= \
sqstdblob.cpp \
sqstdio.cpp \
sqstdstream.cpp \
sqstdmath.cpp \
sqstdsystem.cpp \
sqstdstring.cpp \
sqstdaux.cpp \
sqstdrex.cpp
sq32:
gcc -O2 -fno-rtti -Wall -c $(SRCS) $(INCZ)
ar rc $(OUT) *.o
rm *.o
sqprof:
gcc -O2 -pg -fno-rtti -pie -gstabs -g3 -Wall -c $(SRCS) $(INCZ)
ar rc $(OUT) *.o
rm *.o
sq64:
gcc -O2 -D_SQ64 -fno-rtti -Wall -c $(SRCS) $(INCZ)
ar rc $(OUT) *.o
rm *.oSqPlus Makefile:
Code:
SQUIRREL= ..
OUT= $(SQUIRREL)/lib/libsqplus.a
INCDIRS= -I$(SQUIRREL)/include -I. -Iinclude
ALLSRCS = $(wildcard *.cpp)
WIN32SRCS = $(wildcard *Win32*)
SRCS = $(filter-out $(WIN32SRCS),$(ALLSRCS))
sqplus:
# g++ -fno-rtti -c $(SRCS) $(INCDIRS)
g++ -O3 -fno-rtti -Os -c $(SRCS) $(INCDIRS)
ar rc $(OUT) *.o
rm *.o
#g++ -O3 -fno-rtti -Os -c $(SRCS) $(INCDIRS)
#g++ -ggdb -fno-rtti -c $(SRCS) $(INCDIRS)
Any other help? I Still can't get this too work. Here's the warnings/errors I get when using the lib built with Xcode, if it helps..
http://rafb.net/p/eEbqmH38.html
http://rafb.net/p/eEbqmH38.html
You've still got a single-architecture library and trying to build a UB...
Well, how do I build UB?
Even if I didn't build a UB, shouldn't it still work since I built it for my architecture?
Edit - I figured it out, after going through apple mailing lists!
Even if I didn't build a UB, shouldn't it still work since I built it for my architecture?
Edit - I figured it out, after going through apple mailing lists!
Possibly Related Threads...
| Thread: | Author | Replies: | Views: | Last Post | |
| Pascal language (pointer) problem | sealfin | 3 | 2,507 |
Nov 27, 2012 04:38 AM Last Post: sealfin |
|
| Problem Weak-linking a framework in Code Warrior 9.6 | lord_nemesis | 2 | 2,406 |
Nov 25, 2005 01:00 AM Last Post: lord_nemesis |
|

