C header files--Urgent

G

ginnisharma1

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!
 
R

Robert Gamble

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
 
W

Walter Roberson

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.
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.
 
K

Keith Thompson

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).
 
N

Nick Keighley

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...

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

oh dear...
 
R

Roberto Waltman

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.
 
C

Chang Feng

Nick Keighley said:
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.
 
S

Skarmander

Nick said:
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.
 
R

Rod Pemberton

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,997
Messages
2,570,240
Members
46,830
Latest member
HeleneMull

Latest Threads

Top