Hello,
I have written a small app, that uses several libraries, one of which is wx. I wrote this under Fedora linux & mac OSX, where it works well. When I wanted to compile it under windows, I have run into a few more problems.
I have succesfully compiled wxwidgets as a static library, and am attempting to compile my app against the library and include files -- however with limited success.
Due to the other libraries I use, I have to use the gcc compiler , as the other libraries (eg, gsl, but also others) require this.
So onwards I went. I have written a makefile, cutting and pasting the output from wx-config --cflags, and then editing all the \'s to \\s (prevent shell excaping; I tried using sed, but there is a problem with windows' backtick operator ). In this way I have been able to get either make (which is using the Dev-c++ make that I have installed) using windows "cmd.exe" or the cygwin make, using the cygwin bash prompt.
Now the problem I get is this: If i attempt to compile using the cygwin bash prompt, I get
(incomplete output, I can post the complete output if needed)
If i attempt to compile using cmd I get (incomplete output -- I can post the complete output if needed)g++ -c -mthreads -DHAVE_W32API_H -D__WXMSW__ -IC:\\wxWidgets-2.8.8\\lib\\gcc_lib\\msw -IC:\\wxWidgets-2.8.8\\include -Wno-ctor-dtor-privacy -pipe -fmessage-length=0 -IC:\\cygwin\\usr\\include -o MainFrame.o MainFrame.cpp
In file included from C:/wxWidgets-2.8.8/include/wx/wx.h:15,
from wxprec.h:2,
from wxprec-proxy.h:7,
from MainFrame.h:3,
from MainFrame.cpp:3:
C:/wxWidgets-2.8.8/include/wx/defs.h:771:10: #error "Unsupported Windows version"
g++ -c -mthreads -DHAVE_W32API_H -D__WXMSW__ -IC:\\wxWidgets-2.8.8\\lib\\gcc_li
b\\msw -IC:\\wxWidgets-2.8.8\\include -Wno-ctor-dtor-privacy -pipe -fmessage-len
gth=0 -IC:\\cygwin\\usr\\include -o MainFrame.o MainFrame.cpp
In file included from C:/wxWidgets-2.8.8/include/wx/string.h:55,
from C:/wxWidgets-2.8.8/include/wx/memory.h:16,
from C:/wxWidgets-2.8.8/include/wx/object.h:20,
from C:/wxWidgets-2.8.8/include/wx/wx.h:16,
from wxprec.h:2,
from wxprec-proxy.h:7,
from MainFrame.h:3,
from MainFrame.cpp:3:
C:/wxWidgets-2.8.8/include/wx/buffer.h: In constructor `wxWCharBuffer::wxWCharBu
ffer(const wchar_t*)':
C:/wxWidgets-2.8.8/include/wx/buffer.h:134: error: `_wcsdup' undeclared (first u
se this function)
C:/wxWidgets-2.8.8/include/wx/buffer.h:134: error: (Each undeclared identifier i
s reported only once for each function it appears in.)
C:/wxWidgets-2.8.8/include/wx/buffer.h: In member function `wxWCharBuffer& wxWCh
arBuffer::operator=(const wchar_t*)':
C:/wxWidgets-2.8.8/include/wx/buffer.h:134: error: `_wcsdup' undeclared (first u
se this function)
I have spent quite a while trying to work out how to solve this problem, as I would sorely like to be able to create a windows binary of my program -- any help is most appreciated.[/quote]