Suddenly getting errors when compiling wxWidget Project? Topic is solved

Do you have a question about makefiles, a compiler or IDE you are using and need to know how to set it up for wxWidgets or why it doesn't compile but other IDE's do ? Post your questions here.
Post Reply
dominover
Knows some wx things
Knows some wx things
Posts: 32
Joined: Sun Sep 23, 2012 3:00 am

Suddenly getting errors when compiling wxWidget Project?

Post by dominover »

I'm not sure what has caused this.. Thought someone might recognize the problem.

I have been successfully compiling wxWidgets projects for a couple of months now but suddenly I'm getting a heap of errors when compiling. Build Log below

Don't know what I could have done. Anybody recognize this problem? It's mentioning a number of files not declared in this scope but I can't understand why this has suddenly happened.

I'm using Windows XP, Code::Blocks with a Mingw compiler.

Code: Select all

Build started on: 04-12-2012 at 00:21.07
Build ended on: 04-12-2012 at 00:21.23
-------------- Build: Debug in TestWxwidgets ---------------
mingw32-g++.exe -Wall -pipe -mthreads -Wno-attributes -Winvalid-pch -include wx_pch.h -D__GNUWIN32__ -D__WXMSW__ -DwxUSE_UNICODE -DWX_PRECOMP -g -pedantic -std=c++0x -DHAVE_BOOLEAN -IC:\wxWidgets-2.8.12\include -IC:\wxWidgets-2.8.12\contrib\include -IC:\wxWidgets-2.8.12\lib\gcc_lib\mswu -IC:\wxWidgets-2.8.12\include -IC:\wxWidgets-2.8.12\contrib\include -IC:\CodeBlocks\sqlite_ -IC:\podofo-0.9.1\podofo-debug\src\CMakeFiles\podofo_static.dir\doc -IC:\podofo-0.9.1\podofo-debug\src\CMakeFiles\podofo_static.dir\base -IC:\podofo-0.9.1\src -c "C:\Documents and Settings\xxxx\My Documents\codeblock files\TestWxwidgets\wx_pch.h" -o wx_pch.h.gch\Debug_wx_pch_h_gch
In file included from C:\wxWidgets-2.8.12\include/wx/string.h:55,
from C:\wxWidgets-2.8.12\include/wx/log.h:47,
from C:\wxWidgets-2.8.12\include/wx/msw/private.h:24,
from C:\wxWidgets-2.8.12\include/wx/msw/wrapcdlg.h:18,
from C:\wxWidgets-2.8.12\include/wx/wxprec.h:47,
from ./wx_pch.h:14,
from :0:
C:\wxWidgets-2.8.12\include/wx/buffer.h: In constructor 'wxCharBuffer::wxCharBuffer(const char*)':
C:\wxWidgets-2.8.12\include/wx/buffer.h:127: error: 'strdup' was not declared in this scope
C:\wxWidgets-2.8.12\include/wx/buffer.h: In member function 'wxCharBuffer& wxCharBuffer::operator=(const char*)':
C:\wxWidgets-2.8.12\include/wx/buffer.h:127: error: 'strdup' was not declared in this scope
C:\wxWidgets-2.8.12\include/wx/buffer.h: In constructor 'wxWCharBuffer::wxWCharBuffer(const wchar_t*)':
C:\wxWidgets-2.8.12\include/wx/buffer.h:134: error: '_wcsdup' was not declared in this scope
C:\wxWidgets-2.8.12\include/wx/buffer.h: In member function 'wxWCharBuffer& wxWCharBuffer::operator=(const wchar_t*)':
C:\wxWidgets-2.8.12\include/wx/buffer.h:134: error: '_wcsdup' was not declared in this scope
In file included from C:\wxWidgets-2.8.12\include/wx/log.h:47,
from C:\wxWidgets-2.8.12\include/wx/msw/private.h:24,
from C:\wxWidgets-2.8.12\include/wx/msw/wrapcdlg.h:18,
from C:\wxWidgets-2.8.12\include/wx/wxprec.h:47,
from ./wx_pch.h:14,
from :0:
C:\wxWidgets-2.8.12\include/wx/string.h: In function 'int Stricmp(const char*, const char*)':
C:\wxWidgets-2.8.12\include/wx/string.h:141: error: 'strcasecmp' was not declared in this scope
In file included from C:\wxWidgets-2.8.12\include/wx/gdicmn.h:20,
from C:\wxWidgets-2.8.12\include/wx/msw/private.h:213,
from C:\wxWidgets-2.8.12\include/wx/msw/wrapcdlg.h:18,
from C:\wxWidgets-2.8.12\include/wx/wxprec.h:47,
from ./wx_pch.h:14,
from :0:
C:\wxWidgets-2.8.12\include/wx/list.h: In constructor 'wxListKey::wxListKey(const wxChar*)':
C:\wxWidgets-2.8.12\include/wx/list.h:406: error: '_wcsdup' was not declared in this scope
C:\wxWidgets-2.8.12\include/wx/list.h: In constructor 'wxListKey::wxListKey(const wxString&)':
C:\wxWidgets-2.8.12\include/wx/list.h:408: error: '_wcsdup' was not declared in this scope
Process terminated with status 1 (0 minutes, 16 seconds)
7 errors, 0 warnings
User avatar
evstevemd
Part Of The Furniture
Part Of The Furniture
Posts: 2409
Joined: Wed Jan 28, 2009 11:57 am
Location: United Republic of Tanzania

Re: Suddenly getting errors when compiling wxWidget Project?

Post by evstevemd »

what is the first error? I guess the log misses something.
First guess is to check include paths
Chief Justice: We have trouble dear citizens!
Citizens: What it is his honor?
Chief Justice:Our president is an atheist, who will he swear to?
dominover
Knows some wx things
Knows some wx things
Posts: 32
Joined: Sun Sep 23, 2012 3:00 am

Re: Suddenly getting errors when compiling wxWidget Project?

Post by dominover »

OK everybody.. I hope you all didn't sit up too late trying to solve this for me.

I have a solution.

I at some stage tampered with the compiler settings and ticked an extra field which caused these errors. I just cleared them all and ticked the first option 'produce debugging symbols -g' and it worked. Seems it was a compiler problem, somehow affecting the way wxwidgets compiles.

Brilliant work dominover. Case solved.

Cheers
vali29
In need of some credit
In need of some credit
Posts: 3
Joined: Thu Nov 15, 2012 11:03 am

Re: Suddenly getting errors when compiling wxWidget Project?

Post by vali29 »

Remove: -std=c++0x from GCC compiler
Post Reply