473,387 Members | 1,520 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

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 4680
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: A. B., Khalid | last post by:
Hello all. After the effort of getting most of Python 2.3.4 Final compiled in MinGW (see: http://mail.python.org/pipermail/python-list/2004-June/225967.html, and get the patch and read more...
12
by: jrefactors | last post by:
If the C programs have UNIX system calls such as fork(), alarm(), etc.., we should call it UNIX programs, not traditional C programs? We couldn't compile the programs with system calls using VC++...
11
by: Carramba | last post by:
hi! thanx for taking time to read my post. code #include <stdio.h> int main() { printf("Hello word!"); return 0; }//END when Iam compiling code with gcc I can't start program in winXP by
0
by: Kirt Loki Dankmyer | last post by:
So, I download the latest "stable" tar for perl (5.8.7) and try to compile it on the Solaris 8 (SPARC) box that I administrate. I try all sorts of different switches, but I can't get it to compile....
2
by: sterten | last post by:
I often see scientific programs for Linux written in C which come with several files, are "zipped" with gzip and packked as .tar , they contain a "makefile" and several instructions (and...
8
by: WebSnozz | last post by:
I have an application written in C that does a lot of low level stuff. It does a lot of things like casting from void*'s. I want to create a new GUI for it in either C# or MC++, but reuse the...
10
by: Tomás Ó hÉilidhe | last post by:
I'd post this on a gcc newsgroup but I'd be more productive talking to the wall. Anyway, let's say someone throws some source code at you for a particular program and says, "Just compile it, it...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.