This is the mail archive of the ecos-discuss@sources.redhat.com mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Problem regarding compiling and running the applicatio!!!


>>>>> "Supratim" == Supratim Chakraborty <supratimc@convergelabs.com> writes:

    Supratim>   While compiling the program written in CYGWIN, I am
    Supratim> not able to compile the program.

    Supratim> I path for the kapi.h is as follows

    Supratim> C:/Pc/I386_install/include/cyg/kernel


    Supratim> I have compiled the program by writting the following
    Supratim> lines at command prompt of the cygwin.

    Supratim> gcc -I/C/Pc/I386_install/include

    <snip>
    Supratim> /usr/lib/libcygwin.a(libcmain.o)(.text+0x6a):libcmain.c: undefined reference
    Supratim> to
    Supratim> `WinMain@16'
    Supratim> collect2: ld returned 1 exit status

    Supratim> Please let me know at the earlest what may be the
    Supratim> problem and how to solve it.

I assume you are trying to build eCos for an i386 PC target. You
cannot use the cygwin compiler for this: that compiler generates code
intended to run under Windows, not on top of a bare PC. Amongst many
other problems it will use the wrong image format, PE rather than ELF.

Instead you need to build an i386-elf cross-compiler and use that.
Go to http://sources.redhat.com/ecos/, "Downloading and Installation",
"Installing eCos under Windows", "Intel x86".

Bart


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]