Since I don't really have much time to throw around, I'm going to focus on re-building the project file and getting it to work under MSVC 2010. Even though I would love to learn how to use gcc and make, doing so will take up time that I simply don't have.
Too bad... but fair enough
I've already taken out the C++11 keywords (it was just nullptr) in the 13-3-23.patch, but I'll need your help in making sure I don't make any more goofs in the .cpp and .h files that would bung up the compile process on *nix distros.
Most of the code appears to build now, so good work so far
Looking at the 'undefined reference' error messages (see two posts up) and code/Makefile.am, it turns out that many of them originate from freespace.* and levelpaging.*, which are not included in libcode.a (presumably because they're the 'root' FSO source files) and therefore not in wxFRED. I got around it by defining a new libwxFRED in code/Makefile.am, which encompasses libcode, freespace.h, freespace.cpp, levelpaging.h and levelpaging.cpp. This of course leads to main() being defined double (for freespace as well as for wxFRED), but it
as far as I can see g++ can pick the right one.
Now, though, it's still not linking back into WX properly. Looking at the linker command, it appears that the libs are entered ahead of the .o files - which leads me to suspect
this issue. So I changed configure.ac:212 to put WX_LIBS in FS2_LIBS rather than FS2_LDFLAGS. That appears to do the trick.
One error remains now: an undefined reference to frmFRED2::frmFRED2(). Hmm... So should I put that in libwxFRED or directly in wxFRED_SOURCES? Educated guess: put it in wxFRED_SOURCES (since I previously removed the fredframe.* files from there, see two posts up). Hmm... Multiple WX errors compiling frmFRED2; same thing happens if I add it to libwxFRD instead. Here's the error messages:
wxfred2/frmFRED2.cpp:38:63: error: call of overloaded ‘wxString(const char [9])’ is ambiguous
candidates are:
wxString::wxString(const wxWCharBuffer&) <near match>
wxString::wxString(wxChar, size_t) <near match>
wxString::wxString(const wxString&) <near match>
wxString::wxString(int) <near match>
wxfred2/frmFRED2.cpp:43:88: error: cannot convert ‘const char*’ to ‘const wxChar* {aka const wchar_t*}’ for argument ‘2’ to ‘int wxSprintf(wxChar*, const wxChar*, ...)’
wxfred2/frmFRED2.cpp:57:37: error: ‘wxSTB_DEFAULT_STYLE’ was not declared in this scope
wxfred2/frmFRED2.cpp:59:1: error: ‘wxFRED_xpm’ was not declared in this scope
wxfred2/frmFRED2.cpp:78:36: error: invalid conversion from ‘const char*’ to ‘wxChar {aka wchar_t}’ [-fpermissive]
wxfred2/frmFRED2.cpp:78:54: error: invalid conversion from ‘const char*’ to ‘wxChar {aka wchar_t}’ [-fpermissive]
wxfred2/frmFRED2.cpp:106:138: error: conversion from ‘const char [25]’ to ‘const wxString’ is ambiguous
candidates are:
wxString::wxString(wxChar, size_t) <near match>
wxString::wxString(int) <near match>
wxfred2/frmFRED2.cpp:674:182: error: cannot convert ‘const char*’ to ‘const wxChar* {aka const wchar_t*}’ for argument ‘2’ to ‘int wxSprintf(wxChar*, const wxChar*, ...)’
It is kinda strange that these only pop up for frmFRED2.cpp, but I'm not sure whether it's the source file (what version of WX are you working with, Z? I'm on 2.8.12) or my hacking.