Results 1 to 3 of 3

Thread: How to execute a c++ prog

  1. #1
    Junior Member
    Join Date
    Nov 2007
    Answers
    5

    Thumbs up How to execute a c++ prog

    How to execute a c++ prog in linux environment by using make ?


  2. #2
    Contributing Member
    Join Date
    Oct 2007
    Answers
    88

    Smile Re: How to execute a c++ prog

    Quote Originally Posted by dgopinath_1974 View Post
    How to execute a c++ prog in linux environment by using make ?
    # export CC=gcc32
    # export CPP=g++32
    # ./configure

    Please note, it only worked for me when I used CXX (C++ compiler) instead of CPP (pre-processor).


  3. #3
    Junior Member
    Join Date
    Nov 2007
    Answers
    2

    Re: How to execute a c++ prog

    Hi,

    c++ programs compiled using GCC.

    Make is build script to create an executable/shared library

    For More info "http://www.gnu.org/software/make/"

    http://www.gnu.org/software/make/manual/make.html

    http://gcc.gnu.org/

    # The following lines are required because standard make does not
    # recognize the Objective-C .m suffix.

    .SUFFIXES: .o .m
    .m.o:
    $(CC) -c $(CFLAGS) $<


    # Macros

    CC = gcc
    CFLAGS = -g
    LIBS = -lobjc




    # Explicit rule

    hist: $(OBJ)
    $(CC) $(CFLAGS) -o main main.c


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
About us
Applying for a job can be a stressful and frustrating experience, especially for someone who has never done it before. Considering that you are competing for the position with a at least a dozen other applicants, it is imperative that you thoroughly prepare for the job interview, in order to stand a good chance of getting hired. That's where GeekInterview can help.
Interact