Author Topic: CB build wiki page  (Read 8585 times)

Offline Wkerry

  • Multiple posting newcomer
  • *
  • Posts: 64
CB build wiki page
« on: January 02, 2024, 03:29:30 am »
The following WIKI page uses wxWidgets 3..5, but the nightly has used 3.2.x for a while now:
https://wiki.codeblocks.org/index.php/Installing_Code::Blocks_from_source_on_Windows

Is this page still correct for building CodeBlocks on Windows using the winlibs compiler?

Offline Miguel Gimenez

  • Developer
  • Lives here!
  • *****
  • Posts: 1644
Re: CB build wiki page
« Reply #1 on: January 02, 2024, 09:27:41 am »
It is correct, just change 31 to 32 where needed and download the latest wxWidgets sources.

EDIT: I have edited the page to clarify this and point to the current wxWidgets release.
« Last Edit: January 02, 2024, 10:46:13 am by Miguel Gimenez »

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7699
    • My Best Post
Re: CB build wiki page
« Reply #2 on: January 03, 2024, 03:07:16 am »
It is correct, just change 31 to 32 where needed and download the latest wxWidgets sources.

EDIT: I have edited the page to clarify this and point to the current wxWidgets release.

Thank you
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 64 bit.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline Wkerry

  • Multiple posting newcomer
  • *
  • Posts: 64
Re: CB build wiki page
« Reply #3 on: January 03, 2024, 04:09:24 am »
Thanks.  I have started going through it.

Offline Wkerry

  • Multiple posting newcomer
  • *
  • Posts: 64
Re: CB build wiki page
« Reply #4 on: January 03, 2024, 06:45:48 am »
I built wxwidgets.

When I loaded the CodeBlocks_wx32_64.cbp file the nightly CodeBlocks created a blank wx32_64 global variable, but the instructions indicate it should have created $(#wx32) (changed 31 to 32 as per docs). Should CodeBlocks have created $(wx32) or $(wx32_64)?

Offline Wkerry

  • Multiple posting newcomer
  • *
  • Posts: 64
Re: CB build wiki page
« Reply #5 on: January 03, 2024, 07:07:52 am »
I setup $(wx32_64), but I cannot build CodeBlocks as I get the error below. I am using the latest MSYS2 MingW64 compiler, GCC 13.2.0.

The global variable dialog has changed allot and the existing one in the page is probably from a very old version of CodeBlocks as it has wxwidgets 2.8.12 in the base.

Any ideas on this error? From google it seems like somehow CodeBlocks or my setup is using a 32 bit compiler some how, but I have no idea how.


Code
-------------- Build: tinyXML in Code::Blocks wx3.2.x (64 bit) (compiler: GNU GCC Compiler)---------------

g++.exe -Wall -std=gnu++11 -m64 -g -pipe -mthreads -fmessage-length=0 -fexceptions -Winvalid-pch -DHAVE_W32API_H -D__WXMSW__ -DWXUSINGDLL -DcbDEBUG -DCB_PRECOMP -DwxUSE_UNICODE -D_WIN64 -DEXPORT_LIB -iquote.objs32_64\include -I.objs32_64\include -I. -ID:\Temp\wxWidgets-3.2.4\include -ID:\Temp\wxWidgets-3.2.4\lib\gcc_dll\mswu -Isdk\wxscintilla\include -Iinclude\tinyxml -Iinclude\tinyxml -c D:\Temp\codeblocks-code-r13422-trunk\src\base\tinyxml\tinystr.cpp -o .objs32_64\base\tinyxml\tinystr.o
g++.exe -Wall -std=gnu++11 -m64 -g -pipe -mthreads -fmessage-length=0 -fexceptions -Winvalid-pch -DHAVE_W32API_H -D__WXMSW__ -DWXUSINGDLL -DcbDEBUG -DCB_PRECOMP -DwxUSE_UNICODE -D_WIN64 -DEXPORT_LIB -iquote.objs32_64\include -I.objs32_64\include -I. -ID:\Temp\wxWidgets-3.2.4\include -ID:\Temp\wxWidgets-3.2.4\lib\gcc_dll\mswu -Isdk\wxscintilla\include -Iinclude\tinyxml -Iinclude\tinyxml -c D:\Temp\codeblocks-code-r13422-trunk\src\base\tinyxml\tinyxml.cpp -o .objs32_64\base\tinyxml\tinyxml.o
g++.exe -Wall -std=gnu++11 -m64 -g -pipe -mthreads -fmessage-length=0 -fexceptions -Winvalid-pch -DHAVE_W32API_H -D__WXMSW__ -DWXUSINGDLL -DcbDEBUG -DCB_PRECOMP -DwxUSE_UNICODE -D_WIN64 -DEXPORT_LIB -iquote.objs32_64\include -I.objs32_64\include -I. -ID:\Temp\wxWidgets-3.2.4\include -ID:\Temp\wxWidgets-3.2.4\lib\gcc_dll\mswu -Isdk\wxscintilla\include -Iinclude\tinyxml -Iinclude\tinyxml -c D:\Temp\codeblocks-code-r13422-trunk\src\base\tinyxml\tinyxmlerror.cpp -o .objs32_64\base\tinyxml\tinyxmlerror.o
g++.exe -Wall -std=gnu++11 -m64 -g -pipe -mthreads -fmessage-length=0 -fexceptions -Winvalid-pch -DHAVE_W32API_H -D__WXMSW__ -DWXUSINGDLL -DcbDEBUG -DCB_PRECOMP -DwxUSE_UNICODE -D_WIN64 -DEXPORT_LIB -iquote.objs32_64\include -I.objs32_64\include -I. -ID:\Temp\wxWidgets-3.2.4\include -ID:\Temp\wxWidgets-3.2.4\lib\gcc_dll\mswu -Isdk\wxscintilla\include -Iinclude\tinyxml -Iinclude\tinyxml -c D:\Temp\codeblocks-code-r13422-trunk\src\base\tinyxml\tinyxmlparser.cpp -o .objs32_64\base\tinyxml\tinyxmlparser.o
cmd /c if exist devel32_64\libtxml.a del devel32_64\libtxml.a
ar.exe -r -s devel32_64\libtxml.a .objs32_64\base\tinyxml\tinystr.o .objs32_64\base\tinyxml\tinyxml.o .objs32_64\base\tinyxml\tinyxmlerror.o .objs32_64\base\tinyxml\tinyxmlparser.o
cc1plus.exe: sorry, unimplemented: 64-bit mode not compiled in
Assembler messages:
Fatal error: no compiled in support for x86_64
Process terminated with status 1 (0 minute(s), 0 second(s))
 
cc1plus.exe: sorry, unimplemented: 64-bit mode not compiled in
Assembler messages:
Fatal error: no compiled in support for x86_64
Process terminated with status 1 (0 minute(s), 0 second(s))
2 error(s), 0 warning(s) (0 minute(s), 0 second(s))
 
cc1plus.exe: sorry, unimplemented: 64-bit mode not compiled in
Assembler messages:
Fatal error: no compiled in support for x86_64
Process terminated with status 1 (0 minute(s), 0 second(s))
3 error(s), 0 warning(s) (0 minute(s), 0 second(s))
 
cc1plus.exe: sorry, unimplemented: 64-bit mode not compiled in
Assembler messages:
Fatal error: no compiled in support for x86_64
Process terminated with status 1 (0 minute(s), 0 second(s))
4 error(s), 0 warning(s) (0 minute(s), 0 second(s))
 

Offline Wkerry

  • Multiple posting newcomer
  • *
  • Posts: 64
Re: CB build wiki page
« Reply #6 on: January 03, 2024, 07:33:18 am »
I did a quick hack of my MSYS2 setup and renamed C:\msys64\mingw32 to C:\msys64\mingw32.old and got a very strange (crazy) reference as follows when I did a rebuild workspace as I do not have  the mingw32 directory anymore and the CodeBlcoks setup is to use mingw64.

Code
Tried to run compiler executable 'C:\msys64\mingw32/bin/gcc.exe', but failed!


The Compiler settings have the following:
install directory set to C:\msys64\mingw64[/li][/list]
C++ compiler is set to g++.exe


Offline stahta01

  • Lives here!
  • ****
  • Posts: 7699
    • My Best Post
Re: CB build wiki page
« Reply #7 on: January 04, 2024, 02:34:51 am »
I did a quick hack of my MSYS2 setup and renamed C:\msys64\mingw32 to C:\msys64\mingw32.old and got a very strange (crazy) reference as follows when I did a rebuild workspace as I do not have  the mingw32 directory anymore and the CodeBlcoks setup is to use mingw64.

Code
Tried to run compiler executable 'C:\msys64\mingw32/bin/gcc.exe', but failed!
    The Compiler settings have the following:
    install directory set to C:\msys64\mingw64[/li]
C++ compiler is set to g++.exe
[/quote]

Is the project using the compiler you think you are using?

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

Offline ollydbg

  • Developer
  • Lives here!
  • *****
  • Posts: 6034
  • OpenCV and Robotics
    • Chinese OpenCV forum moderator
Re: CB build wiki page
« Reply #8 on: January 04, 2024, 02:59:41 pm »
I use msys2's 64bit gcc(mingw64) everyday, and I don't have such issue. I normally use a 64bit C::B to build the whole workspace.

As stahta01 said, are you using some 32 bit compiler or 32 bit C::B?
If some piece of memory should be reused, turn them to variables (or const variables).
If some piece of operations should be reused, turn them to functions.
If they happened together, then turn them to classes.

Offline Wkerry

  • Multiple posting newcomer
  • *
  • Posts: 64
Re: CB build wiki page
« Reply #9 on: January 05, 2024, 09:45:46 am »
@stahta01 - You hints allowed me to figure out that the page does not include info on the project (CodeBlocks_wx32_64.cbp) does not work if you have a different compiler setup. I changes the project compiler and it worked. The page does not say I need to do this.

@ollydbg I am using 64bit and following the updated instructions on the wiki page and the 13442 CodeBlocks version and the latest MSYS2 Mingw64.

I got CodeBlocks  to build, but the instructions need to be corrected.

The nightly and the one I built are different and I have no idea why. Any ideas?

Offline ollydbg

  • Developer
  • Lives here!
  • *****
  • Posts: 6034
  • OpenCV and Robotics
    • Chinese OpenCV forum moderator
Re: CB build wiki page
« Reply #10 on: January 06, 2024, 03:32:02 am »
The nightly and the one I built are different and I have no idea why. Any ideas?
Sorry, I don't understand what is the difference. Can you explain it? Also, it looks like you already build your own C::B from "src/CodeBlocks_wx32_64.workspace", what's remaining issue?
If some piece of memory should be reused, turn them to variables (or const variables).
If some piece of operations should be reused, turn them to functions.
If they happened together, then turn them to classes.

Offline Wkerry

  • Multiple posting newcomer
  • *
  • Posts: 64
Re: CB build wiki page
« Reply #11 on: January 07, 2024, 07:15:48 am »
The CodeBlocks_wx32_64.cbp did not build all of the plugins. Should I be using the CodeBlocks_wx32_64.workspace? The build page does not reference the CodeBlocks_wx32_64.workspace file.

Offline ollydbg

  • Developer
  • Lives here!
  • *****
  • Posts: 6034
  • OpenCV and Robotics
    • Chinese OpenCV forum moderator
Re: CB build wiki page
« Reply #12 on: January 07, 2024, 08:12:55 am »
The CodeBlocks_wx32_64.cbp did not build all of the plugins. Should I be using the CodeBlocks_wx32_64.workspace?

Yes. CodeBlocks_wx32_64.cbp only builds the core plugins.

Quote
The build page does not reference the CodeBlocks_wx32_64.workspace file.
This should be added to the wiki page.


EDIT:

Oh, this was mentioned in the wiki page, see here: 4.7 Compile contributed (or your own) plugins
« Last Edit: January 07, 2024, 08:16:47 am by ollydbg »
If some piece of memory should be reused, turn them to variables (or const variables).
If some piece of operations should be reused, turn them to functions.
If they happened together, then turn them to classes.