Based on your statement
now when i compile the code then its showing the error no any input source file "iso8583_defs_1993.h"
it sounds to me like your make file is not referencing the necessary directories.
Let's take a look at your make file. You will call vrxcc
a few times and each time you have to pass it several arguments. Let's start where you call it to compile (probably at the bottom of the make file). Let me share one such line from my make file. (NOTE: This is normally all on one line, but I've broken it up and added c-style comments (//) to explain what's going on. I realize //
comments don't work in make files, but they are very readable here)
-$(EVOSDK)\bin\vrxcc // invokes the compiler
-c // compile only
$(COptions) // my variable that passes compiler options
$(Includes) // my variable that passes all the directories to include
-o $(ObjDir)\$(ProjectName).o // output the object file here
$(SrcDir)\$(ProjectName).c // the input file (to compile)
-e"-" | "$(EVOTOOLS)fmterrorARM.exe" // where to send error output
(See %evosdk%\..\Docs\DOC00303_Verix_eVo_Volume_III Operating_System Programming_Tools_Reference_Manual.doc
for more info on compiling and linking)
Now, each part of that command has significance, but for the purposes of this discussion, the one we need to focus on is $(Includes)
. Let me show you what that consists of for me:
Includes = -I$(AppIncludes) //Where AppIncludes = .\include
$(SDKIncludes) //Where SDKIncludes = -I$(EVOSDK)\include
$(ACTIncludes) //Where ACTIncludes = -I$(EVOACT)include
$(VMACIncludes)//Where VMACIncludes = -I$(EVOVMAC)include
$(VCSIncludes) //Where VCSIncludes = -I$(EVOVCS)include
Any time you want to #include
something, the directory where that file lives has to be passed to the compiler using the -I
flag. For example, if you are trying to #include "iso8583.h"
from the ACT library, then you must have -I$(EVOACT)include
as part of your $(Includes)
. If you don't, then you'll get an error saying that it can't find the file you are trying to use:
"error : #5: cannot open source input file "iso8583_defs_1993.h": No such file or directory"
The reason I was asking Where do these header files live/where did they come from?
in my comments above was because I'm assuming iso8583_defs_1993.h
is a custom library or code file that you have brought with you. If that's the case, then wherever that file lives, you need to make sure it is part of the $(Includes)
as well.
Once everything has been compiled, we still have to link everything together. (NOTE: Since nmake uses file changes as dependencies, the linking part will likely be positioned higher in the make file than the compile part.) I only have 1 linking line and it looks like this:
$(EVOSDK)\bin\vrxcc $(COptions) $(AppObjects) $(Libs) -o $(OutDir)\$(ProjectName).out
$(COptions)
is the same as what we passed to the compiler
$(AppObjects)
is my variable. I have several .c files and each one gets compiled to an object file. This represents each of those .o
files
$(Libs)
any external libraries you want to include. For me, this is defined as Libs = $(ACTLibraries)\act2000.a
BUT if you are trying to import custom libraries (without source code--if you have source code, then it will be part of AppObjects
) then you will have to add them here. Note that your library will need to be compiled for an ARM-11 processor or it won't work. If you have the source code, you may want to add it to your AppObjects
instead.
-o $(OutDir)\$(ProjectName).out
just specifies the output file