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
Build for Linux #19
Milestone
Comments
Thank you for some patches I'll integrates these ones. diff --git a/CMakeLists.txt b/CMakeLists.txt
index 2a8e19e..da4054f 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -28,7 +28,7 @@ add_custom_command(
--include time.h
${GENSRCS}
> src/_unsafe.rs
- COMMAND patch -p0 < src/_unsafe.rs.patch
+# COMMAND patch -p0 < src/_unsafe.rs.patch
DEPENDS bindgen.dummy ${GENSRCS}
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
) diff --git a/src/codegen.py b/src/codegen.py
index d94e00c..5641ac5 100644
--- a/src/codegen.py
+++ b/src/codegen.py
@@ -990,7 +990,7 @@ class Preprocessor(object):
def _call_cpp(self, file):
cppflags = Popen(['wx-config', '--cppflags'], stdout=PIPE).communicate()[0].split()
- cppflags.remove('-D__WXMAC__')
+ cppflags.remove('-D__WXGTK__')
cmdline = ['cpp', '-DWXC_TYPES_H'] + cppflags + ['-I/Users/kenz/src/wxRust/wxHaskell/wxc/src/include', file]
return Popen(cmdline, stdout=PIPE).communicate()[0] diff --git a/main.rs b/main.rs
index 10522c3..1bb3fea 100644
--- a/main.rs
+++ b/main.rs
@@ -359,10 +359,10 @@ fn visit_struct(cursor: &Cursor,
let bit = cursor.bit_width();
// If we encounter a bitfield, and fail_on_bitfield is set, throw an
// error and exit entirely.
- if (bit != None && ctx.fail_on_bitfield) {
- fail!("Cannot handle bitfield `{}` in struct `{}`",
- name, parent.spelling());
- }
+// if (bit != None && ctx.fail_on_bitfield) {
+// fail!("Cannot handle bitfield `{}` in struct `{}`",
+// name, parent.spelling());
+// }
let field = mk_fieldinfo(name, ty, bit);
fields.push(field);
} I'll investigate for seg fault problem after that. |
ghost
assigned kenz-gelsoft
Jan 4, 2014
kenz-gelsoft
added a commit
that referenced
this issue
Jan 5, 2014
kenz-gelsoft
added a commit
that referenced
this issue
Jan 5, 2014
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I had to make some changes in order to be able to build for Linux (Gentoo Linux with wxGTK-2.9.4.1-r1 from distribution):
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 2a8e19e..da4054f 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -28,7 +28,7 @@ add_custom_command(
--include time.h
${GENSRCS}
> src/_unsafe.rs
+# COMMAND patch -p0 < src/_unsafe.rs.patch
DEPENDS bindgen.dummy ${GENSRCS}
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
)
diff --git a/src/codegen.py b/src/codegen.py
index d94e00c..5641ac5 100644
--- a/src/codegen.py
+++ b/src/codegen.py
@@ -990,7 +990,7 @@ class Preprocessor(object):
diff --git a/main.rs b/main.rs
index 10522c3..1bb3fea 100644
--- a/main.rs
+++ b/main.rs
@@ -359,10 +359,10 @@ fn visit_struct(cursor: &Cursor,
let bit = cursor.bit_width();
// If we encounter a bitfield, and fail_on_bitfield is set, throw an
// error and exit entirely.
+// fail!("Cannot handle bitfield
{}
in struct{}
",+// name, parent.spelling());
+// }
let field = mk_fieldinfo(name, ty, bit);
fields.push(field);
}
Now build completes and I am able to run test. Unfortunately, when I press the button, it segfaults after printing "hello!"
The text was updated successfully, but these errors were encountered: