Need Help with Multiple .cpp files.

This is a discussion on Need Help with Multiple .cpp files. within the C++ Programming forums, part of the General Programming Boards category; I wanted to create a mega program which is very large. So i thought of creating multiple .cpp files and ...

  1. #1
    Registered User
    Join Date
    Sep 2011
    Posts
    1

    Need Help with Multiple .cpp files.

    I wanted to create a mega program which is very large. So i thought of creating multiple .cpp files and then interlink them later. but i cant figure out how to go about that. How do i link a .cpp file that contain a funtion which is called in another .cpp file, i.e how do i link a separate program which contains a function with a program in which that funtion is called? Is this even possible?

  2. #2
    C++ Witch laserlight's Avatar
    Join Date
    Oct 2003
    Location
    Singapore
    Posts
    21,935
    Basically, you compile each individual source file and link the resulting source files to form your final executable program.
    C + C++ Compiler: MinGW port of GCC
    Version Control System: Bazaar

    Look up a C++ Reference and learn How To Ask Questions The Smart Way

  3. #3
    Registered User
    Join Date
    May 2011
    Location
    Around 8.3 light-minutes from the Sun
    Posts
    1,866
    Quote Originally Posted by anduril462 View Post
    Now, please, for the love of all things good and holy, think about what you're doing! Don't just run around willy-nilly, coding like a drunk two-year-old....
    Quote Originally Posted by quzah View Post
    ..... Just don't be surprised when I say you aren't using standard C anymore, and as such,are off in your own little universe that I will completely disregard.
    Warning: Some or all of my posted code may be non-standard and as such should not be used and in no case looked at.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. header files and multiple files
    By Dedalus in forum C Programming
    Replies: 5
    Last Post: 06-16-2009, 09:21 AM
  2. Multiple Source Files, make files, scope, include
    By thetinman in forum C++ Programming
    Replies: 13
    Last Post: 11-05-2008, 10:37 PM
  3. Packed Files (Puting multiple files in one file)
    By MrKnights in forum C++ Programming
    Replies: 17
    Last Post: 07-22-2007, 04:21 PM
  4. Multiple .cpp files
    By publikum in forum C++ Programming
    Replies: 16
    Last Post: 08-24-2005, 12:56 PM
  5. Replies: 1
    Last Post: 05-01-2003, 02:52 PM

Tags for this Thread


1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21