Warning message while makefile compilation
-
Hi all, First of all I am not exactly sure whether I can post this problem in this forum. If its wrong I am sorry for that. I am delibrately need a solution to this problem. I am trying to create an executable, but when the .pc file converting to .c file I am getting lots of warning message like warning: old-style declaration or incorrect type for: main warning: implicit function declaration: warning: no explicit type given of these 3 lines. Any idea why I am getting these lines? Any configuration issues? What exactly needs to be done to solve these warning messages? I am trying to compile this is new environment. Any kind of suggestion would be helpful. Thanks in advance
-
Hi all, First of all I am not exactly sure whether I can post this problem in this forum. If its wrong I am sorry for that. I am delibrately need a solution to this problem. I am trying to create an executable, but when the .pc file converting to .c file I am getting lots of warning message like warning: old-style declaration or incorrect type for: main warning: implicit function declaration: warning: no explicit type given of these 3 lines. Any idea why I am getting these lines? Any configuration issues? What exactly needs to be done to solve these warning messages? I am trying to compile this is new environment. Any kind of suggestion would be helpful. Thanks in advance
-
I have pasted the code of my make file. Here I am getting the warning message when sampleora.pc file is converted to sampleora.c file.
# Executables built by this makefile PROC=$(ORACLE_HOME)/bin/proc all: sample # Oracle environment setup include $(ORACLE_HOME)/rdbms/lib/env_rdbms.mk # Debug & Development Compiler Flags are below CFLAGS=-g -DSOCKSELECT -DSUN_SRC_COMPAT -I$(ORACLE_HOME)/rdbms/demo # Final Production Compiler Flags are below CFLAGS=-O -DSOCKSELECT -DSUN_SRC_COMPAT -I$(ORACLE_HOME)/rdbms/demo # Link Editor Flags are below (shouldn't need to change anything here) LDFLAGS=-L$(LIBHOME) -L$(ORACLE_HOME)/rdbms/lib -lsocket -lnsl ECHO=$(ORACLE_HOME)/bin/echodo LLIBPSO=`cat $(ORACLE_HOME)/rdbms/lib/psoliblist` FC=f77 COB=cob COBFLAGS=-C IBMCOMP -x COBGNTFLAGS=-C IBMCOMP -u CPLPL=CC LLAIO= # directory that contain oratypes.h and other oci demo program header files INCORASTUFF= -I$(ORACLE_HOME)/rdbms/demo -I$(ORACLE_HOME)/rdbms/public -I. INCLUDE= $(INCORASTUFF) -I # CONFIG = $(ORACLE_HOME)/rdbms/lib/config.o # module to be used for linking with non-deferred option NDFOPT= $(ORACLE_HOME)/rdbms/lib/kpundf.o # flag for linking with non-deferred option (default is deferred mode) NONDEFER=false # libraries for linking oci programs OCILDLIBS=-lclntsh # $(LIBCLIENT) $(DEVTTLIBS) $(LLIBCORE) # object for linking oci programs in Fortran OCIFOR=$(ORACLE_HOME)/rdbms/lib/ocifor.o # object for linking oci programs in Cobol OCICOB=$(ORACLE_HOME)/rdbms/lib/ocicob.o PSOLIBLIST=$(ORACLE_HOME)/rdbms/lib/psoliblist CLEANPSO=rm -f $(PSOLIBLIST); $(GENPSOLIB) PROFLAGS=sqlcheck=semantics userid=/ dbms=v6_char dbms=v7 DEFINE=UNIX DEFINE=SUN_SRC_COMPAT DEFINE=linux EXE=sample OBJS=sample.o sampleora.o sampletcp.o # Rule to compile any program (specify EXE= and OBJS= on command line) build: $(OBJS) $(ECHO) $(CC) $(LDFLAGS) -o $(EXE) $(OBJS) -L$(LIBHOME) -lclntsh # "Shorthand" Rule to compile all the sample program samples: $(SAMPLES) $(SAMPLES): $(MAKE) -f $(ORACLE_HOME)/proc/demo/proc.mk OBJS=$@.o EXE=$@ build # Suffix rules .SUFFIXES: .exe .o .c .pc .pc.c: $(PROC) $(PROFLAGS) iname=$*.pc .pc.o: $(PROC) $(PROFLAGS) iname=$*.pc $(CC) $(CFLAGS) $(SQLPUBLIC) -c $*.c .c.o: $(CC) $(CFLAGS) $(SQLPUBLIC) -c $*.c sample.o: sample.h sampleora.c: sampleora.pc $(PROC) iname=$*.pc $(PROFLAGS) icim: $(OBJS) $(CC) $(LDFLAGS) -o $(EXE) $(OBJS) -L$(LIBHOME) -lclntsh LIBDIR= $(ORACLE_HOME)/proc/li