0
postgresql c-library (libpq)를 사용해야하는 프로젝트가 있고 프로젝트가 구성되어 있습니다. QBS 모듈을 구성하여 프로젝트에 필요한 헤더와 라이브러리를 모두 가져올 수있는 방법은 무엇입니까?QBS를 통해 PostgreSQL C 라이브러리를 어떻게 첨부 할 수 있습니까?
postgresql c-library (libpq)를 사용해야하는 프로젝트가 있고 프로젝트가 구성되어 있습니다. QBS 모듈을 구성하여 프로젝트에 필요한 헤더와 라이브러리를 모두 가져올 수있는 방법은 무엇입니까?QBS를 통해 PostgreSQL C 라이브러리를 어떻게 첨부 할 수 있습니까?
나는 발견 솔루션 :
import qbs 1.0
Product {
name: "PostgresqlConnector"
type: "dynamiclibrary"
Depends {name:"cpp"}
Depends { name: "Qt.core" }
Depends { name: "UniversalDataObjects" }
property string rootPath: "/Users/romanvolkov/Desktop/postgresql-9.6.0/src/"
cpp.includePaths: [rootPath + "/include/",
rootPath + "/interfaces/ecpg/pgtypeslib/",
rootPath + "interfaces/libpq/"]
cpp.dynamicLibraries: [rootPath + "interfaces/libpq/" + "libpq.dylib"]
files: [
"postgresqlconnectioninfo.cpp",
"postgresqlconnectioninfo.h",
]
}
당신 만 기본적으로 (CPP 의존성, libpg SRCS와 설정 cpp.includePaths, pgtypes 헤더를 가져오고 파일을 동적 lib 디렉토리의 이름 설정 cpp.dynamicLibraries을 포함해야 make를 통해 동적 라이브러리로 컴파일 된 라이브러리