-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
WxNim either fails with undeclared indentifier
or crashes compiler when I try to cross-compile for Windows on Ubuntu.
#30
Comments
Sorry for not getting back to you sooner, been busy lately. Just pushed a version to fix some issues with Nim 2.0.6. However I see you use 2.1.1 which is an unstable development version. I can't reproduce your errors with the stable version, so I have to assume it's a bug in whatever development version you where using. I also tried your code and apart from some typos it also seems to have some logic errors. Below is my updated version which works fine: import wxnim/[wx, genui]
var cbChoices = @["Combobox 1", "Combobox 2", "Combobox 3"]
var
spinner: ptr WxSpinCtrl
slider: ptr WxSlider
gauge: ptr WxGauge
proc spinnerCallback(e: var WxSpinEvent) {.cdecl.} =
let val = e.getPosition()
spinner.setValue(val)
gauge.setValue(val)
genui:
mainFrame % Frame(title = "Hello world") | Boxsizer(orient = wxVertical):
Panel | Boxsizer(orient = wxHorizontal):
StaticBox(label = "Basic controls")[proportion = 1] | StaticBoxSizer(orient = wxVertical):
Button: "Button"
CheckBox: "Checkbox"
TextCtrl(value = "Entry")
StaticText: "Label"
mainFrame.show()
runMainLoop() |
The code sample is a subset of the example here https://github.com/PMunch/wxnim/blob/master/examples/genuimacro/controlgallery.nim |
Yes I recognized the code. But when I now full the latest version of this repo it builds fine with the latest Nim version. So I'm unable to reproduce your issue. Did you try to upgrade to the latest stable Nim version and the latest version of wxnim? Keep in mind that old versions still in |
I have only |
Excuse me. |
Basic information
build machine:
target machine:
nim --version
:Steps taken
nimble init project-name && cd project-name
nimble install wxnim
echo 'requires "wxnim#head"' >> project-name.nims
nvim src/project-name.nim
and writenvim config.nims
and writeMinGW-w64 8.1
label forx86_64
. The headers from https://github.com/wxWidgets/wxWidgets/releases/download/v3.2.5/wxWidgets-3.2.5-headers.7z and the libraries from https://github.com/wxWidgets/wxWidgets/releases/download/v3.2.5/wxMSW-3.2.5_gcc810_x64_ReleaseDLL.7zmkdir wxwidgets-mingw
and unzip the downloaded archives into that directory.nimble build
nim_dbg cpp src/project-name.nim
--define:"windows"
toconfig.nims
nimble build
The text was updated successfully, but these errors were encountered: