Author Topic: codeblocks on windoze 7  (Read 5832 times)

Offline bootstrap

  • Multiple posting newcomer
  • *
  • Posts: 64
codeblocks on windoze 7
« on: June 26, 2012, 03:48:12 am »
I am finally building my applications again with codeblocks on 64-bit ubuntu 12.04 - yes!

Previous to my winxp64 boot disk crashing a couple weeks ago, I was developing the windoze versions of my applications with Visual Studio 2005 professional.  The time to stop this silliness (two different IDEs) has arrived, so now I need to get codeblocks installed and working on my new 64-bit windoze 7 system.

It appears it is necessary to work with nightly builds for windoze 7, and I prefer to do that anyway, since my ubuntu system is set up to install them automatically at this point.  I read the "how to use a nightly build" message at <http://forums.codeblocks.org/index.php/topic,3232.0.html>. but still have some questions.

Note that I need to build and debug both 32-bit and 64-bit versions of my applications, and that now works fine on my ubuntu linux system (a separate computer --- no dual boot systems here).

#1:  I see a mingw file called "mingw-w64-v2.0.3.tar.gz" on sourceforge that appears [to naive me] to be the current binary release of mingw.  Is this what I need to download and install, given that I need to build both 32-bit and 64-bit applications?  Is this the package that contains the "mingwm10.dll" file that the nightly build message mentions?

#2:  I guess codeblocks itself is always a 32-bit application, and I infer that wxwindows is also a 32-bit library.  So, should I download and install the wxwidgets 2.8.12 download from <http://www.wxwidgets.org/downloads/>?  If so, which file do I download?  There are several separate files with names they are for MAC, OS2 and so forth, but none explicitly labeled for windoze (or linux for that matter).

#3:  Since I don't see a 64-bit version of wxwidgets, does this mean wxwidgets is not appropriate for developing GUIs for 64-bit applications (on both linux and windoze)?

#4:  As a general question, if I ever decide to add any "formal GUI" to any of my applications (not counting "fancy" GUI capabilities I currently generated with my 3D engine), what has the best support for both 32-bit and 64-bit apps on both linux and windoze?  My first guess was GTK+ because I prefer to code C-style (no classes, templates, overloading, other-C++ mechanisms).  Still, the C interface isn't the only important basis for a decision.

Sorry for the stupid questions.

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7252
Re: codeblocks on windoze 7
« Reply #1 on: June 26, 2012, 06:38:59 am »
#1:
I suggest using TDragons MinGW: http://tdm-gcc.tdragon.net/ on windows

#2:
wxWidgets < 2.9 can not be build as 64bit library on windows as far as I know, on linux it is 64bit if you install it from the official repos (e.g. debian, ubuntu or wxWidgets themselves)

#3:
see 2, you might need to switch to wx2.9.3

#4:
I never used gtk+ on windows, so it might be a choice, but I would prefer to use a toolkit, which hides the OS-specific problems and uses as much native controls as possible (like wxWidgets).

Do you really need to create your gui in 64-bit ?
32bit should run on 64bit windows just fine (as C::B does).

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9723
Re: codeblocks on windoze 7
« Reply #2 on: June 26, 2012, 06:47:15 am »
I see a mingw file called "mingw-w64-v2.0.3.tar.gz" on sourceforge that appears [to naive me] to be the current binary release of mingw.
There are many MinGW releases around on sourceforge, w/o a link its hard to tell but I guess this points to the internet installer of MinGW which should allow you to pick the right version on MinGW in the end.

#2:  I guess codeblocks itself is always a 32-bit application, and I infer that wxwindows is also a 32-bit library.
So what? 32bit apps work just fine in 64 bin Windows and allow you to build 32 and 64 bit apps, too. No change needed here.

#3:  Since I don't see a 64-bit version of wxwidgets, does this mean wxwidgets is not appropriate for developing GUIs for 64-bit applications (on both linux and windoze)?
No, surely wxWidgets allows to develop 64 bit apps. However, if you don't find a pre-compiled 64 bit version somewhere you have to do it yourself using a 64 bit compiler. but its easy, you find enough information on that topic here or in the wxWidgets forums.

#4:  As a general question, if I ever decide to add any "formal GUI" to any of my applications (not counting "fancy" GUI capabilities I currently generated with my 3D engine), what has the best support for both 32-bit and 64-bit apps on both linux and windoze?
wxWidgets works just fine, QT is another options, More C#like would be GTK(+), yes. When it comes to a GUI-builder or alike that is helpful under both: Windows and Linux I'd personally prefer wxWidgets or QT over GTK+.
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: https://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: https://wiki.codeblocks.org/index.php?title=FAQ

Offline bootstrap

  • Multiple posting newcomer
  • *
  • Posts: 64
Re: codeblocks on windoze 7
« Reply #3 on: June 26, 2012, 07:21:26 am »
#1:
I suggest using TDragons MinGW: http://tdm-gcc.tdragon.net/ on windows.
Okay, thanks.  I'll look into that more carefully and ask future questions if necessary.

Quote
#2:
wxWidgets < 2.9 can not be build as 64bit library on windows as far as I know, on linux it is 64bit if you install it from the official repos (e.g. debian, ubuntu or wxWidgets themselves).
Okay, thanks for that too!  I guess they are like codeblocks in that their "latest development releases" are "fairly stable" (and certainly "work-with-able").  I am under the impression it can be dangerous to adopt versions of some applications that are newer than the most current "stable release".  Clearly I have no choice in this case, since older releases can't handle 64-bit.

To be clear here.  As far running codeblocks is concerned, downloading the 2.8.12 "binaries" is sufficient (to get the required DLL that codeblocks requires to execute successfully).  But if I want to write applications that have wxwindows-created GUI elements, then I need 2.9.3 or higher.

Quote
#3:
see 2, you might need to switch to wx2.9.3
Understood.

Quote
#4:
I never used gtk+ on windows, so it might be a choice, but I would prefer to use a toolkit, which hides the OS-specific problems and uses as much native controls as possible (like wxWidgets).

Do you really need to create your gui in 64-bit ?
32bit should run on 64bit windows just fine (as C::B does).
One of my applications is a 3D engine.  I have written key elements in SIMD/SSE3/AVX/FMA assembly-language.  Since 32-bit SIMD only supports 8 128-bit SIMD registers, and 64-bit SIMD supports 16 256-bit SIMD registers, my 64-bit routines are MUCH faster (even compared to my 32-bit SIMD assembly-language version).  The difference is significant enough that I'm tempted to let the 32-bit version go obsolete, though I'm worried that someday somebody will want to adopt the engine for mobile apps (in 3~5 years when that hardware may be somewhat faster, and the memory capacity greater).

Two other applications won't even run as 32-bit applications, because they need more than 8GB of data in RAM to run fast enough to be "barely viable".  If I want to glue GUIs onto those applications, a 64-bit capable GUI toolkit would seem to be in order.  That is, unless I decide to implement my own semi-complete GUI system based upon my 3D engine.  That is tempting, but someday I must stop giving myself new projects!

Afterthought:  Unless I'm missing something, the phrase "uses as much native controls as possible" directly contradicts (or tends to contradict) the phrase "hides the OS-specific problems".  In other words, if a widget executes the same code on linux as windoze, its behavior should be more-or-less identical on both systems.  Yes, in both cases the low-level part of the toolset needs to receive mouse-messages, keyboard-messages and other messages in the OS-specific form --- because "that's all there is" on a given platform.  But the widget itself should be more insulated from OS-specific issues, I would think.  Maybe I don't understand your point somehow.
« Last Edit: June 26, 2012, 10:07:12 pm by bootstrap »

Offline bootstrap

  • Multiple posting newcomer
  • *
  • Posts: 64
Re: codeblocks on windoze 7
« Reply #4 on: June 26, 2012, 10:31:14 pm »
I see a mingw file called "mingw-w64-v2.0.3.tar.gz" on sourceforge that appears [to naive me] to be the current binary release of mingw.
There are many MinGW releases around on sourceforge, w/o a link its hard to tell but I guess this points to the internet installer of MinGW which should allow you to pick the right version on MinGW in the end.
I downloaded and installed the TDragon version.  After I finish building wxwidgets_v293 as 32-bit (for codeblocks), which is "in progress" as I write (takes quite a while, apparently), we'll see how this works.

Quote
#2:  I guess codeblocks itself is always a 32-bit application, and I infer that wxwindows is also a 32-bit library.
So what? 32bit apps work just fine in 64 bin Windows and allow you to build 32 and 64 bit apps, too. No change needed here.
I agree.  I didn't mean to imply a 32-bit executable of codeblocks couldn't develop 64-bit applications!  Obviously not, since I'm already building 64-bit apps with codeblocks (on linux).

Quote
#3:  Since I don't see a 64-bit version of wxwidgets, does this mean wxwidgets is not appropriate for developing GUIs for 64-bit applications (on both linux and windoze)?
No, surely wxWidgets allows to develop 64 bit apps. However, if you don't find a pre-compiled 64 bit version somewhere you have to do it yourself using a 64 bit compiler. but its easy, you find enough information on that topic here or in the wxWidgets forums.
Yes, now that I found the v293 version, in theory I can build GUIs for 64-bit apps with wxWidgets.

Quote
#4:  As a general question, if I ever decide to add any "formal GUI" to any of my applications (not counting "fancy" GUI capabilities I currently generated with my 3D engine), what has the best support for both 32-bit and 64-bit apps on both linux and windoze?
wxWidgets works just fine, QT is another options, More C#like would be GTK(+), yes. When it comes to a GUI-builder or alike that is helpful under both: Windows and Linux I'd personally prefer wxWidgets or QT over GTK+.
After reading their website, wxWidgets does seem like a mighty fine solution.  But probably I'll still try GTK+ first, because the bottom line is, C++ drives me totally insane!  I tend to prefer ultimate simplicity, consistency, minimalism in my approaches, and that's not what C++ is.  And hey, I learned to program in C++ first, then backed into C later out of frustration.  It felt like I pulled a bunch of stakes out of my brain!  What a relief that was!  However, I'm not one to claim C is better for others (unless invited to opine), so this is just my personal decision.
« Last Edit: June 28, 2012, 06:01:04 am by bootstrap »