用于prosilica相机的PvApi

PvApi for prosilica camera

本文关键字:PvApi 相机 prosilica 用于      更新时间:2023-10-16

我在Mac os x 10.8.5上使用prosilica相机。我下载了Mac OS X的SDK。我尝试在SDK上执行示例,但总是得到此错误。

> make sample
g++-4.2   -O3  -mmacosx-version-min=10.5 -I/usr/include -D_x64 -D_OSX -Wall -I../../inc-pc -D_REENTRANT  ListCameras.cpp -o ListCameras -lpthread -lz -Bdynamic -lm -lc -L../../bin-pc/x64 -lPvAPI
make: g++-4.2: No such file or directory
make: *** [sample] Error 1

但是当我在终端上运行g++ -v时,我得到:

Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/usr/include/c++/4.2.1
Apple LLVM version 5.1 (clang-503.0.38) (based on LLVM 3.4svn)
Target: x86_64-apple-darwin12.5.0
Thread model: posix

错误是什么?

要了解错误,请打开ARCH文件,查看错误

g++-4.2   -O3  -mmacosx-version-min=10.5 -I/usr/include -D_x64 -D_OSX -Wall -I../../inc-pc -D_REENTRANT  ListCameras.cpp -o ListCameras -lpthread -lz -Bdynamic -lm -lc -L../../bin-pc/x64 -lPvAPI
make: g++-4.2: No such file or directory

运行正常,直到ARCH文件打印g++-$(VER)的第24行,但之后无法链接。

所以我想试着根据你的目录修改ARCH文件特别是这部分

## few locations
INC_DIR   = ../../inc-pc
BIN_DIR   = ../../bin-pc/$(CPU)
LIB_DIR   = ../../lib-pc/$(CPU)
OBJ_DIR   = ./obj/$(CPU)
EXTRA_LIB = -lpthread -lz 

填写所有目录的路径。

或者主要需要libPvAPI的路径。一个库,这样你也可以直接更改以下部分:

## libs (shared/static)
PVLIB   = -L$(BIN_DIR) -lPvAPI

PVLIB   = -L/fullpath -lPvAPI

这里的fullpath指的是-L/home/username/folder1/…/.