简体   繁体   English

如何将库访问到Verifone vx520终端

[英]how to access library into the verifone vx520 terminal

I am working with some libraries using Windows OS, and nmake. 我正在使用Windows OS和nmake处理某些库。 The terminal is not accepting these libraries and I am getting an error when I try to compile the code. 终端不接受这些库,尝试编译代码时出现错误。

The libraries I need to include are 我需要包括的库是

#include "iso8583.h"
#include "iso8583_defs_1993.h"
#include "output.h" // for 'DL_OUTPUT_Hex'
#include "appl8583.h"

When I compile the code, it's showing the error 当我编译代码时,它显示错误

no any input source file "iso8583_defs_1993.h" 没有任何输入源文件“ iso8583_defs_1993.h”

Based on your statement 根据您的陈述

now when i compile the code then its showing the error no any input source file "iso8583_defs_1993.h" 现在,当我编译代码时,它显示错误,没有任何输入源文件“ iso8583_defs_1993.h”

it sounds to me like your make file is not referencing the necessary directories. 在我看来,您的make文件未引用必要的目录。

Let's take a look at your make file. 让我们看一下您的make文件。 You will call vrxcc a few times and each time you have to pass it several arguments. 您将调用vrxcc几次,每次必须传递几个参数。 Let's start where you call it to compile (probably at the bottom of the make file). 让我们从调用它的地方开始编译(可能在make文件的底部)。 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) (注意:这通常全部在一行上,但是我将其分解并添加了c样式注释(//)来解释发生了什么。我知道//注释在make文件中不起作用,但是它们是非常可读)

-$(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) (有关编译和链接的更多信息,请参见%evosdk%\\..\\Docs\\DOC00303_Verix_eVo_Volume_III Operating_System Programming_Tools_Reference_Manual.doc

Now, each part of that command has significance, but for the purposes of this discussion, the one we need to focus on is $(Includes) . 现在,该命令的每一部分都具有重要性,但是出于讨论目的,我们需要重点关注的是$(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. 每当您要#include某些内容时,都必须使用-I标志将该文件所在的目录传递给编译器。 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) . 例如,如果您尝试从ACT库中#include "iso8583.h" ,则必须将-I$(EVOACT)include作为$(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" “错误:#5:无法打开源输入文件“ iso8583_defs_1993.h”:没有这样的文件或目录”

The reason I was asking Where do these header files live/where did they come from? 我问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. 在上面的评论中,因为我假设iso8583_defs_1993.h是您带来的自定义库或代码文件。 If that's the case, then wherever that file lives, you need to make sure it is part of the $(Includes) as well. 如果是这种情况,那么无论该文件在哪里,都需要确保它也属于$(Includes)

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: (注意:由于nmake使用文件更改作为依赖项,因此链接部分在make文件中的位置可能会比编译部分更高。)我只有1条链接行,它看起来像这样:

$(EVOSDK)\bin\vrxcc $(COptions) $(AppObjects) $(Libs) -o $(OutDir)\$(ProjectName).out
  • $(COptions) is the same as what we passed to the compiler $(COptions)与传递给编译器的内容相同
  • $(AppObjects) is my variable. $(AppObjects)是我的变量。 I have several .c files and each one gets compiled to an object file. 我有几个.c文件,每个文件都被编译成一个目标文件。 This represents each of those .o files 这代表了每个.o文件
  • $(Libs) any external libraries you want to include. $(Libs)您要包括的任何外部库。 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. 对我来说,这定义为Libs = $(ACTLibraries)\\act2000.a但是,如果您尝试导入自定义库(没有源代码-如果您有源代码,那么它将成为AppObjects一部分),那么您将拥有在这里添加它们。 Note that your library will need to be compiled for an ARM-11 processor or it won't work . 请注意,您的库需要针对ARM-11处理器进行编译,否则将无法工作 If you have the source code, you may want to add it to your AppObjects instead. 如果您拥有源代码,则可能需要将其添加到您的AppObjects
  • -o $(OutDir)\\$(ProjectName).out just specifies the output file -o $(OutDir)\\$(ProjectName).out仅指定输出文件

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM