compiling a program that is splitted in several files with gcc

This is a discussion on compiling a program that is splitted in several files with gcc within the C Programming forums, part of the General Programming Boards category; i'm trying to compile cpp but it's split in several files and i don't know how to compile several files ...

  1. #1
    anguished incognito54's Avatar
    Join Date
    Apr 2004
    Posts
    24

    compiling a program that is splitted in several files with gcc

    i'm trying to compile cpp but it's split in several files and i don't know how to compile several files in one program...
    can someone help plz?
    I've never felt the nausea of longing to feel nothing,
    I never wanted to cease to exist, just disappear...

  2. #2
    Ultraviolence Connoisseur
    Join Date
    Mar 2004
    Posts
    520
    using gcc -c -g

  3. #3
    End Of Line Hammer's Avatar
    Join Date
    Apr 2002
    Posts
    6,231
    One example:

    gcc -o myprog.exe source.1 source2.c source3.s
    When all else fails, read the instructions.
    If you're posting code, use code tags: [code] /* insert code here */ [/code]

  4. #4
    End Of Line Hammer's Avatar
    Join Date
    Apr 2002
    Posts
    6,231
    >>instead of "#include" i want to use something else...
    Why ?
    When all else fails, read the instructions.
    If you're posting code, use code tags: [code] /* insert code here */ [/code]

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. GCC: Compiling with both static and shared libraries
    By eatwithaspork in forum C Programming
    Replies: 4
    Last Post: 06-23-2008, 02:48 PM
  2. Program Deployment and DLL/OCX Files?
    By dfghjk in forum C++ Programming
    Replies: 5
    Last Post: 06-16-2008, 03:47 AM
  3. Problem compiling files that store functions
    By tiachopvutru in forum C++ Programming
    Replies: 10
    Last Post: 05-30-2008, 06:42 PM
  4. added start menu crashes game
    By avgprogamerjoe in forum Game Programming
    Replies: 6
    Last Post: 08-29-2007, 02:30 PM
  5. Help on renaming files using a C program
    By sangken in forum C Programming
    Replies: 21
    Last Post: 08-03-2006, 06:30 PM

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