This is the mail archive of the ecos-discuss@sourceware.org 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]
Other format: [Raw text]

Simple compile


Hello everyone
I am new to ecos and am trying to compile a simple program that uses the
sleep function
My code include <unistd.h> but when I compile i get this error

hello.cpp:34: error: âsleepâ was not declared in this scope

I am compiling using the following command

arm-eabi-g++ -c -I ../DevBoardFast_install/include/ -I
/opt/ecos/ecos-3.0/packages/isoinfra/v3_0/include/  -Wall -Wpointer-arith
-Wstrict-prototypes -Wundef -Woverloaded-virtual -Wno-write-strings
-mcpu=cortex-m3 -mthumb -g -O2 -ffunction-sections -fdata-sections -fno-rtti
-fno-exceptions  hello.cpp

The code looks like this

#include <unistd.h>
#include <stdio.h>

int main(int argc, char** argv)
{
    sleep(10);
    printf("Hello main\n");
}

Please tell me why this does not compile

Thanks

Graham
-- 
View this message in context: http://www.nabble.com/Simple-compile-tp22944738p22944738.html
Sent from the Sourceware - ecos-discuss mailing list archive at Nabble.com.


--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss


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