Ecere SDK/eC Forums • View topic - Cross-compiling in Debian / Ubuntu

Ecere SDK/eC Forums

Ecere Developers Community

Cross-compiling in Debian / Ubuntu

General help: new users, installing the Ecere SDK, using the IDE to compile and run applications.

Cross-compiling in Debian / Ubuntu

Postby redj » Mon Aug 23, 2010 3:20 pm

Now for the cross-compiler stuff.

This is bleeding edge stuff for now so make sure you have the latest tarball. I think the next pre-release will include all this out of the box but if not, at the very least this procedure will work.

Make sure you have a good installation of the SDK (Build & Install SDK in Debian / Ubuntu + 64bit) but use the latest (post with download link) tarball.

Just the commands:

Code: Select all
sudo apt-get install mingw32
sudo apt-get wine
wine cmd
unzip -x
mv bin/ecere*.dll /home/user/.wine/drive_c/windows/system32/


1. You need to install the mingw32 compiler.

Code: Select all
sudo apt-get install mingw32

2. If you want to run the programs you compile with this able compiler, you might want to install wine and go through a quick configuration by running cmd. (Exit command prompt afterwards.)

Code: Select all
sudo apt-get install wine
wine cmd

3. You need windows binaries in-place to easily link and run windows binaries. (Remember to replace /home/user to match your username.)

Code: Select all
unzip -x
mv bin/ecere*.dll /home/user/.wine/drive_c/windows/system32/

4. This new compiler could use a configuration in the IDE.

    a. Applications -> Programming -> Ecere IDE
    b. File -> Global Settings
    c. Compilers
    d. Duplicate the default compiler
    e. Name it mingw32
    e. In Toolchain
      e.1. replace cpp by i586-mingw32msvc-cpp
      e.2. replace gcc by i586-mingw32msvc-gcc
    f. In Libraries, Add the following directories (Remember to change /home/user to match your username.) (The order is important here.)
    Code: Select all

    g. Ok

5. Let's try this new compiler.

    a. Open a sample. (Project -> Open / CTRL+SHIFT+O)
    b. Select the mingw32 compiler. (Project -> Active Compiler)
    c. Build the sample! (Project -> Build / F7)
    d. Test this new windows executable.
    Code: Select all
    wine obj/helloWorld.debug.mingw32.win32/HelloWorld.exe
    wine obj/helloForm.debug.mingw32.win32/HelloForm.exe

That's it for now!


PS: This has been tested in Debian 5.0 and Ubuntu 9.10 / 10.04 (both 32 and 64 bit).
(with 64 bit linux, produced windows binaries are 32 bit)
PS: Feedback for all platforms is welcome.
Posts: 107
Joined: Sun Jan 17, 2010 10:03 am

Return to General Help

Who is online

Users browsing this forum: No registered users and 2 guests