Connecting Tech Pros Worldwide Help | Site Map

make files

 
LinkBack Thread Tools Search this Thread
  #1  
Old January 5th, 2007, 08:15 AM
newbai
Guest
 
Posts: n/a
Default make files

I have a query.Hope someone can help me in this!!!
A c++ code consists of include statements,main(),function defination
..now I want to make separte files.I mean the first file will be of only
include statements.The secand of funciton defination and third of
main().but I dont know how to make them?how do you name them??
can someone explain me with a simple example?
please be fast!!!thanks


  #2  
Old January 5th, 2007, 09:05 AM
Ondra Holub
Guest
 
Posts: n/a
Default Re: make files

newbai napsal:
Quote:
I have a query.Hope someone can help me in this!!!
A c++ code consists of include statements,main(),function defination
.now I want to make separte files.I mean the first file will be of only
include statements.The secand of funciton defination and third of
main().but I dont know how to make them?how do you name them??
can someone explain me with a simple example?
please be fast!!!thanks
You can name your files as you want. Usualy exist some project or
company naming conventions. For C sources are usually used files with
..c extension. For C++ sources is typically used one of .cpp, .cc, .C
extension. For header files is used .h extension, sometimes is used for
C++ headers .hpp or .hh or .H.

There is no standard requirement how to name file with main (as for
example in java). one of the typical way is to place main function in
file main.cpp. Sometimes is the main function placed in file with the
same name as project.

It is important to use correct upper/lower case letters in #include
files, beacuse in some operating systems are used such filesystems,
where file header.h is different from Header.h.

Syntax of Makefile depends on which make are you using. It is compiler
(or better make) specific. Gnu make is not 100% compatible with
Microsoft nmake and it is not compatible with borland make (and of
course vice versa).

  #3  
Old January 5th, 2007, 12:15 PM
jussij@zeusedit.com
Guest
 
Posts: n/a
Default Re: make files

newbai wrote:
Quote:
can someone explain me with a simple example?
Here are some make file tutorials:

http://www.zeusedit.com/forum/viewtopic.php?t=300

Jussi Jumpanen
http://www.zeusedit.com

 

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Popular Articles

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over 220,662 network members.