3 edited tags
| link
    Tweeted twitter.com/#!/StackUnix/status/72907833485701121
2 added 24 characters in body; edited title
source | link

why Why would one want to compile multiple .cpp files to the same executable?

Why would you do

g++ -Wall -I/usr/local/include/thrift *.cpp -lthrift -o something

g++ -Wall -I/usr/local/include/thrift *.cpp -lthrift -o something

Insteadinstead of  :

g++ -Wall -I/usr/local/include/thrift -c Something.cpp -o something.o g++ -Wall -I/usr/local/include/thrift -c Something_server.cpp -o server.o g++ -Wall -I/usr/local/include/thrift -c your_thrift_file_constants.cpp -o constants.o g++ -Wall -I/usr/local/include/thrift -c your_thrift_file_types.cpp -o types.o

g++ -Wall -I/usr/local/include/thrift -c Something.cpp -o something.o
g++ -Wall -I/usr/local/include/thrift -c Something_server.cpp -o server.o
g++ -Wall -I/usr/local/include/thrift -c your_thrift_file_constants.cpp -o constants.o
g++ -Wall -I/usr/local/include/thrift -c your_thrift_file_types.cpp -o types.o

and then g++ -L/usr/local/lib -lthrift *.o -o Something_server:

g++ -L/usr/local/lib -lthrift *.o -o Something_server

Am iI right that the first step does essentially the same thing as the second sequence? Also

Also, to make them identical should something be Something_server in the first line?

why would one want to compile multiple .cpp files to the same executable?

Why would you do

g++ -Wall -I/usr/local/include/thrift *.cpp -lthrift -o something

Instead of  :

g++ -Wall -I/usr/local/include/thrift -c Something.cpp -o something.o g++ -Wall -I/usr/local/include/thrift -c Something_server.cpp -o server.o g++ -Wall -I/usr/local/include/thrift -c your_thrift_file_constants.cpp -o constants.o g++ -Wall -I/usr/local/include/thrift -c your_thrift_file_types.cpp -o types.o

and then g++ -L/usr/local/lib -lthrift *.o -o Something_server

Am i right that the first step does essentially the same thing as the second sequence? Also to make them identical should something be Something_server in the first line?

Why would one want to compile multiple .cpp files to the same executable?

Why would you do

g++ -Wall -I/usr/local/include/thrift *.cpp -lthrift -o something

instead of:

g++ -Wall -I/usr/local/include/thrift -c Something.cpp -o something.o
g++ -Wall -I/usr/local/include/thrift -c Something_server.cpp -o server.o
g++ -Wall -I/usr/local/include/thrift -c your_thrift_file_constants.cpp -o constants.o
g++ -Wall -I/usr/local/include/thrift -c your_thrift_file_types.cpp -o types.o

and then:

g++ -L/usr/local/lib -lthrift *.o -o Something_server

Am I right that the first step does essentially the same thing as the second sequence?

Also, to make them identical should something be Something_server in the first line?

1
source | link

why would one want to compile multiple .cpp files to the same executable?

Why would you do

g++ -Wall -I/usr/local/include/thrift *.cpp -lthrift -o something

Instead of :

g++ -Wall -I/usr/local/include/thrift -c Something.cpp -o something.o g++ -Wall -I/usr/local/include/thrift -c Something_server.cpp -o server.o g++ -Wall -I/usr/local/include/thrift -c your_thrift_file_constants.cpp -o constants.o g++ -Wall -I/usr/local/include/thrift -c your_thrift_file_types.cpp -o types.o

and then g++ -L/usr/local/lib -lthrift *.o -o Something_server

Am i right that the first step does essentially the same thing as the second sequence? Also to make them identical should something be Something_server in the first line?