wxWidgets and MinGW

I have compiled wxWidgets with MinGW (g++) in Windows XP. (I am now able to compile all samples with its associated makefiles.)

I have written an own program with C++ and wxWidgets. In Linux it works to compile this program with my own makefile (and I use wx-config --cxxflags and wx-config --libs in my makefile). But when I tried to compile it in Windows with MinGW serveral errors have occured.

Here is an extract of these errors (all errors are from the same type):

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
In file included from e:/Editoren/wxMSW-2.8.7/include/wx/string.h:55,
from e:/Editoren/wxMSW-2.8.7/include/wx/memory.h:16,
from e:/Editoren/wxMSW-2.8.7/include/wx/object.h:20,
from e:/Editoren/wxMSW-2.8.7/include/wx/wx.h:16,
from main.cpp:16:
e:/Editoren/wxMSW-2.8.7/include/wx/buffer.h: In constructor `wxCharBuffer::wxCharBuffer(const char*)':
e:/Editoren/wxMSW-2.8.7/include/wx/buffer.h:127: error: `strdup' was not declared in this scope
e:/Editoren/wxMSW-2.8.7/include/wx/buffer.h:127: warning: unused variable 'strdup'
e:/Editoren/wxMSW-2.8.7/include/wx/buffer.h: In member function `wxCharBuffer& wxCharBuffer:operator=(const char*)':
e:/Editoren/wxMSW-2.8.7/include/wx/buffer.h:127: error: `strdup' was not declared in this scope
e:/Editoren/wxMSW-2.8.7/include/wx/buffer.h:127: warning: unused variable 'strdup'
e:/Editoren/wxMSW-2.8.7/include/wx/buffer.h: In constructor `wxWCharBuffer::wxWCharBuffer(const wchar_t*)':
e:/Editoren/wxMSW-2.8.7/include/wx/buffer.h:134: error: `_wcsdup' was not declared in this scope
e:/Editoren/wxMSW-2.8.7/include/wx/buffer.h:134: warning: unused variable '_wcsdup'
e:/Editoren/wxMSW-2.8.7/include/wx/buffer.h: In member function `wxWCharBuffer& wxWCharBuffer:operator=(const wchar_t*)':
e:/Editoren/wxMSW-2.8.7/include/wx/buffer.h:134: error: `_wcsdup' was not declared in this scope
e:/Editoren/wxMSW-2.8.7/include/wx/buffer.h:134: warning: unused variable '_wcsdup'


It would be nice if someone can help me to compile my program under Windows.
Did you move the setup.h file into the "includes" directory from it's compiled Lib directory?
No I didn't moved the setup.h.

But because of your reply I tried to do it. I moved setup.h. But the result was the same.

But on executing wx-config --cxxflags I get the same paths as in the makefiles associated to the samples. ThereforeI didn't have an idea how to compile my own program.
Can you show us your code, and the line you are executing to compile it?
I am sorry for the late answer. But here is a link to a file with my code and the makefile:

http://www.helge-j.de/wx/wx_test.zip

Perhaps you can help me?

@esberitoxn : Have a look at this guy's reply.
http://forums.codeblocks.org/index.php/topic,8684.msg63307.html#msg63307
Topic archived. No new replies allowed.