Comments (5)
I think I know what's going on here, but to be sure: what version of Mac OS X and what version of Xcode are you using? Thanks.
from ui.
MacOS X 10.7.5
XCode 4.1
SDKs for MacOS 10.6 and 10.7
Thanks
from ui.
Can't check it myself right now (on Xcode 5) but does this patch fix it?
diff --git a/objc_darwin.h b/objc_darwin.h
index 1208e0e..e2d9d92 100644
--- a/objc_darwin.h
+++ b/objc_darwin.h
@@ -26,7 +26,7 @@ extern Class NilClass;
/* for listbox_darwin.go */
extern id *_NSObservedObjectKey;
-inline id objc_msgSend_noargs(id obj, SEL sel)
+static inline id objc_msgSend_noargs(id obj, SEL sel)
{
return objc_msgSend(obj, sel);
}
@@ -52,25 +52,25 @@ extern uintptr_t objc_msgSend_uintret_noargs(id objc, SEL sel);
extern intptr_t objc_msgSend_intret_noargs(id obj, SEL sel);
#define m1(name, type1) \
- inline id objc_msgSend_ ## name (id obj, SEL sel, type1 a) \
+ static inline id objc_msgSend_ ## name (id obj, SEL sel, type1 a) \
{ \
return objc_msgSend(obj, sel, a); \
}
#define m2(name, type1, type2) \
- inline id objc_msgSend_ ## name (id obj, SEL sel, type1 a, type2 b) \
+ static inline id objc_msgSend_ ## name (id obj, SEL sel, type1 a, type2 b) \
{ \
return objc_msgSend(obj, sel, a, b); \
}
#define m3(name, type1, type2, type3) \
- inline id objc_msgSend_ ## name (id obj, SEL sel, type1 a, type2 b, type3 c) \
+ static inline id objc_msgSend_ ## name (id obj, SEL sel, type1 a, type2 b, type3 c) \
{ \
return objc_msgSend(obj, sel, a, b, c); \
}
#define m4(name, type1, type2, type3, type4) \
- inline id objc_msgSend_ ## name (id obj, SEL sel, type1 a, type2 b, type3 c, type4 d) \
+ static inline id objc_msgSend_ ## name (id obj, SEL sel, type1 a, type2 b, type3 c, type4 d) \
{ \
return objc_msgSend(obj, sel, a, b, c, d); \
}
from ui.
Hi Pietro,
Thanks, the fix works and compilation goes past that point.
With go 1.2.1, linkage fails with undefined symbols, so I realized only go tip (future 1.3) is supported... doh!
My suggestion is to add a note in the documentation, this limitation was not clear.
For reference, the error with go 1.2.1 is:
Undefined symbols for architecture x86_64: "_NilClass", referenced from: __cgohack_NilClass in _cgo_main.o (maybe you meant: __cgohack_NilClass) "__NSObservedObjectKey", referenced from: __cgohack__NSObservedObjectKey in _cgo_main.o (maybe you meant: __cgohack__NSObservedObjectKey) "_objc_msgSend_stret_rect_noargs", referenced from: __cgo_778eeb4287e1_Cfunc_objc_msgSend_stret_rect_noargs in delegate_darwin.cgo2.o (maybe you meant: __cgo_778eeb4287e1_Cfunc_objc_msgSend_stret_rect_noargs) "_objc_msgSend_uintret_noargs", referenced from: __cgo_778eeb4287e1_Cfunc_objc_msgSend_uintret_noargs in listbox_darwin.cgo2.o (maybe you meant: __cgo_778eeb4287e1_Cfunc_objc_msgSend_uintret_noargs) "_objc_msgSend_id_uint", referenced from: __cgo_778eeb4287e1_Cfunc_objc_msgSend_id_uint in listbox_darwin.cgo2.o (maybe you meant: __cgo_778eeb4287e1_Cfunc_objc_msgSend_id_uint) "_NSIndexSetEntries", referenced from: __cgo_778eeb4287e1_Cfunc_NSIndexSetEntries in listbox_darwin.cgo2.o (maybe you meant: __cgo_778eeb4287e1_Cfunc_NSIndexSetEntries) "__objc_msgSend_rect", referenced from: __cgo_778eeb4287e1_Cfunc__objc_msgSend_rect in objc_darwin.cgo2.o (maybe you meant: __cgo_778eeb4287e1_Cfunc__objc_msgSend_rect, __cgo_778eeb4287e1_Cfunc__objc_msgSend_rect_bool , __cgo_778eeb4287e1_Cfunc__objc_msgSend_rect_uint_uint_bool ) "__objc_msgSend_uint", referenced from: __cgo_778eeb4287e1_Cfunc__objc_msgSend_uint in objc_darwin.cgo2.o (maybe you meant: __cgo_778eeb4287e1_Cfunc__objc_msgSend_uint) "__objc_msgSend_rect_uint_uint_bool", referenced from: __cgo_778eeb4287e1_Cfunc__objc_msgSend_rect_uint_uint_bool in objc_darwin.cgo2.o (maybe you meant: __cgo_778eeb4287e1_Cfunc__objc_msgSend_rect_uint_uint_bool) "__objc_msgSend_rect_bool", referenced from: __cgo_778eeb4287e1_Cfunc__objc_msgSend_rect_bool in objc_darwin.cgo2.o (maybe you meant: __cgo_778eeb4287e1_Cfunc__objc_msgSend_rect_bool) "_objc_msgSend_intret_noargs", referenced from: __cgo_778eeb4287e1_Cfunc_objc_msgSend_intret_noargs in sysdata_darwin.cgo2.o (maybe you meant: __cgo_778eeb4287e1_Cfunc_objc_msgSend_intret_noargs) "_objc_msgSend_int", referenced from: __cgo_778eeb4287e1_Cfunc_objc_msgSend_int in sysdata_darwin.cgo2.o (maybe you meant: __cgo_778eeb4287e1_Cfunc_objc_msgSend_int, __cgo_778eeb4287e1_Cfunc_objc_msgSend_intret_noargs ) "_objc_msgSend_id_int", referenced from: __cgo_778eeb4287e1_Cfunc_objc_msgSend_id_int in sysdata_darwin.cgo2.o (maybe you meant: __cgo_778eeb4287e1_Cfunc_objc_msgSend_id_int) ld: symbol(s) not found for architecture x86_64 collect2: ld returned 1 exit status
from ui.
Fixed by 7866d3e
Also added a Go 1.3 note: ebd15cc
(I didn't specify the fixes line in the commit message properly.)
Thanks again!
from ui.
Related Issues (20)
- 希望能加入菜单和居中功能,谢谢 HOT 5
- Twitching progress bar HOT 2
- use go module
- Can you create Window center func ? HOT 1
- 有2个问题需要帮助/Two questions ask for help HOT 3
- Add Linux/ARM64 support to ‘andlabs/ui’
- how to add a new row to a table?
- Open file dialog crashes HOT 1
- ld: library not found for -lstdc++ HOT 2
- How can we fix windows size ? HOT 2
- How to remove a row from table properly HOT 1
- Avoid cgo HOT 2
- Cross-compilation on Linux for Windows HOT 1
- System notification message
- Reopen a closed window
- Is this project still alive? HOT 2
- collect2.exe: error: ld returned 1 exit status
- Win10下gocv+andlabs/ui同时使用出现以下错误
- possible to use ui load a webview to load html/js/css or remote url as ui HOT 1
- 如何在ui中嵌入式一个浏览器窗口
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ui.