468,512 Members | 1,413 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,512 developers. It's quick & easy.

Compiling Programs contains Xutility calls

How can I compile that program under Solaris 8 using gcc and what
header files will be used ?
main()
{
/* Define default values: */

int n = 0;
float x = 0.0;

/* Define contents of dialog window */

create_int_dialog_entry("n", &n);
create_float_dialog_entry("x", &x);

/* Create window with name "Setup" and top-left corner at (0,0) */

set_up_dialog("Setup", 0, 0);

/* Display the window and read the results */

read_dialog_window();

/* Print out the new values */

printf("n = %d, x = %f\n", n, x);
}

Jul 16 '06 #1
13 4402
eh**********@gmail.com wrote:
How can I compile that program under Solaris 8 using gcc and what
header files will be used ?
I suggest you read the manual or documentation for Xutility.
>
main()
That's not the correct form of main, it returns int.

--
Ian Collins.
Jul 16 '06 #2
Ian Collins said:
eh**********@gmail.com wrote:
>How can I compile that program under Solaris 8 using gcc and what
header files will be used ?
I suggest you read the manual or documentation for Xutility.
>>
main()

That's not the correct form of main, it returns int.
To be more precise, it's correct in K&R C and C90 (where the int return type
is implicit). It is indeed incorrect in C99.

--
Richard Heathfield
"Usenet is a strange place" - dmr 29/7/1999
http://www.cpax.org.uk
email: rjh at above domain (but drop the www, obviously)
Jul 16 '06 #3
Where can I download the header file xutility.h for compiling a C
program ?

Jul 16 '06 #4
eh**********@gmail.com wrote:
Where can I download the header file xutility.h for compiling a C
program ?
Have you searched for it?

--
Ian Collins.
Jul 16 '06 #5
eh**********@gmail.com writes:
Where can I download the header file xutility.h for compiling a C
program ?
Downloading just a header file is seldom useful. You need the version
of the header that's appropriate for your system, and you need the
code that implements whatever the header declares.

The header file is likely to be part of some software package, and you
need the whole thing.

A Google search shows several different things called "xutility"; I
don't know which one you're looking for.

--
Keith Thompson (The_Other_Keith) ks***@mib.org <http://www.ghoti.net/~kst>
San Diego Supercomputer Center <* <http://users.sdsc.edu/~kst>
We must do something. This is something. Therefore, we must do this.
Jul 16 '06 #6
I need the header file xutility.h for unix compilation using gcc.

Jul 16 '06 #7
Any way I can find xutility.h for Visual C .

Jul 16 '06 #8
eh**********@gmail.com writes:
I need the header file xutility.h for unix compilation using gcc.
This is in the FAQ.

10.11: I seem to be missing the system header file <sgtty.h>.
Can someone send me a copy?

A: Standard headers exist in part so that definitions appropriate
to your compiler, operating system, and processor can be
supplied. You cannot just pick up a copy of someone else's
header file and expect it to work, unless that person is using
exactly the same environment. Ask your compiler vendor why the
file was not provided (or to send a replacement copy).
--
Peter Seebach on C99:
"[F]or the most part, features were added, not removed. This sounds
great until you try to carry a full-sized printout of the standard
around for a day."
Jul 16 '06 #9
eh**********@gmail.com writes:
I need the header file xutility.h for unix compilation using gcc.
In my previous respone, which you didn't quote, I wrote:

| Downloading just a header file is seldom useful. You need the version
| of the header that's appropriate for your system, and you need the
| code that implements whatever the header declares.
|
| The header file is likely to be part of some software package, and you
| need the whole thing.
|
| A Google search shows several different things called "xutility"; I
| don't know which one you're looking for.

I still don't know what you're looking for. If you told us exactly
what version of gcc, what variant of Unix, and what hardware you're
using, I *still* wouldn't know what you're looking for.

xutility.h must be part of some software package. You need to find
and install that package; even if you could find the single file
"xutility.h", it almost certainly wouldn't do you any good.

As Ben Pfaff pointed out (and I should have thought to mention
myself), this is also question 10.11 in the comp.lang.c FAQ,
<http://www.c-faq.com>.

--
Keith Thompson (The_Other_Keith) ks***@mib.org <http://www.ghoti.net/~kst>
San Diego Supercomputer Center <* <http://users.sdsc.edu/~kst>
We must do something. This is something. Therefore, we must do this.
Jul 16 '06 #10
eh**********@gmail.com wrote:
How can I compile that program under Solaris 8 using gcc and what
header files will be used ?
main()
{
/* Define default values: */

int n = 0;
float x = 0.0;

/* Define contents of dialog window */

create_int_dialog_entry("n", &n);
create_float_dialog_entry("x", &x);

/* Create window with name "Setup" and top-left corner at (0,0) */

set_up_dialog("Setup", 0, 0);

/* Display the window and read the results */

read_dialog_window();

/* Print out the new values */

printf("n = %d, x = %f\n", n, x);
}

let me guess... you are following a C tutorial from this site
http://www.physics.drexel.edu/course...tml#dialog-box
that says you need their "xutility" package

The same page links to instructions on how to compile the code
http://www.physics.drexel.edu/course...s/compile.html

"the xutility library... contains (among other things) a set of plotting
functions written by Biao Lu (a former graduate student who left us
in 1994) which form the basis for much of the graphics we will need to do
during the quarter."

In other words, what you need should be somewhere on that site or you have to
contact them directly or follow other tutorials elsewhere.

Is my guess correct?
Jul 17 '06 #11
I wrote:
let me guess... you are following a C tutorial from this site
http://www.physics.drexel.edu/course...tml#dialog-box
or from other sites that plagiarized their tutorial without a clue that it will
not work without the "xutility" library
Jul 17 '06 #12
Yes that is correct ? How can I get that package ?

Jul 17 '06 #13
eh**********@gmail.com writes:
Yes that is correct ? How can I get that package ?
Yes, what is correct? Google Groups now automatically quotes the
previous article when you post a followup; you need to keep enough of
that to provide context. Read <http://cfaj.freeshell.org/google/>.

Your question cannot be answered within the C programming language.
Followups redirected, with comp.lang.c and alt.comp.lang.learn.c-c++
dropped.

You might have better luck contacting the authors of the web page
where you got the code.

--
Keith Thompson (The_Other_Keith) ks***@mib.org <http://www.ghoti.net/~kst>
San Diego Supercomputer Center <* <http://users.sdsc.edu/~kst>
We must do something. This is something. Therefore, we must do this.
Jul 17 '06 #14

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

reply views Thread by A. B., Khalid | last post: by
11 posts views Thread by Carramba | last post: by
reply views Thread by Kirt Loki Dankmyer | last post: by
2 posts views Thread by sterten | last post: by
8 posts views Thread by WebSnozz | last post: by
10 posts views Thread by Tomás Ó hÉilidhe | last post: by
reply views Thread by NPC403 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.