In simple words the error means there are two main functions since you have included file1.c twice here
What you can do to solve your problem is build two object files mathfun1.o and file1.o and build the executable "file1" including both these object files. Your makefile would look something like this
Regards,
Harish J
Hello there,
Thank you very much for your attention to my question. In fact this was the source of the problem. Here is therefore the new version of Makefile
And everything works pretty well now.
I am running a make file through the gnu make tool and i am getting the following error
jsh1035c:/users/egate453/admegate/kapil/samples $ make -f GNUmakefile queue_c
make -f ./GNUmakefile queue_c in_objdir=1 build_root=/users/egate453/admegate/kapil/samples
make: Entering directory... (2 Replies)
Hi,
This stems from the following thread https://www.unix.com/showthread.php?t=18299
I have a makefile which makes either executables or a shared library.
i.e. make -f unix.mak will create the executables and
make -f unix.mak libolsv will create the shared library.
Since these have to be... (4 Replies)
Hi, I'm trying to run the module load command in a Makefile and i'm getting the following error:
make: module: command not found
Why is this? Is there any way to run this command in a Makefile?
NOTE: command - module load msjava/sunjdk/1.5.0 works fine outside of the Makefile (2 Replies)
I want to run a target defined in a shell script. The shell script name is 'ua.sc' and the target in it is 'N' i.e. (ua N) throught a makefile. How can i do it so that i can run it with a make target. (3 Replies)
I am trying to create a makefile to build a program and am getting the following error:
make -f tsimplex.mk
make: *** No rule to make target `/main/tsimplex_main.cpp', needed by `tsimplex_main.o'. Stop.
OPSYS = $(shell uname -s )
TARGET = tsimplex
ROOTDIR = ../../..
GTSDIR =... (1 Reply)
I've created a tag in the makefile:
mytag: $(shell ${PWD}/script.sh)
When i do: make clean - the script is executed
When i perform make or make mytag the script is again executed with the output:
make: Nothing to be done for mytag
What i want ?
I want script.sh to be executed only... (0 Replies)
I am new to Solaris and compilation using make files.
I have a code base which is organized into different folders. At the root folder is a master make file and in the sub directories, there are make files for that particular folder.
In the make files present in subdirectories, I am seeing... (2 Replies)
I have a make file for C program, which always gives the error
ld: 0711-738 ERROR: Input file ../src/file_name.o
XCOFF32 object files are not allowed in 64 mode
Does anybody know the problem?
Thanks for contribution (2 Replies)
Hello,
My makefiles are set up to generate an environment specific build directory based on the local configuration and some values passed to make. It generally looks like,
# compilers, may be passed to make
CC++ = g++
FCOMP = gfortran
# version of program, may be passed to make
ver =... (4 Replies)
Discussion started by: LMHmedchem
4 Replies
LEARN ABOUT REDHAT
xmkmf
XMKMF(1) General Commands Manual XMKMF(1)NAME
xmkmf - create a Makefile from an Imakefile
SYNOPSIS
xmkmf [ -a ] [ topdir [ curdir ] ]
DESCRIPTION
The xmkmf command is the normal way to create a Makefile from an Imakefile shipped with third-party software.
When invoked with no arguments in a directory containing an Imakefile, the imake program is run with arguments appropriate for your system
(configured into xmkmf when X was built) and generates a Makefile.
When invoked with the -a option, xmkmf builds the Makefile in the current directory, and then automatically executes ``make Makefiles'' (in
case there are subdirectories), ``make includes'', and ``make depend'' for you. This is the normal way to configure software that is out-
side the X Consortium build tree.
If working inside the X Consortium build tree (unlikely unless you are an X developer, and even then this option is never really used), the
topdir argument should be specified as the relative pathname from the current directory to the top of the build tree. Optionally, curdir
may be specified as a relative pathname from the top of the build tree to the current directory. It is necessary to supply curdir if the
current directory has subdirectories, or the Makefile will not be able to build the subdirectories. If a topdir is given, xmkmf assumes
nothing is installed on your system and looks for files in the build tree instead of using the installed versions.
SEE ALSO imake(1)X Version 11 Release 6.6 XMKMF(1)