CompilerTrail Index | More | Compiler We are using the GCC compiler suite. Check installation on your machine using rpm -qa | grep gcc A typical compile only command is g++ -c <filename>.cc where ' A typical link command would then be g++ <filename>.o -o <filename> Here the ' You may have to set the executable file permissions to executable yourself: chmod ugo+x <filename> You can issue man chmod to see the man-page of the chmod command. Producing the executable from the source in one compile and link step would be g++ <filename>.cc -o <filename> To run your program, you should be able to simply type ./<filename> assuming this is your executable from the previous step. The compile command can get more sophisticated... For example g++ -g -O3 -mcpu=i686 -funroll-loops -Wall -fno-implicit-templates //
-Weffc++ -Wold-style-cas <filename-1>.c .... <filename-n>.c //
<filename-1>.o ..... <filename-n>.o -I ../linux-gpib/include //
-L../linux-gpib/ /lib -lgpib -lfl -L$(CERNLIB) -lpacklib -l$(LIBF77) //
-lnsl -L $(STDLIBS) -lm
Here, we specifiy paths to non-standard include files with ' We also use system variables, where the compilation will only work if 'CERNLIB' and 'LIBF77" are defined to point to paths where the appropriate files may be found. Also, various compiler and linker switch options are set. The ' The ' More info from info gcc < Makefiles | Trail Index | Conclusion > |