7 Replies - 3559 Views - Last Post: 18 July 2008 - 02:56 AM Rate Topic: -----

#1 polymath  Icon User is offline

  • D.I.C Addict
  • member icon

Reputation: 52
  • View blog
  • Posts: 670
  • Joined: 04-April 08

Code::Blocks Compiler question

Posted 16 July 2008 - 10:21 AM

I am just starting to try Code::Blocks after using Dev-C++ and MSVC++, and I was wondering if I can set Code::Blocks to build for a platform other than that which I am using (WinXP), since my friend uses ubuntu all the time and I wanted to share my finished projects with him. Any help is appreciated.
Is This A Good Question/Topic? 0
  • +

Replies To: Code::Blocks Compiler question

#2 Amadeus  Icon User is offline

  • g+ + -o drink whiskey.cpp
  • member icon

Reputation: 248
  • View blog
  • Posts: 13,506
  • Joined: 12-July 02

Re: Code::Blocks Compiler question

Posted 16 July 2008 - 10:47 AM

The problem is not so much that Code::Blocks cannot be used for linux platforms (it can), but in the fact that the projects created on a windows system end up as an exe file. exe files will not run natively on linux, but you can use something like Wine to run it.

You can certainly write code using code::Blocks (or any IDE) that will run on Linux - you just have to adhere to standards and avoid platform dependencies. you'd also have to recompile the code in question on the linux platform.
Was This Post Helpful? 0
  • +
  • -

#3 polymath  Icon User is offline

  • D.I.C Addict
  • member icon

Reputation: 52
  • View blog
  • Posts: 670
  • Joined: 04-April 08

Re: Code::Blocks Compiler question

Posted 16 July 2008 - 10:51 AM

So I cannot compile directly on windows for linux, but if i download a second port of an IDE for Linux on a dual boot or sommat then I can compile for both (I just have to compile, restart, and compile again)? I'm not great with platform stuff...
Was This Post Helpful? 0
  • +
  • -

#4 gabehabe  Icon User is offline

  • GabehabeSwamp
  • member icon




Reputation: 1382
  • View blog
  • Posts: 10,962
  • Joined: 06-February 08

Re: Code::Blocks Compiler question

Posted 16 July 2008 - 11:25 AM

The way that I make gpe files for my GP2X is to compile them into an exe, and then run that exe through a converter, using different linker settings to make that exe into a gpe.

Screwed if I know how it works though...

Edit:
All I know is it runs stuff like -lgp2x as linker settings.
Was This Post Helpful? 0
  • +
  • -

#5 Amadeus  Icon User is offline

  • g+ + -o drink whiskey.cpp
  • member icon

Reputation: 248
  • View blog
  • Posts: 13,506
  • Joined: 12-July 02

Re: Code::Blocks Compiler question

Posted 16 July 2008 - 12:17 PM

@polymath: Correct, although you may not need to download another IDE. Most linux systems inherently have the gcc compiler on them for use, and since you would have already done all the design on the windows system, you'd probably only need to compile and run on linux.

Of course, the other option is to use something like Wine to run the executable from Windows directly.
Was This Post Helpful? 0
  • +
  • -

#6 MorphiusFaydal  Icon User is offline

  • D.I.C Lover
  • member icon

Reputation: 43
  • View blog
  • Posts: 1,376
  • Joined: 12-May 05

Re: Code::Blocks Compiler question

Posted 16 July 2008 - 03:11 PM

If you look around on the Code::Blocks forums, there's a couple threads over there about how to set up cross-compiling... Not sure if you can do it on a Windows box, because I think they were setting up a new build of GCC on a linux box to compile for ARM or something like that...
Was This Post Helpful? 0
  • +
  • -

#7 gabehabe  Icon User is offline

  • GabehabeSwamp
  • member icon




Reputation: 1382
  • View blog
  • Posts: 10,962
  • Joined: 06-February 08

Re: Code::Blocks Compiler question

Posted 16 July 2008 - 03:49 PM

I'll look into it and see if I can tweak the settings a little tomorrow, the GP2X runs on a port of Linux anyway.

But I work with Dev-CPP when I'm making gpe programs.

Anyway, I'll keep you posted.
Was This Post Helpful? 0
  • +
  • -

#8 gabehabe  Icon User is offline

  • GabehabeSwamp
  • member icon




Reputation: 1382
  • View blog
  • Posts: 10,962
  • Joined: 06-February 08

Re: Code::Blocks Compiler question

Posted 18 July 2008 - 02:56 AM

OK, I've found a detailed tutorial:

http://forums.codebl...hp?topic=3343.0

It's even on the Code::Blocks website :)

Good luck!

Edit:Crap, I retract that. It's for compiling Windows programs under Linux.

Another edit: Try this:
http://metamod-p.sou....for.linux.html
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1