---
title: kpccl_get_version
description: "获取KPCCL产品版本信息。"
url: https://www.hikunpeng.com/document/detail/zh/hpchistory/hpckit/develop2400/KunoengHPCKit_developer_069.html
sourcePath: /source/zh/hpchistory/hpckit/develop2400/KunoengHPCKit_developer_069.html
indexId: 401b5ca40fbaec5bac92357b4a262f219bbc6db205bbac18fe3664b2759d938873
---
# kpccl_get_version

获取KPCCL产品版本信息。

#### 接口定义

int kpccl_get_version(kpccl_version_t *version)


#### 参数

| 参数名 | 描述 | 取值范围 | 输入/输出 |
| --- | --- | --- | --- |
| version | 产品信息结构体。 | 非空 | 输出 |


#### 返回值

- 成功：返回KPCCL_OK
- 失败：返回KPCCL_ERROR


#### 示例

```
#include <stdio.h>
#include "kpccl.h"
int main()
{
kpccl_version_t version;
int status = kpccl_get_version(&version);
printf("product_name = %s\n", version.product_name);
printf("product_version = %s\n", version.product_version);
printf("component_name = %s\n", version.component_name);
printf("component_version = %s\n", version.component_version);
printf("component_appendinfo = %s\n", version.component_appendinfo);
return 0;
}
```


运行结果：

```
product_name = Kunpeng HPCKit
product_version = 24.0.0
component_name = KPCCL
component_version = 24.0.0
component_appendinfo = gcc
```

以上版本号和编译时间以实际运行结果为准，上述结果仅供参考。
