Code Monkey home page Code Monkey logo

wxgo's Introduction

This is the source code for wxGo a Go wrapper of the wxWidgets library.

The actuall wxWidgets source code is not included and will need to
be downloaded separately.

The wrappers are created using the SWIG tool.

There are currenly still some patches/tricks required to get a 
propper build going. Mostly releasted to SWIG support on windows.

Read support/Building.txt for information on how to get it all going
on windows.

Jeroen Dirks
June 2011

wxgo's People

Contributors

jeroend avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

wxgo's Issues

make wxGo error.

$ make -f Makefile.windows
g++ -m32 -I . -g -fPIC -O2 -o obj/wx_wrapcxx.o -c obj/wx_wrap.cxx -I/extra/wx/
lib/wx/include/msw-unicode-release-2.8 -I/extra/wx/include/wx-2.8 -D_IODBC
-DWX
USINGDLL -D__WXMSW
_ -mthreads
obj/wx_wrap.cxx:1:0: warning: -fPIC ignored for target (all code is position in
dependent)
obj/wx_wrap.cxx: In function 'void wrap_wxGetOsDescription(void)':
obj/wx_wrap.cxx:2299:79: error: cannot convert 'const wxChar' to 'const char*'
for argument '1' to 'gostring swig_makegostring(const char, size_t)'
obj/wx_wrap.cxx: In function 'void wrap_wxCommandEvent_GetString(void)':
obj/wx_wrap.cxx:5465:79: error: cannot convert 'const wxChar' to 'const char
'
for argument '1' to 'gostring swig_makegostring(const char, size_t)'
obj/wx_wrap.cxx: In function 'void wrap_wxNotifyEvent_GetString(void)':
obj/wx_wrap.cxx:5704:79: error: cannot convert 'const wxChar' to 'const char
'
for argument '1' to 'gostring swig_makegostring(const char, size_t)'
obj/wx_wrap.cxx: In function 'void wrap_wxTreeEvent_GetLabel(void)':
obj/wx_wrap.cxx:5997:75: error: cannot convert 'const wxChar' to 'const char
'
for argument '1' to 'gostring swig_makegostring(const char, size_t)'
obj/wx_wrap.cxx: In function 'void wrap_wxTreeEvent_GetToolTip(void)':
obj/wx_wrap.cxx:6017:79: error: cannot convert 'const wxChar' to 'const char
'
for argument '1' to 'gostring swig_makegostring(const char, size_t)'
obj/wx_wrap.cxx: In function 'void wrap_wxTreeEvent_GetString(void)':
obj/wx_wrap.cxx:6148:79: error: cannot convert 'const wxChar' to 'const char
'
obj/wx_wrap.cxx:6148:79: error: cannot convert 'const wxChar' to 'const char
'
for argument '1' to 'gostring swig_makegostring(const char, size_t)'
obj/wx_wrap.cxx: In function 'void wrap_wxMenu_Append__SWIG_0(void)':
obj/wx_wrap.cxx:6851:51: error: call of overloaded 'wxString(char&, int&)' is
ambiguous
D:/MinGW/msys/1.0/extra/wx/include/wx-2.8/wx/string.h:1283:3: note: candidates a
re: wxString::wxString(const void
, const void
)
D:/MinGW/msys/1.0/extra/wx/include/wx-2.8/wx/string.h:694:3: note:
wxString::wxString(size_t, wxChar)
D:/MinGW/msys/1.0/extra/wx/include/wx-2.8/wx/string.h:692:3: note:
wxString::wxString(wxChar, size_t)
obj/wx_wrap.cxx:6855:51: error: call of overloaded 'wxString(char&, int&)' is
ambiguous
D:/make: *** wait: No children. Stop.
make: *** Waiting for unfinished jobs....
make: *** wait: No children. Stop.
CTRL+C

What's the problem?
thanks.

suggest Makefile to use wx-config

When compiled wx in Linux or Mingw It'll generate a wx-config executable.

so Only I have to do is put the wx-config's path in $PATH without concern about the WXHOME directory or include or libs.

SWIG_CXXFLAGS=$(shell wx-config --cxxflags)

SWIG_LDFLAGS=$(shell wx-config --libs)

include ${GOROOT}/src/Make.inc

SWIGOPT+=${WXDEFS}

TARG = wx

SWIGFILES=
wx.swigcxx

CXXFILES=
wxwrap.cxx

GOFILES=wxwrap.go

CXXOBJS=$(patsubst %.cxx,_obj/%.o,$(CXXFILES))

include ${GOROOT}/src/Make.pkg

%: install %.go
$(GC) $.go
$(LD) $(SWIG_RPATH) -o $@ $
.$0

_obj/%.o: %.cxx $(HFILES)
@mkdir -p _obj
$(HOST_CXX) $(CXXFLAGS) -o $@ $*.cxx

Unable to compile...

I installed the latest Mingw/MSYS (as of yesterday - choosing all of the packages for development) using their installer. I grabbed the latest 2.8.12 series wxwidgets and successfully compiled it (ansi style) and several sample programs - which worked. I grabbed swig from svn and applied the patch (and successfully got a executable - after grabbing and compiling pcre as well). I have all the various projects go, pcre, swig, wx and wxGo under /home/ but have done make install for wx, pcre and swig and ./all.bash for go. So wx, pcre and swig show up in the correct places under /usr/local (lib, bin and include). All SHOULD be well (I'm on Windows 7 64 bit btw). So I go to /home//wxGo/wx and enter:

$ make
swig -go -c++ -module wx -soname wx-wx.so -o _obj/wx_wrap.cxx -outdir _obj wx.swigcxx
wx.swigcxx(228) : Error: Syntax error in input(1).
make: *** [_obj/wx.go] Error 1

I've tried setting environment variables trying to follow one of the other issues entered here, but I've been unable to get anywhere. While I'm FAR from a gcc/go/bash guru (and I know nothing about swig) I have been able to get go-gtk compiled in the same environment. Do you have any pointers or suggestions I could try? Thanks!

David

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.