Author Topic: Settings for compiling 64 bit  (Read 4216 times)

Offline Newbie0815

  • Multiple posting newcomer
  • *
  • Posts: 61
Settings for compiling 64 bit
« on: May 20, 2010, 05:21:08 pm »
I´ve successfully managed to setup MinGW64/GCC with C:B
But then I fall back to being a bloody newbie.

I´ve clicked "Create a new project", choosen "Win32 GUI project", named it "Test" and simply kept the prewritten C:B "Template Windows App".
I click "Build" and it compiles without error, I´ve started the exe within Windows7 and it shows a nice blank grey window as it should, then I´ve copied the file to another PC running XP 32 bit, where it tells me, "This is not a valid Win32 application".
So far so good, everything seems to work, it seems to be 64 bit, all looking fine, there are only a few things I´m wondering about.

I.e.
Under "Project build options" - "Linker settings" I still find "gdi32", "user32" and "kernel32", where I´m not sure whether those are correct. Should they be replaced with some 64bit version?

Or in short, could anyone tell me, besides the installation of MinGW64 and setting the Toolchain executables (which I´ve set successfully), what else do I have to do, what settings to change, to compile true 64bit applications?

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9694
Re: Settings for compiling 64 bit
« Reply #1 on: May 20, 2010, 05:23:01 pm »
Under "Project build options" - "Linker settings" I still find "gdi32", "user32" and "kernel32", where I´m not sure whether those are correct. Should they be replaced with some 64bit version?
Depends on whether you have the 64bit version of these libraries. I/We cannot tell - it's your compiler framework and your libraries. However, on a 64 bit platform the app should still run just fine if you are linking against these libs.
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 Newbie0815

  • Multiple posting newcomer
  • *
  • Posts: 61
Re: Settings for compiling 64 bit
« Reply #2 on: May 20, 2010, 05:37:56 pm »
Well, I figured it is runnung just fine, I´m just a bit concerned I might make an efford to make 64 bit applications but then the result is still a mixture of 64 and 32 bit, meaning it doesn´t work on a 32bit OS, but on a 64bit OS it still falls back to 32bit operations.

It´s all new to me, so I´m just seeking a bit of a guide for the first steps.

Beginning with the choice of project, where I choose "Win32 GUI application", I´m unsure, whether or not "Win32" actually means "Win64", only that nobody (including M$) bothered renaming folders like "system32" for the 64bit versions.

Maybe anyone here can tell me, whether there are 64bit versions of these libraries in MinGW64 and what filename they have?

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9694
Re: Settings for compiling 64 bit
« Reply #3 on: May 20, 2010, 09:07:40 pm »
Maybe anyone here can tell me, whether there are 64bit versions of these libraries in MinGW64 and what filename they have?
I can't as I don't work on any 64 bit OS. However, I doubt this is within the scope of the Code::Blocks forum as it has nothing to do with the development of Code::Blocks neither the IDE. May a helpful person will answer, but your chances are definitely better in another forum dedicated to e.g. the MinGW compiler suite you are using. They can tell for sure.
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 Newbie0815

  • Multiple posting newcomer
  • *
  • Posts: 61
Re: Settings for compiling 64 bit
« Reply #4 on: May 21, 2010, 10:32:50 am »
Thanks, I´ll try there.