Author Topic: How to set target for linux?  (Read 2329 times)

Offline typicalc

  • Multiple posting newcomer
  • *
  • Posts: 18
How to set target for linux?
« on: May 24, 2016, 04:27:36 pm »
I've created a small C exe that I've run on Windows 7 command prompt. No errors or warnings.
It has no Windows features, inludes or libraries - just plain C.

Now I'd like to create a Linux exe from same source. How do I select target exe to be "native" linux? Currently my Build->Select targe has only "Debug" and Release".

I'm planning on creating an exe for Raspberry Pi with linux distro but compile & link it on a Windows 7 computer. I copy the resulting exe to the Rasberry SSD and run it there as a console app.

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: How to set target for linux?
« Reply #1 on: May 24, 2016, 07:07:07 pm »
I'm planning on creating an exe for Raspberry Pi with linux distro but compile & link it on a Windows 7 computer. I copy the resulting exe to the Rasberry SSD and run it there as a console app.
The first problem you need to solve is finding a compiler that can work on windows and build for arm-linux. The official name for this is cross compiling.
After that you can think how to setup the project in codeblocks.

Have you solved this problem?
(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!]

Offline typicalc

  • Multiple posting newcomer
  • *
  • Posts: 18
Re: How to set target for linux?
« Reply #2 on: May 24, 2016, 09:18:39 pm »
Ok.  I'll have to move the source files over to Raspberry and use GCC over there to compile and link.
Thank you for the time.