Hi:
I think you're using that in the vxWorks shell,
in the st.cmd.
As Dirk wrote, O_CREAT is a #define for the C/C++ preprocessor.
It's not available in the vxWorks shell.
In the vxWorks shell you'll have to use the numeric value 0, 1, ...
that you determine from the #include file, something like this:
fgrep -r O_CREAT /usr/include/*
/usr/include/sys/fcntl.h:#define O_CREAT 0x0200 /* create if nonexistant
*/
-Kay
On 3/9/12 09:22 , "Dirk Zimoch" <[email protected]> wrote:
>ÕÅÓñÁÁ wrote:
>> Hello,
>>
>> I tried to open a file on my linux host machine via vxworks function
>>open("filename", O_CREAT|O_WRONLY, 0644) from target ME5100. When I run
>>the start file st.cmd ,it printed "undefined symbol: O_CREAT". Which
>>supprot should add to the vxworks kernel image?
>>
>> Thank you in advance!
>>
>> Zhang Yuliang
>> Insititute of High Energy Physics
>
>O_CREAT is a macro that should be defined when you #include <fcntl.h>.
>
>Didn't you get any compiler warnings? They are often more useful than
>errors from the loader.
>
>Didn't you have any problems with O_WRONLY? O_CREAT and O_WRONLY are
>defined in the same file!
>
>Dirk
- Replies:
- Re: undefined symbol: O_CREAT Dirk Zimoch
- References:
- Re: undefined symbol: O_CREAT Dirk Zimoch
- Navigate by Date:
- Prev:
Re: undefined symbol: O_CREAT Dirk Zimoch
- Next:
Invitation to test cothread.catools release candidate michael.abbott
- Index:
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
<2012>
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
- Navigate by Thread:
- Prev:
Re: undefined symbol: O_CREAT Dirk Zimoch
- Next:
Re: undefined symbol: O_CREAT Dirk Zimoch
- Index:
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
<2012>
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
|