2016-11-21 10 views

답변

0

나는 발견 솔루션 :

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를 통해 동적 라이브러리로 컴파일 된 라이브러리