User forums > Using Code::Blocks

How to set target for linux?

(1/1)

typicalc:
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.

oBFusCATed:

--- Quote from: typicalc on May 24, 2016, 04:27:36 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.

--- End quote ---
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?

typicalc:
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.

Navigation

[0] Message Index

Go to full version