[ECOS] Simple compile

grahamlab graham.labdon@cranems.co.uk
Wed Apr 8 08:33:00 GMT 2009


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



More information about the Ecos-discuss mailing list