Skip to content
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 fails for wxWidgets 3.1 #2

Open
rcortini opened this issue Jun 5, 2015 · 1 comment
Open

Build fails for wxWidgets 3.1 #2

rcortini opened this issue Jun 5, 2015 · 1 comment

Comments

@rcortini
Copy link

rcortini commented Jun 5, 2015

When compiling against wxWidgets 3.1, build fails because of wrong CFLAGS and LDFLAGS. Suggested fix:

  • add the wxwin.m4 file to the source distribution (available from the wxWidgets distribution)
  • apply the following patch
diff --git a/configure.ac b/configure.ac
index 0ef077e..3b014de 100644
--- a/configure.ac
+++ b/configure.ac
@@ -15,11 +15,34 @@ AC_PROG_CXX
 # Checks for libraries & headers.
 LT_INIT([dlopen])

-WX_CFLAGS=`wx-config --version=2.8 --cflags`
-WX_LIBS=`wx-config --version=2.8 --libs`
-AC_SUBST(WX_CFLAGS)
+m4_include([wxwin.m4])
+AM_OPTIONS_WXCONFIG
+reqwx=2.8.0
+AM_PATH_WXCONFIG($reqwx, wxWin=1)
+if test "$wxWin" != 1; then
+   AC_MSG_ERROR([
+       wxWidgets must be installed on your system.
+ 
+       Please check that wx-config is in path, the directory
+       where wxWidgets libraries are installed (returned by
+       'wx-config --libs' or 'wx-config --static --libs' command)
+       is in LD_LIBRARY_PATH or equivalent variable and
+       wxWidgets version is $reqwx or above.
+       ])
+else
+  WX_CFLAGS=`wx-config --cflags`
+  WX_LIBS=`wx-config --libs`
+fi
+
+AC_SUBST(WX_INCLUDES)
 AC_SUBST(WX_LIBS)

+
+# WX_CFLAGS=`wx-config --version=2.8 --cflags`
+# WX_LIBS=`wx-config --version=2.8 --libs`
+# AC_SUBST(WX_CFLAGS)
+# AC_SUBST(WX_LIBS)
+
 PKG_CHECK_MODULES([CB], [codeblocks])
 AC_SUBST(CB_CFLAGS)
 AC_SUBST(CB_LIBS)
@tomolt
Copy link
Owner

tomolt commented Jun 5, 2015

Thanks for the patch! I'm currently not able to deploy it, but I'll merge it in a few days.
I didn't even know that codeblocks already works for wxWidgets 3 ...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants