By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
428,558 Members | 1,607 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 428,558 IT Pros & Developers. It's quick & easy.

C header files--Urgent

P: n/a
Hi All,

I am very new to C language and I got really big assignment in my
work.I am wondering if anyone can help me.........I need to port
compiler from unix to windows and compiler is written partially in c
and partially in fortran. I guess i need to change host specific files
to make it working. I wonder if standard header files are going to
change in this case.my current windows compiler doesn't have
sys/resource.h but unix compiler does. shud i create one or talk to my
vendor about missing header file or i need to do some work around for
that part.

Also plz explain concept of header files in little details..........
Thanks!

Apr 11 '06 #1
Share this Question
Share on Google+
8 Replies


P: n/a
gi**********@gmail.com wrote:
Hi All,

I am very new to C language and I got really big assignment in my
work.I am wondering if anyone can help me.........I need to port
compiler from unix to windows and compiler is written partially in c
and partially in fortran. I guess i need to change host specific files
to make it working. I wonder if standard header files are going to
change in this case.my current windows compiler doesn't have
sys/resource.h but unix compiler does. shud i create one or talk to my
vendor about missing header file or i need to do some work around for
that part.
sys/resource.h is not a Standard header so it is off-topic here.
Unless your vendor advertises the availablity of this header I doubt
they will be very responsive to your request. If resource.h declares
functions that are not implemented by your system it would do little
good to simply recreate the header on your target system. You might
want to look for an implementation for your target platform that does
provide the needed functions, otherwise you will probably need to
identify the ones it doesn't provide and write them yourself. If you
can identify the functionality that you need you may have better luck
in in group dedicated to windows programming.
Also plz explain concept of header files in little details..........


Hmm, you may be in over your head here...

Robert Gamble

Apr 11 '06 #2

P: n/a
In article <11**********************@g10g2000cwb.googlegroups .com>,
gi**********@gmail.com <gi**********@gmail.com> wrote:
I am very new to C language and I got really big assignment in my
work.
"really big assignments" usually come along with reasonable timeframes
in which to research the technologies involved. They may be
time-sensitive, but not "Urgent".

If you have a "big assignment" that is also "Urgent" then
it is within your capabilities (that is, you have a reasonable
chance of success) -- or else it is not within your capabilities,
in which case it is not a "really big assignment" but rather
an "impossible assignment" for you. Which might make it urgent
for you, but not for -us-.

"really big assignment" together with not knowing fundamentals
of what you have to do tends to suggest either (1) homework; or
(2) that you volunteered for something over your head.

I am wondering if anyone can help me.........I need to port
compiler from unix to windows and compiler is written partially in c
and partially in fortran. I guess i need to change host specific files
to make it working.
And possibly *many* other things as well, depending on how portable
to software was in the first place. It might not even be possible
in the new system, as some capabilities the original system had
might not be present in the new one and it might not be practical
to implement them. And it might not be possible on the new system to
link routines from the supplied C compiler with routines from
the supplied Fortran compiler.

I wonder if standard header files are going to
change in this case.
Not in the way you mean. If they are standard header files then
they do whatever implementation magic is necessary to import
the standard functionality. The implementation magic varies from
system to system and even version to version, but the thing
about *standard* header files is that the functionality they
import is *standard* -- the same functionality on each system.
You don't care what the header files look like (they are not
necessarily even text files), you only care what functionality they
alow you.
my current windows compiler doesn't have
sys/resource.h but unix compiler does. shud i create one or talk to my
vendor about missing header file or i need to do some work around for
that part.
sys/resource.h is not a "standard header file" in any version of
the C language standard. It might be part of some -other- standard,
but not part of the -C- standard. Therefore you should not talk
talk to your vendor about the "missing header file" because it is
not "missing": it is simply not functionality that the second
operating system (Windows) happens to have. If your program depends
on that functionality, you are going to have to find a work around
or disable that part of the program or give up the project.

<off topic>
In some Unix systems, sys/resource.h is used to examine or
set resource limits (such as the maximum stack size). There is
no real need to -reduce- your resources for a compiler, and
the way that Windows controls resource limits is different enough
from Unix's that you would likely want some completely different
way of increasing the resources... modifying the "properties" of
the executable for example.
</off topic>

Also plz explain concept of header files in little details..........


Read any C manual. Read the comp.lang.c FAQ. Read the C language
standards themselves.
--
"It is important to remember that when it comes to law, computers
never make copies, only human beings make copies. Computers are given
commands, not permission. Only people can be given permission."
-- Brad Templeton
Apr 11 '06 #3

P: n/a
ro******@ibd.nrc-cnrc.gc.ca (Walter Roberson) writes:
In article <11**********************@g10g2000cwb.googlegroups .com>,
gi**********@gmail.com <gi**********@gmail.com> wrote:

[...]
Also plz explain concept of header files in little details..........


Read any C manual. Read the comp.lang.c FAQ. Read the C language
standards themselves.


Read K&R2 (Kernighan & Ritchie, _The C Programming Language_, 2nd Edition).

--
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.
Apr 11 '06 #4

P: n/a
gi**********@gmail.com wrote:
I am very new to C language and I got really big assignment in my
work.I am wondering if anyone can help me.........I need to port
compiler from unix to windows and compiler is written partially in c
and partially in fortran.
wow. I think you need to go back and talk to your boss. This is a tough

assignment, probably for anyone. For someone with your level of
knowledge it sails close to the "impossible" region of the problem
space.

If you work for a commercial orgainisation perhaps an experienced
software engineer should be brought in from another part of your
organisation to review this project. It sounds like an excellent way to

spend a lot of money for no net result.

I'm not trying to be rude about you abilities but it seems clear you
know
little of C or programming in general or have the skills to rapidly
bootstrap
yourself into a new technology.

Still if it does sound like fun...

<snip>
Also plz explain concept of header files in little details..........


oh dear...
--
Nick Keighley

My god it's full of stars!
Dave Bowman, on seeing HAL's source code

Apr 11 '06 #5

P: n/a
<gi**********@gmail.com> wrote:
Hi All,

I am very new to C language and I got really big assignment in my
work.I am wondering if anyone can help me.........I need to port
compiler from unix to windows and compiler is written partially in c
and partially in fortran. I guess i need to change host specific files
to make it working. I wonder if standard header files are going to
change in this case.my current windows compiler doesn't have
sys/resource.h but unix compiler does. shud i create one or talk to my
vendor about missing header file or i need to do some work around for
that part.

Also plz explain concept of header files in little details..........
I am sorry, but you questions tell very clearly that this assignment
is well above you current skills. You sound like this, (from a
previous post of mine to comp.arch.embedded):
--------------------------------------- Hi group!! I'm a surgeon and will
be performing open chest surgery
on one of my patients tomorrow.
I have a few questions:
What is an hemorrhage, when do
you use it?
What is a suture?
What is coagulation,
What is an antibiotic?
What is anesthesia, do you implant
it before or after the coagulation?
Where exactly is the heart?
Can you help me? Please email
the answer directly to the
operating room.

Yes, I am exaggerating.
No, I am not exaggerating a lot.---------------------------------------


I suggest to go back to your managers and request that they assign
somebody else to work together with you, somebody with more experience
on both the language and the target environment, or that they provide
you with adequate training before tackling the job.

Apr 11 '06 #6

P: n/a

"Nick Keighley" <ni******************@hotmail.com>
??????:11*********************@t31g2000cwb.googleg roups.com...
gi**********@gmail.com wrote:
I am very new to C language and I got really big assignment in my
work.I am wondering if anyone can help me.........I need to port
compiler from unix to windows and compiler is written partially in c
and partially in fortran.
wow. I think you need to go back and talk to your boss. This is a tough


I think so. If can not finished it on time,you'd better
to tell your boss. Oherwise, you may delay the schedule
of the whole project.
assignment, probably for anyone. For someone with your level of
knowledge it sails close to the "impossible" region of the problem
space.

If you work for a commercial orgainisation perhaps an experienced
software engineer should be brought in from another part of your
organisation to review this project. It sounds like an excellent way to

spend a lot of money for no net result.

I'm not trying to be rude about you abilities but it seems clear you
know
little of C or programming in general or have the skills to rapidly
bootstrap
yourself into a new technology.

Still if it does sound like fun...

<snip>
Also plz explain concept of header files in little details..........


oh dear...
--
Nick Keighley

My god it's full of stars!
Dave Bowman, on seeing HAL's source code

Apr 11 '06 #7

P: n/a
Nick Keighley wrote:
gi**********@gmail.com wrote:
I am very new to C language and I got really big assignment in my
work.I am wondering if anyone can help me.........I need to port
compiler from unix to windows and compiler is written partially in c
and partially in fortran.


wow. I think you need to go back and talk to your boss. This is a tough

assignment, probably for anyone. For someone with your level of
knowledge it sails close to the "impossible" region of the problem
space.

Nah. Just recompile under Cygwin.

Well, it might work.

OK, probably not. But it's worth a shot.

S.
Apr 11 '06 #8

P: n/a

<gi**********@gmail.com> wrote in message
news:11**********************@g10g2000cwb.googlegr oups.com...
Hi All,

I am very new to C language and I got really big assignment in my
work.I am wondering if anyone can help me.........I need to port
compiler from unix to windows and compiler is written partially in c
and partially in fortran. I guess i need to change host specific files
to make it working. I wonder if standard header files are going to
change in this case.my current windows compiler doesn't have
sys/resource.h but unix compiler does. shud i create one or talk to my
vendor about missing header file or i need to do some work around for
that part.


http://en.wikipedia.org/wiki/Snipe_hunt

Apr 11 '06 #9

This discussion thread is closed

Replies have been disabled for this discussion.