Hard Light Productions Forums

Modding, Mission Design, and Coding => FS2 Open Coding - The Source Code Project (SCP) => Cross-Platform Development => Topic started by: Christoph_Berg on June 04, 2005, 04:34:45 am

Title: aclocal can't find macros
Post by: Christoph_Berg on June 04, 2005, 04:34:45 am
Just a little error, although it gets quit annoying if you need to fix it for every CVS build you want to compile.

When I run autogen.sh, I get warnings about undefined macros, which check for wxWidgets. I have it on my computer, but aclocal doesn't seem to find them. Perhaps it would be a good idea to bundle those macros with the source package.

Normally configure should ignore all stuff about wxWidgets, because I don't add --enable-wxfred2 as an option, but it stops with an error about the missing macro. Perhaps --disable-wxfred2 is not used as a default parameter?
Title: aclocal can't find macros
Post by: Mr_Maniac on June 04, 2005, 06:23:55 am
Well... I have to say something to wxFRED2:
I'd love to test wxFRED2, but it won't compile on my PC...
Seems like I'm missing a header-File in /usr/include/wx...
It doesn't find "setup.h"...
But I've compiled and installed wxGTK-2.4 correctly (I hope)...
Well.. Okay...
Portage compiled and installed it (Gentoo-User)...
Title: aclocal can't find macros
Post by: taylor on June 04, 2005, 03:00:55 pm
Quote
Originally posted by Christoph_Berg
When I run autogen.sh, I get warnings about undefined macros, which check for wxWidgets. I have it on my computer, but aclocal doesn't seem to find them. Perhaps it would be a good idea to bundle those macros with the source package.

Good point.  I'm already doing that with the SDL macros, they are included in acinclude.m4.  I'll add the wx macros to that file as well so that the dev package doesn't have to be installed to build non-wxFred2 builds.

wxFRED2 is disabled by default but autoconf will still try to parse the macros which in this case don't exist.  So, short of adding the macros to acinclude.m4 there isn't really anything else to do.  The change should now be in CVS so if it doesn't work for you then let me know.

Quote
Originally posted by Mr_Maniac
Seems like I'm missing a header-File in /usr/include/wx...
It doesn't find "setup.h"...

It doesn't go in a standard include directory.  For me it's in /usr/lib64/wx/include/gtk-2.4/wx, but that should be included with the output of "wx-config --cflags".
Title: aclocal can't find macros
Post by: Mr_Maniac on June 04, 2005, 04:53:59 pm
Hmm...
Now that it finds setup.h (I copied it to /usr/include/wx), there are other problems...

With wxWindows 2.6.0:
Code: [Select]
wxfred2/fredframe.cpp: In constructor `FREDFrame::FREDFrame(const wxChar*, int, int, int, int)':
wxfred2/fredframe.cpp:93: error: conversion from `const char[19]' to `const wxString' is ambiguous
/usr/include/wx-2.6/wx/string.h:643: note: candidates are: wxString::wxString(wxChar, size_t)
/usr/include/wx-2.6/wx/string.h:632: note:                 wxString::wxString(int)
wxfred2/fredframe.cpp: In member function `void FREDFrame::OnFileOpen(wxCommandEvent&)':
wxfred2/fredframe.cpp:108: error: conversion from `const char[5]' to `const wxString' is ambiguous
/usr/include/wx-2.6/wx/string.h:643: note: candidates are: wxString::wxString(wxChar, size_t)
/usr/include/wx-2.6/wx/string.h:632: note:                 wxString::wxString(int)
wxfred2/fredframe.cpp:108: error: conversion from `const char[1]' to `const wxString' is ambiguous
/usr/include/wx-2.6/wx/string.h:643: note: candidates are: wxString::wxString(wxChar, size_t)
/usr/include/wx-2.6/wx/string.h:632: note:                 wxString::wxString(int)
wxfred2/fredframe.cpp:108: error: conversion from `const char[1]' to `const wxString' is ambiguous
/usr/include/wx-2.6/wx/string.h:643: note: candidates are: wxString::wxString(wxChar, size_t)
/usr/include/wx-2.6/wx/string.h:632: note:                 wxString::wxString(int)
wxfred2/fredframe.cpp: In member function `void FREDFrame::OnFileSaveAs(wxCommandEvent&)':
wxfred2/fredframe.cpp:126: error: conversion from `const char[8]' to `const wxString' is ambiguous
/usr/include/wx-2.6/wx/string.h:643: note: candidates are: wxString::wxString(wxChar, size_t)
/usr/include/wx-2.6/wx/string.h:632: note:                 wxString::wxString(int)
wxfred2/fredframe.cpp:126: error: conversion from `const char[1]' to `const wxString' is ambiguous
/usr/include/wx-2.6/wx/string.h:643: note: candidates are: wxString::wxString(wxChar, size_t)
/usr/include/wx-2.6/wx/string.h:632: note:                 wxString::wxString(int)
make[1]: *** [fredframe.o] Error 1
make[1]: Leaving directory `/home/maniac/sources/fs2_open/code'
make: *** [all-recursive] Error 1


With wxWindows 2.4.2:
Long error-message (http://home.arcor.de/mr_maniac/ANDERES/make.err)
Title: aclocal can't find macros
Post by: taylor on June 04, 2005, 05:00:32 pm
Hmm, what does "wx-config --cflags" give you?  The problem with the 2.4.2 output is that a target API isn't set (such as -D__WXGTK__).
Title: aclocal can't find macros
Post by: Mr_Maniac on June 04, 2005, 06:58:44 pm
wx-config --cflags:
Code: [Select]
-I/usr/lib/wx/include/gtk2u-2.4 -DGTK_NO_CHECK_CASTS -D__WXGTK__ -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES

wx-config-2.6 --cflags:
Code: [Select]
-I/usr/lib/wx/include/gtk2-unicode-release-2.6 -I/usr/include/wx-2.6 -DGTK_NO_CHECK_CASTS -D__WXGTK__ -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -D_LARGEFILE_SOURCE=1 -DNO_GCC_PRAGMA
Title: aclocal can't find macros
Post by: Mr_Maniac on June 05, 2005, 08:04:16 am
That's weird:
Even when I edit the Makefile, it won't use the wxGTK2.4-cflags...
Even after a "make clean"...
I copied the "wx-config --cflags" output to the FS2_CXXFLAGS variable, but it doesn't use it?!?!?
I'll continue trying...

EDIT:
Now I've managed to include the CFLAGS, but now the wxGTK-2.6.0 error appears...

Now I've also tried to start fred2 with wine (Cedega CVS), but fred2 complains "Freespace 2/Fred2 cannot be run from a drive root directory!"