Member Avatar

Hi I am creating Makefile and it gives me following error Makefile:124: *** unterminated call to function `foreach': missing `)'. Stop. The Makefile around line 124 is .PHONY: popiso popiso: isolinux_cfg $(foreach x,$(_$(country)_pops_roles), pop_iso_$(x)) $(isomedia) @echo $@ @echo @echo allhostname $(allhostname) @echo @echo @echo allnetwork_setup $(allnetwork_setup) @sudo cp $(addsuffix .ks.cfg,$(allhostname)) $(isomedia) @sudo cp isolinux.cfg $(isomedia)/isolinux/ @echo ready to make iso $(_$(country)_pops_roles) gets expanded correctly and it calls pop_iso_XXXX 4 times as it suppose to. And then it gives above mentioned error. I'm using RHEL6 - 64bit machine I'm not that deep into Makefile/Gmake, and so I'm not sure what's the …

Member Avatar
0
27
Member Avatar

Hello I have downloaded a source code written in C. There I found a Makefile file . Can you tell me how to run that "makefile" file from command line ? thank you

Member Avatar
0
16
Member Avatar

hi. i have written a program in c and also a makefile for it but i have a repetitive error: /usr/bin/ld:4.txt: file format not recognized; treating as linker script /usr/bin/ld:4.txt:1: syntax error here is makefile code: CC=gcc test2 : test2.c $(CC) test2.c 4.txt 5.txt 6.txt -I -lpthread -lrt -o test2

Member Avatar
0
14
Member Avatar

When I run my makefile I get this error: ** No rule to make target `videofeatures.cpp', needed by `videofeatures.o'. Stop. Here is my makefile CC = gcc CPP = g++ CFLAGS += BIN_DIR = ../bin INC_DIR = ../include LIB_DIR = ../lib INCL = -I$(INC_DIR) `pkg-config --cflags opencv` LIBS = -L$(LIB_DIR) -lopensift `pkg-config --libs opencv` OBJ = imgfeatures.o videofeatures.o utils.o sift.o kdtree.o minpq.o xform.o BIN = siftfeat match dspfeat vidfeat all: $(BIN) libopensift.a libopensift.a: $(OBJ) ar rc $(LIB_DIR)/$@ $(OBJ) ranlib $(LIB_DIR)/$@ siftfeat: libopensift.a siftfeat.c $(CC) $(CFLAGS) $(INCL) siftfeat.c -o $(BIN_DIR)/$@ $(LIBS) match: libopensift.a match.c $(CC) $(CFLAGS) $(INCL) match.c -o $(BIN_DIR)/$@ $(LIBS) …

Member Avatar
0
12
Member Avatar

I have several files to include from a subfolder and I just can't get this to work. I'm propably missing something here... The Makefile and .cpp with main function are located at /path/to/ and files to be included are at /path/to/src/buffer and /path/to/src/hash. Both of these folders have .cpp and .h for respective class. I've had no problems compiling until I put this whole project together and made a single Makefile for them. Here's my try on the Makefile: objects = delta.o hash.o buffer.o buffer_dir = path/to/src/buffer hash_dir = path/to/src/hash delta: $(objects) g++ -g -o $(objects) delta.o: delta.cpp buffer.o hash.o …

Member Avatar
0
2
Member Avatar

Hi all, To begin, I'm not certain this is the proper place to start this question, but I believe this to be a linux-linker related error rather than a code based one. I've also searched far and wide for a solution online, but others have solved the problem simply include -lblob in the build which I have already done without success. I'm using cvblobslib with openCV, and as per their instructions I've compiled their code to create libblob.a. I've copied this into /usr/local/lib and executed 'sudo ldconfig'. This should have registered the library. Here are the relevent snippets from the …

Member Avatar
0
2
Member Avatar

Hi Im not sure if this question belongs in the form so sorry if it doesn't. Here is my question, in a cs class of mine we have to write a make file that compiles the two seperate programs in the project. The only problem is that none of the cs books I have mention how to do this and the prefessor didn't tell us, wanting us to learn on our own, and it goes without saying that I have never made my own make file before. So, after looking through the Internet for a few hours and even trying …

Member Avatar
0
8
Member Avatar

So I have an assignment where I am supposed to create an oop that will run on a provided Unix server. I have a Mac so when I run the makefile in Terminal, I don't get any errors. But when I try to run the makefile in the provided Unix server, I get this error: make: *** No rule to make target `Horse.cpp', needed by `Horse.o'. Stop. So can someone explain or show me what I am doing wrong? Here are the contents of the makefile: horserace: Horse.o Race.o main.o g++ Horse.o Race.o main.o -o horserace main.o: main.cpp Race.h Horse.h …

Member Avatar
0
5
Member Avatar

What is the role of makefile in a program?

Member Avatar
0
6
Member Avatar

Hi there, I am trying to compile devcpp project that contains one source file helloworld.cpp [CODE] #include <iostream> using namespace std; int main () { cout << "Hello World!"; system("PAUSE"); return 0; }[/CODE] I get this error: [ICODE] C:\Dev-Cpp\Makefile.win [Build Error] [helloworld.o] Error 1 [/ICODE] Compile log is as follows: [ICODE] Compiler: Default compiler Building Makefile: "C:\Dev-Cpp\Makefile.win" Executing make... make.exe -f "C:\Dev-Cpp\Makefile.win" all g++.exe -D__DEBUG__ -c helloworld.cpp -o helloworld.o -I"C:/Dev-Cpp/lib/gcc/mingw32/3.4.2/include" -I"C:/Dev-Cpp/include/c++/3.4.2/backward" -I"C:/Dev-Cpp/include/c++/3.4.2/mingw32" -I"C:/Dev-Cpp/include/c++/3.4.2" -I"C:/Dev-Cpp/include" -lglut32 -lglu32 -lopengl32 -lwinmm -lgdi32 -g3 g++.exe: helloworld.cpp: No such file or directory make.exe: *** [helloworld.o] Error 1 Execution terminated [/ICODE] Does anyone know what is …

0
1
Member Avatar

I was writing a makefile for a web interface program that installs the cgi scripts to a (Linux) OS. The makefile works fine, but it needs to be able to install to different directories for different distributions (Fedora, Ubuntu). On Fedora, the scripts need to go to /var/www/cgi-bin and on Ubuntu, I believe it is /usr/lib/www/cgi-bin. When I run uname -n on Ubuntu, it outputs "ubuntu", but on Fedora, it gives a combination of the username, computer name, and "hostname". Does anyone have any idea how to determine the distribution in a makefile? Thanks

Member Avatar
0
7
Member Avatar

Hi, I am trying to create a make file for a java project. It has a directory structure look like this: src folder [INDENT]-package1[/INDENT] [INDENT][INDENT]-java files[/INDENT][/INDENT] [INDENT]-package2[/INDENT] [INDENT][INDENT]-java files[/INDENT][/INDENT] [INDENT]-package3[/INDENT] [INDENT][INDENT]-java files[/INDENT][/INDENT] [INDENT]-package4[/INDENT] [INDENT][INDENT]-java files[/INDENT][/INDENT] I am new to makefile, but tried to create one according to some tutorials on google, but it doesn't work. Can anyone help me with this? Thanks for your time! [CODE] JFLAGS = -g JC = javac .SUFFIXES: .java .class .java.class: $(JC) $(JFLAGS) $*.java CLASSES=\ ./src/package1/*.java \ ./src/package2/*.java \ ./src/package3/*.java \ ./src/package4/*.java default: classes classes: $(CLASSES:.java=.class) clean: $(RM) *.class [/CODE]

Member Avatar
0
5
Member Avatar

Hello, world! This is my first post on DaniWeb, though I have frequented it quite often. I'm using gcc and make (on Ubuntu 10.10) with GVim for creating a foundation library in C. Within my code I've built in rudimentary profiling and assertion policies that are enabled through a symbolic constant `evd_comvar_debug`. The appropriate entries in my makefile are as follows: # compile-time symbolic constants; 'evd' is a namespace # evd_comvar_ndebug is supposed to switch off debugging # evd_comvar_debug is supposed to switch on debugging # evd_comvar_ndebug = 0 evd_comvar_debug =1 # makefile variable to toggle the debugging option # …

Member Avatar
0
4
Member Avatar

Hi, I can not create executable code by using a makefile.How can I generate the executable code.I wrote this lines into my makefile and in the terminal I wrote make but I can not do it.Please help me. myprog : myprog.o mylibrary.o gcc myprog.o mylibrary.o -o myprog myprog.o : myprog.c mylibrary.h gcc -c myprog.c mylibrary.h -o myprog.o mylibrary.o : mylibrary.c mylibrary.h gcc -c mylibrary.c -o mylibrary.o I take lost separator error.How can I fix this?

Member Avatar
0
5
Member Avatar

Dear friends, I am trying to compile the linux kernel 2.6.33. I need to incorporate a patch into this. The patch creates a directory and 3 src files as below, [CODE] ~/linux-2.6.33/net/core/[B]netchannel[/B] ~/linux-2.6.33/net/core/[B]netchannel/netchannel.c[/B] ~/linux-2.6.33/net/core/[B]netchannel/storage.c[/B] ~/linux-2.6.33/net/core/[B]netchannel/users.c[/B] [/CODE] Now, among the above users.c file uses a function named 'get_empty_filp()', which is defined in some another c file. See the the following error [CODE] net/core/netchannel/user.c: In function ‘netchannel_bind_fd’: net/core/netchannel/user.c:192: error: implicit declaration of function ‘get_empty_filp’ net/core/netchannel/user.c:192: warning: assignment makes pointer from integer without a cast [/CODE] I found that the fun('get_empty_filp') is defined in following location [CODE] fun def => ~/linux-2.6.33/fs/[B]internal.h[/B] fun body …

Member Avatar
0
3
Member Avatar

Hello everyone. I have an error in my makefile. When i execute it on the terminal in linux, it gives me the following errors [CODE]mkab@mkab-ThinkPad-SL400:~/Desktop/TP 5/src$ make test gcc -c prog2.c gcc *.o -o test prog2.o: In function `tester_supprimer': prog2.c:(.text+0x1c): undefined reference to `ajouter' prog2.c:(.text+0x32): undefined reference to `ajouter' prog2.c:(.text+0x48): undefined reference to `ajouter' prog2.c:(.text+0x5e): undefined reference to `ajouter' prog2.c:(.text+0x6c): undefined reference to `afficher' prog2.c:(.text+0x77): undefined reference to `supprimer' prog2.c:(.text+0x85): undefined reference to `afficher' collect2: ld returned 1 exit status make: *** [test] Error 1 [/CODE] This is my makefile [CODE]liste.o: liste.h liste.c gcc -c liste.c outils_liste.o: liste.h outils_liste.h outils_liste.c …

Member Avatar
0
14
Member Avatar

I want to know how to create a makefile so that I dont have to type in the files I am linking together. Also is it possible to use a make file which will run two files. I have a fraction.h file and fraction.cxx (implentation file) I have a main.cpp file (which has the int main) I have a main-1.cpp file which also uses (the header and implementation file) Can the two main files be used to create one makefile

Member Avatar
0
3
Member Avatar

I chopped down my make file so I can compile a C++ program with very few, but some flags set to see if I can determine if they are working. The following is my make file section on C++ flags: [CODE]# Common compiler flags CFLAGS = -mips1 -Wa,-non_shared \ -mno-abicalls \ -I. -I$(SESCSOURCEDIR)/src/libapp \ -I$(SESCSOURCEDIR)/src/libacc \ -I$(XTOOLSPREFIX)/mipseb-linux/include # C++ flags CXXFLAGS = $(CFLAGS) \ -I$(XTOOLSPREFIX)/mipseb-linux/include/c++/3.2 \ -I$(XTOOLSPREFIX)/mipseb-linux/include/c++/3.2/mips-linux-gnu \ -I$(MINTTOOLSPREFIX)/libapp/[/CODE] When I compile a program using this makefile I then run readelf on the elf file. This is the file's header: [CODE]ELF Header: Magic: 7f 45 4c 46 01 02 01 …

Member Avatar
0
4
Member Avatar

I am using Ubuntu-gcc and have a large C code which uses routines from numerical recipes and GNU scientific library. It needs a compilation compilation because each library, i.e. nr and GNUsl, needs its own flags for gcc. Therefore I use a makefile. It works well when the code is only one file. But when the code is distributed into many files it does not work! My question is that what should I write as the TARGET in the makefile. Either *.c or complete list of files do not work. The scripts is : [CODE] CC = gcc CFLAGS = …

Member Avatar
0
3
Member Avatar

I'm using a cross-compiler that generates MIPS binaries from c++ (mipseb-linux-g++). What I want to do is tell the compiler to use a specific ISA (namely MIPS I). From what I can tell this is a machine option that should be easily configurable. I've tried changing the option in my Makefile but the compiler is still generating instructions from the MIPS II ISA which apparently is default. None of my compiler flags are working. Am I doing something wrong? Here's my Makefile just for reference: [CODE] ############################################################################## # \author acc@cs.rochester.edu # \version 0.01 # \brief ############################################################################## # Environment variables which …

0
1
Member Avatar

Hi, I am a total newbie when it comes to makefiles and now I'm in a need of one. I have a directory structure as follows: [CODE] Project_root/Makefile Project_root/src/ Project_root/src/widgets/ Project_root/include/ Project_root/include/widgets/ [/CODE] Each directory contains multiple source/header files. I need to build a shared library out of this directory. Please help me! Best regards, zEeLi

0
1

The End.