Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

make error #1 1

Status
Not open for further replies.

ptrifile

Technical User
Aug 10, 2004
457
0
0
US
I am completely new to linux and have installed and using Ubuntu 10.04. I am trying to get a shareware scheduling program to work and i have never had experience with "make" anyhow hoping someone can help. I am getting the following error:

Code:
g++ -c -I../i -Wall -W -Wdisabled-optimization -O2 -march=nocona ../s/fsoc_main.cpp
../s/fsoc_main.cpp: In member function ‘bool FSOC::process_args(int, char**)’:
../s/fsoc_main.cpp:117:39: error: ‘strcmp’ was not declared in this scope
../s/fsoc_main.cpp: In member function ‘bool FSOC::initialize()’:
../s/fsoc_main.cpp:224:51: warning: format ‘%u’ expects argument of type ‘unsigned int’, but argument 2 has type ‘std::vector<SCHED_ELEM_SPEC>::size_type {aka long unsigned int}’ [-Wformat]
../s/fsoc_main.cpp: In function ‘int main(int, char**)’:
../s/fsoc_main.cpp:82:24: warning: ignoring return value of ‘int system(const char*)’, declared with attribute warn_unused_result [-Wunused-result]
make: *** [fsoc_main.o] Error 1

the make file is the following:

Code:
COMP=g++

I=../i/
S=../s/

CFLAGS=-c -I../i -Wall -W -Wdisabled-optimization -O2 -march=nocona
#CFLAGS=-c -I../i -Wall -W -Wdisabled-optimization -O3 -DDEBUG
#CFLAGS=-c -I../i -Wall -W -Winline -Wdisabled-optimization -g -DDEBUG


F0 = fsoc_main
F0DEP = $(I)fsoc.h $(I)fsoc_params.h $(I)fsoc_env.h $(I)fsoc_inst.h $(I)fsoc_model.h $(I)fsoc_spec.h $(I)fsoc_rpt.h 

F1 = fsoc_model
F1DEP = $(I)fsoc.h $(I)fsoc_params.h $(I)fsoc_env.h $(I)fsoc_inst.h $(I)fsoc_model.h $(I)fsoc_spec.h $(I)fsoc_rpt.h 

F2 = fsoc_io
F2DEP = $(I)fsoc.h $(I)fsoc_params.h $(I)fsoc_env.h $(I)fsoc_inst.h $(I)fsoc_model.h $(I)fsoc_spec.h $(I)fsoc_rpt.h 


OBJS= $(F0).o $(F1).o $(F2).o



all: fsoc

fsoc: $(OBJS)
	$(COMP) $(OBJS) -o fsoc


$(F0).o: $(S)$(F0).cpp $(F0DEP)
	$(COMP) $(CFLAGS) $(S)$(F0).cpp

$(F1).o: $(S)$(F1).cpp $(F1DEP)
	$(COMP) $(CFLAGS) $(S)$(F1).cpp

$(F2).o: $(S)$(F2).cpp $(F2DEP)
	$(COMP) $(CFLAGS) $(S)$(F2).cpp

can anyone see what the problem may be or be able to help?

Thanks in advance for any suggestions at all.

Paul
 
try adding following line to fsoc_main.cpp and execute make again
#include <string.h>

Considering warnings and errors given by compiler I don't have much confidence in code quality tho
 
monkhandle, thank you SOOO much!!! That worked perfectly and have taken away over a week of just plain frustration! Thanks again!

Paul
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top