EPICS Controls Argonne National Laboratory

Experimental Physics and
Industrial Control System

1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  <20122013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024  Index 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  <20122013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
<== Date ==> <== Thread ==>

Subject: Re: undefined symbol: O_CREAT
From: Dirk Zimoch <[email protected]>
To: "Kasemir, Kay" <[email protected]>
Cc: "[email protected]" <[email protected]>
Date: Fri, 09 Mar 2012 17:27:48 +0100
Kasemir, Kay schrieb:
Hi:

I think you're using that in the vxWorks shell,
in the st.cmd.

Thanks Kay! I completely missed that point. I thought is was a compiled program that failed to load in the st.cmd.

Zhang Yuliang, sorry for my misleading previous mail.

It is an annoying issue with vxWorks that the shell does not know about macros and often the manuals don't mention the numerical values. The only way is then to look up the values in the vxWorks header files.

Dirk


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




References:
Re: undefined symbol: O_CREAT Kasemir, Kay

Navigate by Date:
Prev: Invitation to test cothread.catools release candidate michael.abbott
Next: Here is a Message Szalata, Zenon M.
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  <20122013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: Re: undefined symbol: O_CREAT Kasemir, Kay
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  <20122013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
ANJ, 18 Nov 2013 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·