53 lines
2.1 KiB
Diff
53 lines
2.1 KiB
Diff
From 015431686de628651a2ae8aed564dbbbe5b37b0c Mon Sep 17 00:00:00 2001
|
|
From: peijiankang <peijiankang@kylinos.cn>
|
|
Date: Mon, 27 May 2024 16:18:02 +0800
|
|
Subject: [PATCH] fix error of libkysdk-kabase undefined reference
|
|
|
|
---
|
|
kysdk-kabase/kabase/kabase.pro | 2 +-
|
|
.../kabase/kylin_image_codec/image_load/image_load.cpp | 3 ++-
|
|
.../kabase/kylin_image_codec/image_save/image_save.cpp | 1 +
|
|
3 files changed, 4 insertions(+), 2 deletions(-)
|
|
|
|
diff --git a/kysdk-kabase/kabase/kabase.pro b/kysdk-kabase/kabase/kabase.pro
|
|
index 07df867..92e0adc 100644
|
|
--- a/kysdk-kabase/kabase/kabase.pro
|
|
+++ b/kysdk-kabase/kabase/kabase.pro
|
|
@@ -11,7 +11,7 @@ TEMPLATE = lib
|
|
|
|
CONFIG += c++11 console link_pkgconfig no_keywords
|
|
|
|
-LIBS += -ldl -lpthread -lsystemd -lkylog -lkyconf -L/usr/lib/kysdk/kysdk-base
|
|
+LIBS += -ldl -lpthread -lsystemd -lgif -lkylog -lkyconf -L/usr/lib/kysdk/kysdk-base
|
|
|
|
greaterThan(QT_VER_MAJ , 4) {
|
|
LIBS += -lopencv_core -lopencv_imgcodecs -lopencv_imgproc -lfreeimage -lfreeimageplus
|
|
diff --git a/kysdk-kabase/kabase/kylin_image_codec/image_load/image_load.cpp b/kysdk-kabase/kabase/kylin_image_codec/image_load/image_load.cpp
|
|
index 1520a2c..6bb8b88 100644
|
|
--- a/kysdk-kabase/kabase/kylin_image_codec/image_load/image_load.cpp
|
|
+++ b/kysdk-kabase/kabase/kylin_image_codec/image_load/image_load.cpp
|
|
@@ -1,3 +1,4 @@
|
|
+#define STB_IMAGE_IMPLEMENTATION
|
|
#include "kylin_image_codec/kylinimagecodec.hpp"
|
|
|
|
namespace kdk
|
|
@@ -379,4 +380,4 @@ FREE_IMAGE_FORMAT KylinImageCodec::get_real_format(const QString &path)
|
|
}
|
|
|
|
} // namespace kabase
|
|
-} // namespace kdk
|
|
\ No newline at end of file
|
|
+} // namespace kdk
|
|
diff --git a/kysdk-kabase/kabase/kylin_image_codec/image_save/image_save.cpp b/kysdk-kabase/kabase/kylin_image_codec/image_save/image_save.cpp
|
|
index ce1b927..b01014c 100644
|
|
--- a/kysdk-kabase/kabase/kylin_image_codec/image_save/image_save.cpp
|
|
+++ b/kysdk-kabase/kabase/kylin_image_codec/image_save/image_save.cpp
|
|
@@ -1,3 +1,4 @@
|
|
+#define STB_IMAGE_WRITE_IMPLEMENTATION
|
|
#include "kylin_image_codec/kylinimagecodec.hpp"
|
|
|
|
namespace kdk
|
|
--
|
|
2.43.0
|
|
|