Author Topic: Installing codeblocks with wxWidgets on Window 10 [SOLVED]  (Read 252 times)

Offline ArakelTheDragon

  • Single posting newcomer
  • *
  • Posts: 4
Installing codeblocks with wxWidgets on Window 10 [SOLVED]
« on: March 16, 2020, 08:29:05 am »
Good day! I have a lot of problems getting wxWidgets to work on Windows 10. I have had better luck on Ubuntu, than Windows.

Steps to install:
1. Download and unpack codeblocks-17.12mingw-nosetup.zip from codeblocks.org
2. Add the environmental variables for GCC.
3. Compile wxWidgets with the following command
mingw32-make -f makefile.gcc BUILD=release SHARED=1 MONOLITHIC=1 UNICODE=1 or mingw32-make -f makefile.gcc BUILD=release
4. Original error was wx/setup.h now found. This was solved by adding directories and libraries to settings -> compiler -> search directories and settings -> compiler -> Linker settings, which led to the following result:

Code: [Select]
||=== Build: Debug in OS.GUI.Template.3 (compiler: GNU GCC Compiler) ===|
Y:\PortableSoftware\codeblocks\wxwidgets\include\wx\longlong.h|321|error: 'wxString' does not name a type|
Y:\PortableSoftware\codeblocks\wxwidgets\include\wx\longlong.h|333|error: 'wxString' does not name a type|
Y:\PortableSoftware\codeblocks\wxwidgets\include\wx\longlong.h||In member function 'long int wxLongLongNative::ToLong() const':|
Y:\PortableSoftware\codeblocks\wxwidgets\include\wx\longlong.h|182|error: 'wxT' was not declared in this scope|
Y:\PortableSoftware\codeblocks\wxwidgets\include\wx\longlong.h|182|error: 'wxASSERT_MSG' was not declared in this scope|
Y:\PortableSoftware\codeblocks\wxwidgets\include\wx\longlong.h|540|error: 'wxString' does not name a type|
Y:\PortableSoftware\codeblocks\wxwidgets\include\wx\longlong.h|552|error: 'wxString' does not name a type|
Y:\PortableSoftware\codeblocks\wxwidgets\include\wx\longlong.h||In member function 'long unsigned int wxULongLongNative::ToULong() const':|
Y:\PortableSoftware\codeblocks\wxwidgets\include\wx\longlong.h|411|error: 'wxT' was not declared in this scope|
Y:\PortableSoftware\codeblocks\wxwidgets\include\wx\longlong.h|411|error: 'wxASSERT_MSG' was not declared in this scope|
Y:\PortableSoftware\codeblocks\wxwidgets\include\wx\longlong.h|321|error: 'wxString' does not name a type|
Y:\PortableSoftware\codeblocks\wxwidgets\include\wx\longlong.h|333|error: 'wxString' does not name a type|
Y:\PortableSoftware\codeblocks\wxwidgets\include\wx\longlong.h||In member function 'long int wxLongLongNative::ToLong() const':|
Y:\PortableSoftware\codeblocks\wxwidgets\include\wx\longlong.h|182|error: 'wxT' was not declared in this scope|
Y:\PortableSoftware\codeblocks\wxwidgets\include\wx\longlong.h|182|error: 'wxASSERT_MSG' was not declared in this scope|
Y:\PortableSoftware\codeblocks\wxwidgets\include\wx\longlong.h|540|error: 'wxString' does not name a type|
Y:\PortableSoftware\codeblocks\wxwidgets\include\wx\longlong.h|552|error: 'wxString' does not name a type|
Y:\PortableSoftware\codeblocks\wxwidgets\include\wx\longlong.h||In member function 'long unsigned int wxULongLongNative::ToULong() const':|
Y:\PortableSoftware\codeblocks\wxwidgets\include\wx\longlong.h|411|error: 'wxT' was not declared in this scope|
Y:\PortableSoftware\codeblocks\wxwidgets\include\wx\longlong.h|411|error: 'wxASSERT_MSG' was not declared in this scope|
Y:\PortableSoftware\codeblocks\wxwidgets\include\wx\buffer.h||In member function 'wxScopedCharTypeBuffer<T>::CharType* wxScopedCharTypeBuffer<T>::release() const':|
Y:\PortableSoftware\codeblocks\wxwidgets\include\wx\buffer.h|138|error: there are no arguments to 'wxT' that depend on a template parameter, so a declaration of 'wxT' must be available [-fpermissive]|
Y:\PortableSoftware\codeblocks\wxwidgets\include\wx\buffer.h|138|note: (if you use '-fpermissive', G++ will accept your code, but allowing the use of an undeclared name is deprecated)|
Y:\PortableSoftware\codeblocks\wxwidgets\include\wx\buffer.h|139|error: there are no arguments to 'wxT' that depend on a template parameter, so a declaration of 'wxT' must be available [-fpermissive]|
Y:\PortableSoftware\codeblocks\wxwidgets\include\wx\buffer.h||In member function 'void* wxMemoryBufferData::release()':|
Y:\PortableSoftware\codeblocks\wxwidgets\include\wx\buffer.h|489|error: 'wxASSERT_MSG' was not declared in this scope|
Y:\PortableSoftware\codeblocks\wxwidgets\include\wx\buffer.h||In member function 'void wxMemoryBuffer::SetDataLen(size_t)':|
Y:\PortableSoftware\codeblocks\wxwidgets\include\wx\buffer.h|558|error: 'wxASSERT' was not declared in this scope|
Y:\PortableSoftware\codeblocks\wxwidgets\include\wx\buffer.h||In member function 'void wxMemoryBuffer::AppendByte(char)':|
Y:\PortableSoftware\codeblocks\wxwidgets\include\wx\buffer.h|590|error: 'wxT' was not declared in this scope|
Y:\PortableSoftware\codeblocks\wxwidgets\include\wx\buffer.h|590|error: 'wxCHECK_RET' was not declared in this scope|
Y:\PortableSoftware\codeblocks\wxwidgets\include\wx\buffer.h||In member function 'void wxMemoryBuffer::AppendData(const void*, size_t)':|
Y:\PortableSoftware\codeblocks\wxwidgets\include\wx\buffer.h|599|error: 'memcpy' was not declared in this scope|
Y:\PortableSoftware\codeblocks\wxwidgets\include\wx\strconv.h||In member function 'virtual bool wxMBConvLibc::IsUTF8() const':|
Y:\PortableSoftware\codeblocks\wxwidgets\include\wx\strconv.h|188|error: 'wxLocaleIsUtf8' was not declared in this scope|
Y:\PortableSoftware\codeblocks\wxwidgets\include\wx\stringimpl.h|44|error: 'wxChar' does not name a type|
Y:\PortableSoftware\codeblocks\wxwidgets\include\wx\dlimpexp.h|103|note: in definition of macro 'WXDLLIMPEXP_DATA_BASE'|
Y:\PortableSoftware\codeblocks\wxwidgets\include\wx\msgout.h|41|error: 'Printf' has not been declared|
Y:\PortableSoftware\codeblocks\wxwidgets\include\wx\msgout.h|41|error: expected identifier before numeric constant|
Y:\PortableSoftware\codeblocks\wxwidgets\include\wx\msgout.h|41|error: expected ',' or '...' before numeric constant|
Y:\PortableSoftware\codeblocks\wxwidgets\include\wx\msgout.h|42|error: expected ';' at end of member declaration|
Y:\PortableSoftware\codeblocks\wxwidgets\include\wx\msgout.h|50|error: 'wxChar' does not name a type|
Y:\PortableSoftware\codeblocks\wxwidgets\include\wx\rtti.h|46|error: 'wxChar' does not name a type|
Y:\PortableSoftware\codeblocks\wxwidgets\include\wx\rtti.h|68|error: 'wxChar' does not name a type|
Y:\PortableSoftware\codeblocks\wxwidgets\include\wx\rtti.h|69|error: 'wxChar' does not name a type|
Y:\PortableSoftware\codeblocks\wxwidgets\include\wx\rtti.h|71|error: 'wxChar' does not name a type|
Y:\PortableSoftware\codeblocks\wxwidgets\include\wx\rtti.h|109|error: 'wxChar' does not name a type|
Y:\PortableSoftware\codeblocks\wxwidgets\include\wx\rtti.h||In constructor 'wxClassInfo::wxClassInfo(const int*, const wxClassInfo*, const wxClassInfo*, int, wxObjectConstructorFn)':|
Y:\PortableSoftware\codeblocks\wxwidgets\include\wx\rtti.h|51|error: class 'wxClassInfo' does not have any field named 'm_className'|
Y:\PortableSoftware\codeblocks\MinGW\lib\gcc\mingw32\5.1.0\include\c++\bits\locale_classes.h|336|error: '__gthread_once_t' does not name a type|
Y:\PortableSoftware\codeblocks\MinGW\lib\gcc\mingw32\5.1.0\include\c++\bits\locale_classes.h|377|error: '_Atomic_word' does not name a type|
Y:\PortableSoftware\codeblocks\MinGW\lib\gcc\mingw32\5.1.0\include\c++\bits\locale_classes.h|386|error: '__gthread_once_t' does not name a type|
Y:\PortableSoftware\codeblocks\MinGW\lib\gcc\mingw32\5.1.0\include\c++\bits\locale_classes.h||In constructor 'std::locale::facet::facet(std::size_t)':|
Y:\PortableSoftware\codeblocks\MinGW\lib\gcc\mingw32\5.1.0\include\c++\bits\locale_classes.h|403|error: class 'std::locale::facet' does not have any field named '_M_refcount'|
Y:\PortableSoftware\codeblocks\MinGW\lib\gcc\mingw32\5.1.0\include\c++\bits\locale_classes.h||In member function 'void std::locale::facet::_M_add_reference() const':|
Y:\PortableSoftware\codeblocks\MinGW\lib\gcc\mingw32\5.1.0\include\c++\bits\locale_classes.h|434|error: '__atomic_add_dispatch' is not a member of '__gnu_cxx'|
Y:\PortableSoftware\codeblocks\MinGW\lib\gcc\mingw32\5.1.0\include\c++\bits\locale_classes.h|434|error: '_M_refcount' was not declared in this scope|
Y:\PortableSoftware\codeblocks\MinGW\lib\gcc\mingw32\5.1.0\include\c++\bits\locale_classes.h||In member function 'void std::locale::facet::_M_remove_reference() const':|
Y:\PortableSoftware\codeblocks\MinGW\lib\gcc\mingw32\5.1.0\include\c++\bits\locale_classes.h|441|error: '__exchange_and_add_dispatch' is not a member of '__gnu_cxx'|
Y:\PortableSoftware\codeblocks\MinGW\lib\gcc\mingw32\5.1.0\include\c++\bits\locale_classes.h|441|error: '_M_refcount' was not declared in this scope|
Y:\PortableSoftware\codeblocks\MinGW\lib\gcc\mingw32\5.1.0\include\c++\bits\locale_classes.h|494|error: '_Atomic_word' does not name a type|
Y:\PortableSoftware\codeblocks\MinGW\lib\gcc\mingw32\5.1.0\include\c++\bits\locale_classes.h|533|error: '_Atomic_word' does not name a type|
Y:\PortableSoftware\codeblocks\MinGW\lib\gcc\mingw32\5.1.0\include\c++\bits\locale_classes.h||In member function 'void std::locale::_Impl::_M_add_reference()':|
Y:\PortableSoftware\codeblocks\MinGW\lib\gcc\mingw32\5.1.0\include\c++\bits\locale_classes.h|548|error: '__atomic_add_dispatch' is not a member of '__gnu_cxx'|
Y:\PortableSoftware\codeblocks\MinGW\lib\gcc\mingw32\5.1.0\include\c++\bits\locale_classes.h|548|error: '_M_refcount' was not declared in this scope|
Y:\PortableSoftware\codeblocks\MinGW\lib\gcc\mingw32\5.1.0\include\c++\bits\locale_classes.h||In member function 'void std::locale::_Impl::_M_remove_reference()':|
Y:\PortableSoftware\codeblocks\MinGW\lib\gcc\mingw32\5.1.0\include\c++\bits\locale_classes.h|555|error: '__exchange_and_add_dispatch' is not a member of '__gnu_cxx'|
Y:\PortableSoftware\codeblocks\MinGW\lib\gcc\mingw32\5.1.0\include\c++\bits\locale_classes.h|555|error: '_M_refcount' was not declared in this scope|
||More errors follow but not being shown.|
||Edit the max errors limit in compiler options...|
||=== Build failed: 50 error(s), 0 warning(s) (0 minute(s), 9 second(s)) ===|
||=== Build failed: 50 error(s), 0 warning(s) (0 minute(s), 9 second(s)) ===|

The compiler and everything is on a portable drive.[/code]
I tried all solutions on google, it does not work.
« Last Edit: March 16, 2020, 04:24:53 pm by ArakelTheDragon »

Offline ArakelTheDragon

  • Single posting newcomer
  • *
  • Posts: 4
Re: Installing codeblocks with wxWidgets on Window 10
« Reply #1 on: March 16, 2020, 09:44:45 am »
Sorry for the double post.

I tried with a different project and now it shows:

Code: [Select]
Y:\PortableSoftware\codeblocks\wxwidgets\include\wx\string.h|24|fatal error: wx/defs.h: No such file or directory|

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 12321
    • Travis build status
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Online stahta01

  • Lives here!
  • ****
  • Posts: 6794
    • My Best Post
Re: Installing codeblocks with wxWidgets on Window 10
« Reply #3 on: March 16, 2020, 10:54:51 am »
3. Compile wxWidgets with the following command
mingw32-make -f makefile.gcc BUILD=release SHARED=1 MONOLITHIC=1 UNICODE=1 or mingw32-make -f makefile.gcc BUILD=release

If you used both of those I think you need to delete the wxWidgets folder and start again!
I have never had good luck switching between MONOLITHIC and non-MONOLITHIC (multi-libs) build in the same build folder.

To build Code::Blocks on Windows MONOLITHIC is best and required if building with CB Projects.

Note: You do not seem to be building Code::Blocks; but, just using Code::Blocks.

Tim S.
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 32 bit.
On Debian Stretch, compiling CB Trunk against wxWidgets 3.0.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline ArakelTheDragon

  • Single posting newcomer
  • *
  • Posts: 4
Re: Installing codeblocks with wxWidgets on Window 10
« Reply #4 on: March 16, 2020, 03:41:53 pm »
I tried this option, it did not work.

EDIT:
Ok, I solved it by re-building a new wxWidgets directory with monolithic only and after that I removed the directories and libraries that I have added in the search directories for the linker and compiler and in the linker settings like I have mentioned in the previous post.
« Last Edit: March 16, 2020, 04:23:40 pm by ArakelTheDragon »