zot / go-fltk Goto Github PK
View Code? Open in Web Editor NEWBasic Go bindings for FLTK
License: Other
Basic Go bindings for FLTK
License: Other
=fltk-2.0.x-r7725 is no longer on the website
get a 'not found' error
cloned the repository (a few minutes ago, 22Nov2010 13:20ish), did a make install
. Make downloads fltk and starts compiling. All is well until:
g++ -Ifltk-2.0.x-r7725 -c fltk.cxx
g++ -m64 -o cgo_fltk.so fltk.cgo2.o widget.cgo2.o group.cgo2.o input.cgo2.o texteditor.cgo2.o window.cgo2.o fltk.o fltk-2.0.x-r7725/lib/libfltk2.a -lXext -lXinerama -lXft -lX11 -lXi -lm -shared -lpthread -lm
/usr/bin/ld: fltk.o: relocation R_X86_64_32 against `typeinfo for EventStealer' can not be used when making a shared object; recompile with -fPIC
fltk.o: could not read symbols: Bad value
collect2: ld returned 1 exit status
Happy to try recompiling with -fPIC if someone can tell me where/how to add it.
Running Fedora Core 12, system update as of this morning, on an AMD64-style system.
uname -a output:
Linux chris.pseudo-epimorphics.com 2.6.32.23-170.fc12.x86_64 #1 SMP Mon Sep 27 17:23:59 UTC 2010 x86_64 x86_64 x86_64 GNU/Linux
Chris
Hi, I succeeded building go-fltk and examples on windows box by slightly tweaking the makefile, but when I try to run examle I get the following panic error.
c:\development\cvstree\go-fltk\examples>hello
throw: cgocall unavailable
panic PC=0x83a07c
runtime.throw+0x47 /go/src/pkg/runtime/runtime.c:76
runtime.throw(0x4de170, 0x0)
runtime.cgocall+0x32 /go/src/pkg/runtime/cgocall.c:19
runtime.cgocall(0x0, 0x83a0b4, 0x0)
fltk._Cfunc_go_fltk_get_UP_BOX+0x32 /development/cvstree/go-fltk/_cgo_defun.c:127
fltk._Cfunc_go_fltk_get_UP_BOX(0x0, 0x0)
fltk.init┬╖1+0x1e c:/development/cvstree/go-fltk/fltk.cgo1.go:-58
fltk.init┬╖1()
fltk.Init┬╖+0x50 c:/development/cvstree/go-fltk/fltk.cgo1.go:169
fltk.Init┬╖()
main.init+0x46 c:/development/cvstree/go-fltk/examples/hello.go:16
main.init()
runtime.mainstart+0x5 386/asm.s:82
runtime.mainstart()
runtime.goexit /go/src/pkg/runtime/proc.c:146
runtime.goexit()
I suppose the problem is that something is not compiled or linked as it should?
Here are my modifications to makefiles:
diff --git a/Makefile b/Makefile
index 6b4f159..c1d2753 100644
--- a/Makefile
+++ b/Makefile
@@ -23,7 +23,7 @@ CGOFILES=
window.go
CGO_DEPS=fltk.o
-CGO_LDFLAGS=fltk.o $(FLTK_LIB) -lXext -lXinerama -lXft -lX11 -lXi -lm
+CGO_LDFLAGS=fltk.o $(FLTK_LIB) -lm -lpthread -lmsimg32 -lole32 -luuid -lcomctl32 -lwsock32 -lgdi32
include $(GOROOT)/src/Make.pkg
@@ -44,7 +44,7 @@ $(FLTK)/stamp: $(FLTK_DIST)
touch $(FLTK)/stamp
$(FLTK_DIST):
- (cd /tmp; wget $(FLTK_URL))
+ (cd /tmp; curl -C - -O $(FLTK_URL))
clean-fltk:
rm -rf $(FLTK)
diff --git a/examples/Makefile b/examples/Makefile
index b70a4f1..7ef6e8b 100644
--- a/examples/Makefile
+++ b/examples/Makefile
@@ -4,7 +4,7 @@ pkgdir=$(GOROOT)/pkg/$(GOOS)_$(GOARCH)
all: $(BINS)
text hello : % : %.go $(pkgdir)/cgo_fltk.so $(pkgdir)/fltk.a
- 8g [email protected] && 8l -o $@ [email protected]
+ 8g [email protected] && 8l -o [email protected] [email protected]
clean:
rm -f $(BINS) *.8
What happened to the Gober editor that's linked to? It 404s. Very curious.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.