The document introduces the new HPE SimpliVity 380 hyperconverged platform. It provides all-flash storage and compute resources with advanced data services like compression, deduplication, backup, and disaster recovery in a single building block for simplified management. Customers can realize significant cost savings and efficiency gains compared to traditional infrastructure or public cloud options like AWS. The HPE SimpliVity 380 delivers powerful and simple hyperconvergence combined with efficient and flexible operations for customers' workloads.
This document describes how to generate an OData service from an ABAP Core Data Service (CDS) view to display total sales data by business partner. It involves creating a CDS view with the required data, adding an annotation to publish it as an OData service, registering the service, and then testing the OData service URL.
Cloudera can help optimize Splunk deployments by providing more cost-effective scalability, increased data flexibility, and enhanced analytics capabilities. Cloudera can ingest data from Splunk indexes and apply enrichment using open-source machine learning before storing the data in its data hub. This provides a single platform for advanced analytics like SQL and Python/R scripts across both historical and new data. Initial use cases include offloading event data from Splunk to reduce costs and loading additional context sources to gain better insights.
Virtual machines (VMs) allow users to run multiple operating systems on a single physical machine concurrently. VMs act like independent computers and have their own OS, applications, and storage. Containers provide operating system-level virtualization where the kernel runs directly on the host machine and containers share resources but are isolated. Common VM environments include VirtualBox, VMware, AWS, and OpenStack. Common container environments include LXC and Docker. While VMs are heavier, containers are lighter and more portable. The author currently prefers VMs due to industry use, customization, security, and ease of backups and recovery.
As more businesses explore the benefits of cloud computing, network managers will have to increasingly meet the challenges of redesigning their networks for the cloud. This talk will introduce the basic concepts of Open vSwitch & Openflow and show how these technologies can help satisfy these needs. We will also explain how Open vSwitch fits into XCP and XenServer and routing of dataflows.
First part of talk discussing the networking challenges that cloud implementers face.
- Networking challeges
- Data isolation
Introducing Open vSwitch
- What it is, and its features
- Why it is important in a virtualized environment
Openflow
- Basics of Openflow
- How flows are routed in XenServer & XCP
The document introduces the new HPE SimpliVity 380 hyperconverged platform. It provides all-flash storage and compute resources with advanced data services like compression, deduplication, backup, and disaster recovery in a single building block for simplified management. Customers can realize significant cost savings and efficiency gains compared to traditional infrastructure or public cloud options like AWS. The HPE SimpliVity 380 delivers powerful and simple hyperconvergence combined with efficient and flexible operations for customers' workloads.
This document describes how to generate an OData service from an ABAP Core Data Service (CDS) view to display total sales data by business partner. It involves creating a CDS view with the required data, adding an annotation to publish it as an OData service, registering the service, and then testing the OData service URL.
Cloudera can help optimize Splunk deployments by providing more cost-effective scalability, increased data flexibility, and enhanced analytics capabilities. Cloudera can ingest data from Splunk indexes and apply enrichment using open-source machine learning before storing the data in its data hub. This provides a single platform for advanced analytics like SQL and Python/R scripts across both historical and new data. Initial use cases include offloading event data from Splunk to reduce costs and loading additional context sources to gain better insights.
Virtual machines (VMs) allow users to run multiple operating systems on a single physical machine concurrently. VMs act like independent computers and have their own OS, applications, and storage. Containers provide operating system-level virtualization where the kernel runs directly on the host machine and containers share resources but are isolated. Common VM environments include VirtualBox, VMware, AWS, and OpenStack. Common container environments include LXC and Docker. While VMs are heavier, containers are lighter and more portable. The author currently prefers VMs due to industry use, customization, security, and ease of backups and recovery.
As more businesses explore the benefits of cloud computing, network managers will have to increasingly meet the challenges of redesigning their networks for the cloud. This talk will introduce the basic concepts of Open vSwitch & Openflow and show how these technologies can help satisfy these needs. We will also explain how Open vSwitch fits into XCP and XenServer and routing of dataflows.
First part of talk discussing the networking challenges that cloud implementers face.
- Networking challeges
- Data isolation
Introducing Open vSwitch
- What it is, and its features
- Why it is important in a virtualized environment
Openflow
- Basics of Openflow
- How flows are routed in XenServer & XCP
What is OpenStack? This presentation is an overview about the most fascinating projects out there today.
In this presentation, I cover the following topics:
- Quick introduction to OpenStack project
- Explain the OpenStack architecture and how its built
- Get you familiar with the different terminology and concepts
- Get you familiar with OpenStack services (components)
- Go over installation methods and tools
- Review risks
Nagios is an open source network monitoring tool that monitors hosts and services and alerts administrators of issues. It checks specified hosts and services at regular intervals and alerts when problems occur or are resolved. Key features include monitoring of network services and host resources, notifications of service/host problems, a web interface to view status, and a plugin architecture that allows users to customize monitoring checks. Nagios uses a server/client model where plugins run on remote hosts and send data to the Nagios server, which then displays information and handles alerts.
Migrating Oracle Forms Using Oracle Application ExpressDavidPeake15
Review of the strengths and weaknesses of Oracle Forms. Includes a decision tree to determine best approach moving forward. Details on what is involved in migrating to APEX from Oracle Forms.
This document discusses foreign key relationships in SAP. It defines a foreign key as a field that represents the primary key of another table, in order to link tables together and maintain data integrity. It explains that foreign keys allow creating aggregate objects and provide help texts. It also covers the prerequisites for defining foreign keys, key terminology, establishing relationships in ABAP Dictionary, field assignment types like partial and constant, and demonstrates creating a payroll table with a foreign key to the employee table.
JAIN SIP provides a standardized Java interface for the Session Initiation Protocol. It enables applications to have transaction stateless, transaction stateful, and dialog stateful control over SIP. JAIN SIP ensures interoperability between SIP stacks and application portability across stacks. It defines interfaces for SIP messages, headers, transactions, and dialogs to provide developers powerful yet standardized access to the SIP protocol.
VMware vSphere 6.0 - Troubleshooting Training - Day 4Sanjeev Kumar
This document provides an overview and introduction to virtual storage concepts in VMware vSphere, including NFS, iSCSI, VMFS, and Virtual SAN datastores. It discusses storage protocols, multipathing, and best practices for configuring and managing different types of datastores. The document also covers virtual storage technologies like RDM, virtual volumes, and storage policies.
Simple exercise on o data and sap ui5 application for the basic crud operatio...Nagendra Babu
This document describes how to create an OData service for basic CRUD operations using SAP Gateway Service Builder and consume it using a SAP UI5 application. It involves creating a backend table and functions for CRUD, generating a data model, mapping functions to OData operations, and registering the service. The SAP UI5 app is then built to display and modify employee data by consuming the OData service.
A virtual machine (VM) uses software to run programs and deploy apps instead of using physical computer hardware. Multiple VMs can run on a single physical host machine. Each VM runs its own operating system separately from other VMs. VMs provide benefits like cost savings, agility, scalability, and security by isolating applications. However, VMs can also result in slower performance compared to physical machines. A hypervisor manages interactions between the physical hardware and VMs, enabling virtualization. There are two main types of hypervisors - type 1 runs directly on the hardware while type 2 runs within a host operating system.
EWD 3 Training Course Part 1: How Node.js Integrates With Global Storage Data...Rob Tweed
This presentation is the first part of the EWD 3 Training Course. It provides an overview of how Node.js integrates with Global Storage Databases such as InterSystems' Cache, GT.M and the Redis-based ewd-redis-globals
Virtualization allows multiple virtual machines to run on a single physical machine. It began in IBM mainframes in 1972 and allowed time-sharing of computing resources. Modern virtualization technologies like VMware and Xen create virtual environments that are essentially identical to the original machine for programs to run in. Virtualization provides benefits like consolidation of servers, high availability, disaster recovery and easier management of computing resources. There are different types of virtualization including server, desktop, application, memory and storage virtualization.
Virtualization allows for the creation of virtual versions of hardware platforms, operating systems, storage and network resources through software. It works by imitating hardware resources through a hypervisor software layer that creates virtual machines with virtual hardware. This allows multiple guest operating systems to run in isolation on a single physical machine. Virtualization provides benefits like reduced costs, increased hardware utilization, easier management and testing across different operating systems. Popular virtualization platforms include VMWare, Hyper-V, KVM, Xen and VirtualBox.
Virtualization allows multiple operating systems and applications to run on a single hardware device by dividing the resources virtually. It provides isolation, encapsulation, and interposition. There are two types of hypervisors - Type 1 runs directly on hardware and Type 2 runs on an operating system. Virtualization can be applied to servers, desktops, applications, networks, and storage to improve utilization, security, and manageability.
Dmm300 – mixed scenarios for sap hana data warehousing and BW: overview and e...Luc Vanrobays
BW on SAP HANA Transformations, generated SAP HANA views, and integrating SAP HANA views were discussed. BW on SAP HANA Transformations use SAP HANA optimizations for BW staging. Generated views can be created via a pull mechanism from the SAP HANA modeler or push mechanism from BW. Views can be integrated into BW using composite providers or consumed in BW queries. Transitioning from pull to push views requires rebuilding views using composite providers.
Virtual Local Area Network (VLAN) provide a way of grouping different network devices to ensure that those devices can communicate directly with one another.
SYMANTEC ENDPOINT PROTECTION Advanced Monitoring and ReportingDsunte Wilson
Symantec Endpoint Protection collects information about the security events in your network. You can use log and reports to view these events, and you can use notifications to stay informed about the events as they occur.
What is OpenStack? This presentation is an overview about the most fascinating projects out there today.
In this presentation, I cover the following topics:
- Quick introduction to OpenStack project
- Explain the OpenStack architecture and how its built
- Get you familiar with the different terminology and concepts
- Get you familiar with OpenStack services (components)
- Go over installation methods and tools
- Review risks
Nagios is an open source network monitoring tool that monitors hosts and services and alerts administrators of issues. It checks specified hosts and services at regular intervals and alerts when problems occur or are resolved. Key features include monitoring of network services and host resources, notifications of service/host problems, a web interface to view status, and a plugin architecture that allows users to customize monitoring checks. Nagios uses a server/client model where plugins run on remote hosts and send data to the Nagios server, which then displays information and handles alerts.
Migrating Oracle Forms Using Oracle Application ExpressDavidPeake15
Review of the strengths and weaknesses of Oracle Forms. Includes a decision tree to determine best approach moving forward. Details on what is involved in migrating to APEX from Oracle Forms.
This document discusses foreign key relationships in SAP. It defines a foreign key as a field that represents the primary key of another table, in order to link tables together and maintain data integrity. It explains that foreign keys allow creating aggregate objects and provide help texts. It also covers the prerequisites for defining foreign keys, key terminology, establishing relationships in ABAP Dictionary, field assignment types like partial and constant, and demonstrates creating a payroll table with a foreign key to the employee table.
JAIN SIP provides a standardized Java interface for the Session Initiation Protocol. It enables applications to have transaction stateless, transaction stateful, and dialog stateful control over SIP. JAIN SIP ensures interoperability between SIP stacks and application portability across stacks. It defines interfaces for SIP messages, headers, transactions, and dialogs to provide developers powerful yet standardized access to the SIP protocol.
VMware vSphere 6.0 - Troubleshooting Training - Day 4Sanjeev Kumar
This document provides an overview and introduction to virtual storage concepts in VMware vSphere, including NFS, iSCSI, VMFS, and Virtual SAN datastores. It discusses storage protocols, multipathing, and best practices for configuring and managing different types of datastores. The document also covers virtual storage technologies like RDM, virtual volumes, and storage policies.
Simple exercise on o data and sap ui5 application for the basic crud operatio...Nagendra Babu
This document describes how to create an OData service for basic CRUD operations using SAP Gateway Service Builder and consume it using a SAP UI5 application. It involves creating a backend table and functions for CRUD, generating a data model, mapping functions to OData operations, and registering the service. The SAP UI5 app is then built to display and modify employee data by consuming the OData service.
A virtual machine (VM) uses software to run programs and deploy apps instead of using physical computer hardware. Multiple VMs can run on a single physical host machine. Each VM runs its own operating system separately from other VMs. VMs provide benefits like cost savings, agility, scalability, and security by isolating applications. However, VMs can also result in slower performance compared to physical machines. A hypervisor manages interactions between the physical hardware and VMs, enabling virtualization. There are two main types of hypervisors - type 1 runs directly on the hardware while type 2 runs within a host operating system.
EWD 3 Training Course Part 1: How Node.js Integrates With Global Storage Data...Rob Tweed
This presentation is the first part of the EWD 3 Training Course. It provides an overview of how Node.js integrates with Global Storage Databases such as InterSystems' Cache, GT.M and the Redis-based ewd-redis-globals
Virtualization allows multiple virtual machines to run on a single physical machine. It began in IBM mainframes in 1972 and allowed time-sharing of computing resources. Modern virtualization technologies like VMware and Xen create virtual environments that are essentially identical to the original machine for programs to run in. Virtualization provides benefits like consolidation of servers, high availability, disaster recovery and easier management of computing resources. There are different types of virtualization including server, desktop, application, memory and storage virtualization.
Virtualization allows for the creation of virtual versions of hardware platforms, operating systems, storage and network resources through software. It works by imitating hardware resources through a hypervisor software layer that creates virtual machines with virtual hardware. This allows multiple guest operating systems to run in isolation on a single physical machine. Virtualization provides benefits like reduced costs, increased hardware utilization, easier management and testing across different operating systems. Popular virtualization platforms include VMWare, Hyper-V, KVM, Xen and VirtualBox.
Virtualization allows multiple operating systems and applications to run on a single hardware device by dividing the resources virtually. It provides isolation, encapsulation, and interposition. There are two types of hypervisors - Type 1 runs directly on hardware and Type 2 runs on an operating system. Virtualization can be applied to servers, desktops, applications, networks, and storage to improve utilization, security, and manageability.
Dmm300 – mixed scenarios for sap hana data warehousing and BW: overview and e...Luc Vanrobays
BW on SAP HANA Transformations, generated SAP HANA views, and integrating SAP HANA views were discussed. BW on SAP HANA Transformations use SAP HANA optimizations for BW staging. Generated views can be created via a pull mechanism from the SAP HANA modeler or push mechanism from BW. Views can be integrated into BW using composite providers or consumed in BW queries. Transitioning from pull to push views requires rebuilding views using composite providers.
Virtual Local Area Network (VLAN) provide a way of grouping different network devices to ensure that those devices can communicate directly with one another.
SYMANTEC ENDPOINT PROTECTION Advanced Monitoring and ReportingDsunte Wilson
Symantec Endpoint Protection collects information about the security events in your network. You can use log and reports to view these events, and you can use notifications to stay informed about the events as they occur.
Origin Link : http://www.oss.kr/oss_information6/1435
세션2 : 공개SW개발과 우분투 환경의 개발툴
우분투 이야기
- 우분투 한국 이야기
- 우분투 장점
- 우분투 개발 환경
- 우분투에서의 협업 툴 활용
(강사) 강분도 (우분투한국사용자모임 대표)
goorm is the cloud-based Integrated Development Environment. It is developed in only javascript and using various open source libraries. It is also an open-source project. goorm supports currently C/C++ and Java as well as HTML, CSS, PHP and Javascript. Other languages will be supported with plugin.
This document discusses using computational graphs to calculate gradients for neural networks and other deep learning models. It explains that directly calculating gradients on paper for complex models is difficult and inefficient. Instead, computational graphs can be used as a data structure to represent the calculation process within a model. Nodes in the graph correspond to mathematical operations like matrix multiplications and activation functions. This allows gradients to be efficiently calculated by backpropagating through the graph. Examples of linear models, convolutional networks, and neural Turing machines are given to show how computational graphs can handle both simple and complex models.
- The document discusses how a neural network with one hidden layer can approximate any function from RN to RM to arbitrary precision using universal approximation.
- It provides an example of using a neural network with ReLU activations to approximate a function from R to R. The output is a linear combination of shifted and scaled ReLU units.
- With 4 hidden units, this network architecture can represent a bump function by combining 4 different weighted hidden units.
2. 준비 동기
프로그램 개발하면서 오픈소스가 필요할 때가 많습니다.
하지만 오픈소스 사이트를 들어가면 간단한 설치, 실행 설명과 자세한 문서들이 있어도
처음 사용하는 사람뿐만 아니라 개발자들 또한 많은 어려움을 겪게 되서
본 자료에서는 오픈소스를 다운받고, 빌드, 사용, 디버깅 등 필요한 과정과 배경 지식들에 대해 정리하였습니다.
처음 간단한 부분들은 단순 그림으로 넘어갔지만
뒤의 자세한 설명이 필요한 부분들은 발표자료로 좋지 않더라도 최대한 자세히 설명하였습니다.
중간에 부족한 내용이 빠지거나 오타들은 양해 부탁드리며
본 자료에 서술하지 않은 에러에 대한 디버깅 방법은 직접 해결하는데 많은 시간이 걸릴지도 모르지만
처음 오픈소스를 사용하시는 분들께 좋은 길잡이가 되었으면 좋겠습니다.
(저도 한번 정리해놓고 편해지고싶어요)
*추가로 빌드한 오픈소스 파일 연동 방법은 'OPENCV 연동하기’ 등의 자료를 참고하여 연동하세요.
3. 목차
1. 오픈소스란? 6~12p
2. GIT? GITHUB? 13~30p
3. 오픈소스 GITHUB 31~34p
4. 빌드 배경지식 35~51p
5. 컴파일러 준비하기 52~58p
6. 오픈소스 빌드하기 59~93p
7. 오픈소스 빌드 파일에 대한 기초 지식 94~140p
8. 오픈소스 빌드 파일 분석 141~158p
4. 1. 오픈소스란? 6~12p
- 본 항목에서는 오픈소스에 대한 간략한 소개와 종류, 실재 GITHUB 사이트에 어떻게 올라와 있는지 라이
센스 등에 대해 설명한다.
2. GIT? GITHUB? 13~30p
- 컴퓨터를 공부하는 사람들은 자주 듣지만 막상 사용하지 않으면 알기 어려운 GIT과 GITHUB에 대하여
설명한다. GIT의 기능들을 비유하며 설명한다.
3. 오픈소스 GITHUB 31~34p
- 깃허브에 올라오는 오픈소스 문서에 대하여 보고, 여기서 어떻게 오픈소스를 활용하는지 본다.
4. 빌드 배경지식 35~51p
- 오픈소스를 직접 프로젝트에 가져와 사용하기에 앞서 오픈 소스를 직접 빌드하여 사용하는데 대하여 필
요한 기초 지식들(컴퓨터 언어 종류, 컴파일 과정, 플랫폼 맞추기 등)을 설명한다.
목차 소개
5. 5. 컴파일러 준비하기 52~58p
- 오픈소스 빌드시에 필요한 플랫폼에 맞는 컴파일러가 무엇인지 해당 컴파일러를 설치하는 방법에 대하
여 본다.
6. 오픈소스 빌드하기 59~93p
- 본 자료에서 오픈소스를 사용하기 위한 과정 중 가장 중요한 부분으로 소스 빌드를 위한 크로스플랫폼
인 CMake의 사용법과 디버깅 방법, 오픈소스 빌드와 디버깅 방법에 대하여 설명한다.
7. 오픈소스 빌드 파일에 대한 기초 지식 94~140p
- 빌드 폴더에 대한 간략한 설명과 메인 함수, 함수 선언부 구현부, 헤더파일, 라이브러리, 오픈소스 연동
방법에 대하여 설명한다.
8. 오픈소스 빌드 파일 분석 141~158p
- 오픈소스 빌드 폴더와 파일들에 대하여 설명하고, 환경변수의 설정에 따라 어떻게 실행되는지 본다.
목차 소개
16. 2. GIT? GITHUB?
덧셈연산 구현 뺄셈연산 구현
곱셈연산 구현 나눗셈연산 구현
1 2
3 4
int sum(int a, int b){
~
}
int subtract(int a, int b){
~
}
int multiply(int a, int b){
~
}
int divide(int a, int b){
~
}
깃의 기능 1 – 협업 관리
17. 2. GIT? GITHUB?
int sum(int a, int b){
~
}
int subtract(int a, int b){
~
}
int multiply(int a, int b){
~
}
int divide(int a, int b){
~
}
깃의 기능 1 – 협업 관리
수정사항 합치기
18. 2. GIT? GITHUB?
덧셈연산 구현 뺄셈연산 구현
곱셈연산 구현 나눗셈연산 구현
1 2
3 4
int sum(int a, int b){
~
}
int subtract(int a, int b){
~
}
int multiply(int a, int b){
~
}
int divide(int a, int b){
~
}
깃의 기능 1 – 협업 관리
로컬 저장소
로컬 저장소
로컬 저장소
로컬 저장소
19. 2. GIT? GITHUB?
int sum(int a, int b){
~
}
int subtract(int a, int b){
~
}
int multiply(int a, int b){
~
}
int divide(int a, int b){
~
}
깃의 기능 1 – 협업 관리
수정사항 합치기
원격 저장소
20. 2. GIT? GITHUB?
깃의 기능 2 - 버전관리
빅맥 v1.0
//bigmac version 1.0
class bigmac{
int price;
int chesse, bread, meat;
void eat(){
print(“delicious!”);
}
}
빅맥.git
빅맥
v1.0
21. 2. GIT? GITHUB?
깃의 기능 2 - 버전관리
빅맥 v1.0
//bigmac version 1.1
class bigmac{
int price;
int chesse, bread, meat;
int tomato,bacon;
void eat(){
print(“delicious!”);
}
}
베이컨 source
토마토 source
new
빅맥.git
빅맥
v1.0
빅맥
v1.1
22. 2. GIT? GITHUB?
깃의 기능 2 - 버전관리
빅맥 v1.1
//bigmac version 1.1
class bigmac{
int price;
int chesse, bread, meat;
int tomato,bacon;
void eat(){
print(“delicious!”);
}
}
빅맥.git
빅맥
v1.0
빅맥
v1.1
23. 2. GIT? GITHUB?
깃의 기능 2 - 버전관리
//bigmac version 1.1
class bigmac{
int price;
int chesse, bread, meat;
int tomato,bacon;
void eat(){
print(“delicious!”);
}
}
빅맥.git
빅맥
v1.0
빅맥
v1.1
24. 2. GIT? GITHUB?
깃의 기능 2 - 버전관리
빅맥.git
빅맥
v1.0
빅맥
v1.1
//bigmac version 1.0
class bigmac{
int price;
int chesse, bread, meat;
void eat(){
print(“delicious!”);
}
}
REVERT
//bigmac version 1.1
class bigmac{
int price;
int chesse, bread, meat;
int tomato,bacon;
void eat(){
print(“delicious!”);
}
}
38. 4. 빌드 배경지식
컴퓨터 언어의 종류
컴파일 언어
인터프리터 언어
main(){
printf(“hello”);
printf(“monkey”);
return 0;
}
00010101010101
01011101010100
10101010101010
1010101010
소스파일 이진(실행)파일
컴파일
print(“monkey”);
>>monkey
print(1+1);
>>2
print(“help me“);
>>help me
인터프리팅
한줄 읽기
실행 하기
39. 4. 빌드 배경지식
컴퓨터 언어의 종류
컴파일 언어
인터프리터 언어
main(){
printf(“hello”);
printf(“monkey”);
return 0;
}
00010101010101
01011101010100
10101010101010
1010101010
소스파일 이진(실행)파일
컴파일
print(“monkey”);
>>monkey
print(1+1);
>>2
print(“help me“);
>>help me
인터프리팅
한줄 읽기
실행 하기
41. 4. 빌드 배경지식
오픈소스 다운로드
소스코드만
제공하는 경우
소스코드와
빌드 바이너리
(exe,lib 등)도
제공하는 경우
42. 4. 빌드 배경지식
오픈소스 다운로드
소스코드만
제공하는 경우
소스코드와
빌드 바이너리
(exe,lib 등)도
제공하는 경우OPENCV 다운로드 사이트
43. 4. 빌드 배경지식
오픈소스 사용하기
구현
프로그램 BUILD
COMPILE
OPENCV 바이너리 프로그램 소스파일
INCLUDE
LINKING
바이너리
->실행파일(exe) 또는
헤더(h,hpp), 라이브러리(dll,lib)
44. 4. 빌드 배경지식
오픈소스 사용하기
VC14
구현
프로그램
VC15
INCLUDE
LINKING
BUILD
ERROR
COMPILE
OPENCV 바이너리 프로그램 소스파일
VC14
=
VisualStudio
Compiler 14
45. 4. 빌드 배경지식
오픈소스 사용하기
VC14
구현
프로그램
VC15
BUILD
ERROR
COMPILE
OPENCV 바이너리 프로그램 소스파일
영어
구현
프로그램
한국어
BUILD
ERROR
COMPILE
OPENCV 바이너리 프로그램 소스파일
INCLUDE
LINKING
INCLUDE
LINKING
46. 4. 빌드 배경지식
오픈소스 사용하기
VC15
구현
프로그램
VC15
BUILD
COMPILE
OPENCV 바이너리 프로그램 소스파일
한국어
구현
프로그램
한국어
BUILD
COMPILE
OPENCV 바이너리 프로그램 소스파일
수정
INCLUDE
LINKING
INCLUDE
LINKING
47. 4. 빌드 배경지식
오픈소스 사용하기
어플리케이션 빌드
컴파일러를 확인한다
오픈소스가
어떤 컴파일러로
빌드 되었는지 확인한다
오픈소스와 어플리
케이션의 컴파일러
가 일치하는가?
그대로 빌드한다
오픈소스를 어플리케이션
컴파일러에 맞춰
다시 빌드한다
어플리케이션의 컴파일러
를 오픈소스 컴파일러와
동일한 것으로 바꾼다
YES NO
OR
48. 4. 빌드 배경지식
오픈소스 사용하기
VC15
구현
프로그램
VC15
BUILD
COMPILE
OPENCV 바이너리 프로그램 소스파일
VC14
구현
프로그램
VC15
BUILD
ERROR
COMPILE
OPENCV 바이너리 프로그램 소스파일
INCLUDE
LINKING
INCLUDE
LINKING
49. 4. 빌드 배경지식
오픈소스 사용하기 - 확인사항
1. 오픈소스가 어떤 컴파일러로 32비트(x86)인지 64비트(x64)로 빌드되었는지 확인한다.
2. 현재 프로젝트의 비트(x86 or x64)와 컴파일러(VC13,14,15 등)를 확인한다.
3. 현재 프로젝트와 오픈소스의 컴파일러가 일치하는지 비교한다.
4. 현재 프로젝트를 오픈소스 빌드 파일에 맞추거나 오픈소스를 현재 프로젝트에 맞게 다시 빌드하여
가져온다.
* 참고 : 컴파일러 + 비트(x86,x64) = 플랫폼
50. 4. 빌드 배경지식
구버전 소스에서 해당 컴파일러(플랫폼)으로 빌드된 파일이 없을 때
구버전에는
VC15가 없다
최신 버전에는
VC15가 있지만...
51. 4. 빌드 배경지식
OPENCV 다운로드 사이트
VC15
구현
프로그램
VC15
COMPILE
OPENCV 바이너리 프로그램 소스파일
VC15가 없다면
->소스 파일을
VC15로 빌드
구버전 소스에서 해당 컴파일러(플랫폼)으로 빌드된 파일이 없을 때
INCLUDE
LINKING
52. 5. 컴파일러 준비하기
컴파일러 준비하기 – Visaul Studio 버전 별 Compiler
Visual Studio 2015
Visual Studio
Compiler 14
Visual Studio 2013
Visual Studio
Compiler 13
Visual Studio 2017
Visual Studio
Compiler 15
53. 5. 컴파일러 준비하기
컴파일러 준비하기 – 타버전 컴파일러가 없을 때
1. 상위 컴파일러가 필요한 경우. (VC13은 있지만 VC15가 필요 할 때)
->Visual Studio 2017도 설치한다.
2. 하위 버전의 컴파일러가 필요한 경우.(VS2017(VC15) 사용중 VC14가 필요 할 때)
-> 해당 버전의 VS를 설치한다. (이 경우 VS2015 설치)
-> 또는 “도구 및 기능 가져오기”에서 설치한다. (다음 페이지 참고)
69. 6. 오픈소스 빌드하기
오픈소스 빌드 준비하기 – CMAKE
*주의* 기존에 체크 된 ‘Do not add CMake to the system Path’ 대신
아래의 ‘Add Cmake to the system Path for all users'를 체크한다.
Add Cmake to the system
PATH for all users 클릭
Create CMake Desktop Icon
체크
71. 6. 오픈소스 빌드하기
오픈소스 빌드 준비하기 – CMAKE
바탕화면에 있는 CMake 실행
CMake(cmake-gui) 실행
72. 6. 오픈소스 빌드하기
오픈소스 빌드 준비하기 – CMAKE
CMake 화면 – 여기서 Opencv를 빌드파일을 생성한다.
73. 6. 오픈소스 빌드하기
오픈소스 빌드 준비하기 – CMAKE
소스의 경로와 Build 폴더의 경로를 Browse 버튼으로 입력한다.
압축 해제한 소스 폴더 경로
새로 만든 Build 폴더 경로
74. 6. 오픈소스 빌드하기
오픈소스 빌드 준비하기 – CMAKE
경로 입력 후, ‘Grouped’, 'Advanced’ 체크
체크
75. 6. 오픈소스 빌드하기
오픈소스 빌드 준비하기 – CMAKE
‘Configure’ 버튼을 누르면 플랫폼을 설정하는 창이 나온다
클릭
76. 6. 오픈소스 빌드하기
오픈소스 빌드 준비하기 – CMAKE
나온 창에서 빌드하려는 플랫폼(Visual Studio 15 2017 win64)를 누르고 'Finish’ 클릭
클릭
클릭
77. 6. 오픈소스 빌드하기
오픈소스 빌드 준비하기 – CMAKE 에러 1
Configure 창이 닫히면 작업이 진행된다.
* 지금처럼 권한 상승이 필요하다는 에러가 발생시 관리자 권한으로 CMake를 열어 다시 진행한다.
78. 6. 오픈소스 빌드하기
오픈소스 빌드 준비하기 – CMAKE 에러 2
에러가 발생시 로그 창을 보고 에러에 대한 내용을 해결해야한다.
* 이 컴퓨터에서는 CUDA가 설치되어있어 CUDA 관련 경로를 찾지 못해 에러가 발생하였다.
CUDA 설치 안한 컴퓨터는 발생하지 않는다.
79. 6. 오픈소스 빌드하기
오픈소스 빌드 준비하기 – CMAKE 에러 2
여기서 CUDA는 사용하지 않으므로
WITH 그룹의 WITH_CUDA를 체크 해제 후 다시 ‘Configure’ 버튼을 누르면 해결된다.
WITH 눌러서 열기
WITH_CUDA
체크 해제
80. 6. 오픈소스 빌드하기
오픈소스 빌드 준비하기 – CMAKE / BUILD_OPENCV_WORLD 체크하기
'BUILD’ 그룹의 'BUILD_opencv_world'를 체크 후 다시 ‘Configure’ 버튼을 클릭한다.
-> opencv_world는 opencv의 통합 라이브러리로 하나의 파일로 생성되어 프로젝트에서 가져오기 편하다.
BUILD를 눌러서
열고, 아래로 내려간다
BUILD_opencv_world
체크
체크 후 다시
Configure 버튼 클릭
81. 6. 오픈소스 빌드하기
오픈소스 빌드 준비하기 – CMAKE
'build_opencv_world’ 체크 후 Configure가 끝나면 'Generate' 버튼을 클릭한다.
->VC15 64bit 플랫폼에 해당하는 OPENCV 빌드 프로젝트가 생성된다.
82. 6. 오픈소스 빌드하기
오픈소스 빌드하기
CMake에서 Generate가 끝나면 Build 폴더에 Visual Studio 관련 파일들이 생성되어 있다.
sln(Solution) 파일인 OpenCV.sln을 실행한다.
실행
83. 6. 오픈소스 빌드하기
OpenCV.sln이 열리면 오른쪽의 CMakeTargets 칸에서 ALL_BUILD, INSTALL, PACKAGE 등이 존재하고
ALL_BUILD가 굵은 글씨로 되어있다. -> ALL_BUILD가 시작 프로젝트로 설정되어 있다.
우선은, 위 ‘Debug’를 ‘Release’로 먼저 변경한다.
Debug를
Release로 변경한다
84. 6. 오픈소스 빌드하기
‘Release’ 상태로 변경 후에는 ‘CMakeTargets’의 INSTALL을 시작 프로젝트로 설정한다.
선택 후
마우스 오른쪽 클릭
시작 프로젝트로 설정
클릭
86. 6. 오픈소스 빌드하기
[빌드]-[솔루션 빌드]를 눌러 빌드를 시작한다. – 빌드 시작하면 한참 기다려야한다.
*주의* OpenCV.sln을 열때 관리자 권한으로 열지 않으면 빌드 중에 권한 요구창이 계속 뜬다.
처음부터 관리자 권한으로 실행하거나 아니면 계속 '예'를 눌러야 한다.
[빌드]-[솔루션 빌드]
를 눌러 빌드한다.
87. 6. 오픈소스 빌드하기
빌드 실패) 보통 처음 빌드하면 잘 안될 때가 많다
CMake에서 설정을 변경후 ‘Configure’-’Generate’ 하거나 빌드 에러를 하나 하나 수정해야한다.
빌드에러 잡기
88. 6. 오픈소스 빌드하기
원인 분석) 에러를 보면 'cmd.exe'가 종료 된 이후에 lib파일을 못찾는 에러가 발생하였다.
->cmd가 왜 종료되었는지 알수 없지만 종료 원인이 권한 문제로 보여 Visual Studio를 관리자 권한으로 실행한다.
=>돋보기를 눌러 검색창을 연 후 Visual Studio를 검색하여, 마우스 오른쪽 버튼으로 클릭후 나오는 창에서
'관리자 권한으로 실행' 누른다.
빌드에러 잡기
‘cmd.exe’ 종료 에러 이후에
lib파일 열수 없다는 에러가 발생
1. '돋보기’ 그림을 클릭하여
검색창을 연다
2.Visual Studio 2017을 찾기위
해 이름을 입력한다.
3. 검색된 Visual Studio 2017을 오른
쪽 클릭하여 다음 창을 열고
'관리자 권한으로 실행'을 누른다.
89. 6. 오픈소스 빌드하기
[프로젝트/솔루션 열기]를 눌러 나온 찾기 창에서
빌드 폴더 경로(C:Users{사용자폴더}Downloadsopencv-3.3.0build)로 들어와 OpenCV.sln을 선택 후 연다.
빌드에러 잡기
프로젝트/솔루션
열기 클릭
2. OpenCV.sln
선택
3. '열기’ 클릭
1. 'build’ 경로
설정
90. 6. 오픈소스 빌드하기
다시 [CMakeTargets]-[INSTALL]을 빌드 해본다.
빌드에러 잡기
[INSTALL]의
[빌드] 클릭
92. 6. 오픈소스 빌드하기
에러 원인) Visual Studio 권한 문제로 빌드 도중 'cmd.exe'들이 종료 -> 빌드해야 할 파일들을 빌드하지 못함.
->빌드하지 못한 파일이 필요한 프로젝트 또한 빌드 실패.
에러 해결) Visual Studio 2017을 관리자 권한으로 열고, 빌드 진행하여 해결
빌드에러 원인
93. 6. 오픈소스 빌드하기
빌드 완료 후 [해당 경로]-[build] 폴더를 보면 ‘install’폴더가 만들어져 있습니다.
이 폴더 안에 빌드 결과물인 오픈소스 연동에 필요한 파일(바이너리,dll,lib 등)들이 있습니다.
이 파일들을 이전에 작성한 연동 하는 방법에 대한 가이드(Opencv,QT)를 참고하여 프로젝트에 연동하시면 됩니다.
빌드 후 생긴
INSTALL 폴더
클릭
프로젝트 연동에 필요한 바이
너리, 라이브러리 등 파일
94. 7. 오픈소스 빌드 파일에 대한 기초 지식
프로젝트 연동에 필요한 바이
너리, 라이브러리 등 파일
95. 7. 오픈소스 빌드 파일에 대한 기초 지식
빌드 결과(install) 폴더의 구성
bin
include
lib
etc
etc 폴더는 필요없음
96. 7. 오픈소스 빌드 파일에 대한 기초 지식
빌드 결과(install) 폴더의 구성
bin
include
lib
etc
etc 폴더는 필요없음
exe dll
h hpp
lib
폴더 파일
97. 7. 오픈소스 빌드 파일에 대한 기초 지식
빌드 결과(install) 폴더의 구성
bin
include
lib
etc
etc 폴더는 필요없음
exe dll
h hpp
lib
폴더 파일
98. 7. 오픈소스 빌드 파일에 대한 기초 지식
exe dll
h hpp
lib
알아야 할 배경지식
99. 7. 오픈소스 빌드 파일에 대한 기초 지식
exe dll
h hpp
lib
알아야 할 배경지식 - exe
100. 7. 오픈소스 빌드 파일에 대한 기초 지식
exe
exe 파일은 일반 c/c++ 소스 파일의 빌드 결과
exe는 프로그램 시작점인 main() 함수에서 시작 -> main 함수가 필요
알아야 할 배경지식 - exe
101. 7. 오픈소스 빌드 파일에 대한 기초 지식
알아야 할 배경지식 – 메인함수
int add(int a,int b){
return a+b;
}
int subtract(int a,int b){
return a - b;
}
void hello(){
std::cout<<“hello!”<<std::endl;
}
study.cpp
102. 7. 오픈소스 빌드 파일에 대한 기초 지식
int add(int a,int b){
return a+b;
}
int subtract(int a,int b){
return a - b;
}
void hello(){
std::cout<<“hello!”<<std::endl;
}
study.cpp
시작점?
시작점?
시작점?
이 파일이 어디서 시작할지 명시해야한다 -> main() 함수
?
알아야 할 배경지식 – 메인함수
103. 7. 오픈소스 빌드 파일에 대한 기초 지식
int add(int a,int b){
return a+b;
}
int subtract(int a,int b){
return a - b;
}
void hello(){
std::cout<<“hello!”<<std::endl;
}
void main(){
hello();
}
study.cpp
시작점
.c/.cpp파일의 main()함수로 시작점으로 하여 실행하는 프로그램이 exe가 된다.
알아야 할 배경지식 – 메인함수
104. 7. 오픈소스 빌드 파일에 대한 기초 지식
exe dll
h hpp
lib
알아야 할 배경지식 – 헤더파일(c:.h, c++: .hpp)
105. 7. 오픈소스 빌드 파일에 대한 기초 지식
알아야 할 배경지식 – 함수의 구성
int add(int a,int b){
return a+b;
}
선언부
구현부
106. 7. 오픈소스 빌드 파일에 대한 기초 지식
알아야 할 배경지식 – 함수의 구성
int add(int a,int b){
return a+b;
}
선언부
반환타입 함수이름(매개변수타입 매개변수명,..){
ex) int multiply(int a, int b){
-> int 타입 데이터 변수 a, 변수 b를 매개변수로
받는 함수 multiply는 int 타입의 데이터를 반환한다
=> 함수를 요약
구현부
함수 구현 알고리즘
107. 7. 오픈소스 빌드 파일에 대한 기초 지식
알아야 할 배경지식 – 함수의 활용
void hello(){
std::cout<<“hello!”<<std::endl;
}
void main(){
hello();
}
study.cpp
108. 7. 오픈소스 빌드 파일에 대한 기초 지식
알아야 할 배경지식 – 함수의 활용
void main(){
hello();
}
void hello(){
std::cout<<“hello!”<<std::endl;
}
study.cpp
109. 7. 오픈소스 빌드 파일에 대한 기초 지식
알아야 할 배경지식 – 함수의 활용
void main(){
hello();
}
void hello(){
std::cout<<“hello!”<<std::endl;
}
study.cpp
아직 선언 되지 않은 함수
hello()가 호출
110. 7. 오픈소스 빌드 파일에 대한 기초 지식
알아야 할 배경지식 – 함수의 활용
void hello();
void main(){
hello();
}
void hello(){
std::cout<<“hello!”<<std::endl;
}
study.cpp
main 함수 이전에 선언
111. 7. 오픈소스 빌드 파일에 대한 기초 지식
알아야 할 배경지식 – 함수의 활용
void hello();
void plus();
void minus();
void multiply();
...
void main(){
hello();
}
void hello(){
std::cout<<“hello!”<<std::endl;
}
....
study.cpp
미리 선언하자니
너무 길어지는 선언부
차라리 따로 만들자!
112. 7. 오픈소스 빌드 파일에 대한 기초 지식
알아야 할 배경지식 – 헤더파일(c:.h, c++: .hpp)
void main(){
hello();
}
void hello(){
std::cout<<“hello!”<<std::endl;
}
....
study.cpp
void hello();
void plus();
void minus();
void multiply();
...
study.hpp
함수 실행과 구현 파트
함수 선언 파트
(헤더 파일)
113. 7. 오픈소스 빌드 파일에 대한 기초 지식
알아야 할 배경지식 – 헤더파일(c:.h, c++: .hpp)
void main(){
hello();
}
void hello(){
std::cout<<“hello!”<<std::endl;
}
....
study.cpp
void hello();
void plus();
void minus();
void multiply();
...
study.hpp
cpp와 hpp를 합치기
114. 7. 오픈소스 빌드 파일에 대한 기초 지식
알아야 할 배경지식 – 헤더파일(c:.h, c++: .hpp)
#include “study.hpp”
void main(){
hello();
}
void hello(){
std::cout<<“hello!”<<std::endl;
}
....
study.cpp
#include “헤더파일명”
으로 study.hpp 가져오기
115. 7. 오픈소스 빌드 파일에 대한 기초 지식
알아야 할 배경지식 – 헤더파일(c:.h, c++: .hpp)
전처리
컴파일
링킹
어셈블
바이너리
빌드 과정
116. 7. 오픈소스 빌드 파일에 대한 기초 지식
알아야 할 배경지식 – 헤더파일(c:.h, c++: .hpp)
전처리
컴파일
링킹
어셈블
바이너리
빌드 과정
전처리 과정
1. 매크로
2. 치환
3. include
4. 프라그마전처리 단계에서
포함 처리가 된다.
117. 7. 오픈소스 빌드 파일에 대한 기초 지식
전처리
컴파일
링킹
어셈블
바이너리
빌드 과정
void hello();
void plus();
void minus();
void multiply();
...
void main(){
hello();
}
void hello(){
std::cout<<“hello!”<<std::endl;
}
....
study.cpp
include
결과
알아야 할 배경지식 – 헤더파일(c:.h, c++: .hpp)
118. 7. 오픈소스 빌드 파일에 대한 기초 지식
알아야 할 배경지식 – 헤더파일(c:.h, c++: .hpp)
정리
헤더파일(h/hpp)는 선언부 관련 코드를 분할하여 관리하고, 구현부를 연결하는 역활을 한다.
119. 7. 오픈소스 빌드 파일에 대한 기초 지식
exe dll
h hpp
lib
알아야 할 배경지식 – 라이브러리(lib,dll)
120. 7. 오픈소스 빌드 파일에 대한 기초 지식
알아야 할 배경지식 – 라이브러리(lib,dll)
헤더 파일은
include 시켰지만..
#include “study.hpp”
void main(){
hello();
}
void hello(){
std::cout<<“hello!”<<std::endl;
}
....
study.cpp
헤더 파일에 대한 구현부는
여전히 번잡스럽게 있다
121. 7. 오픈소스 빌드 파일에 대한 기초 지식
#include “study.hpp”
void main(){
hello();
}
void hello(){
std::cout<<“hello!”<<std::endl;
}
....
study.cpp
선언부를 study.hpp로 분할한 것처럼
구현부 함수도 분할하자
알아야 할 배경지식 – 라이브러리(lib,dll)
122. 7. 오픈소스 빌드 파일에 대한 기초 지식
#include “study.hpp”
void main(){
hello();
}
study.cpp
void hello(){
std::cout<<“hello!”<<std::endl;
}
int plus(int a, int b){
return a+b;
}
....
functions.cpp
study.cpp에서 따로 분리한
구현부
알아야 할 배경지식 – 라이브러리(lib,dll)
123. 7. 오픈소스 빌드 파일에 대한 기초 지식
#include “study.hpp”
void main(){
hello();
}
study.cpp
void hello(){
std::cout<<“hello!”<<std::endl;
}
int plus(int a, int b){
return a+b;
}
....
functions.cpp
functions.cpp를
study.cpp에 넣으면...
알아야 할 배경지식 – 라이브러리(lib,dll)
124. 7. 오픈소스 빌드 파일에 대한 기초 지식
#include “study.hpp”
#include “functions.cpp”
void main(){
hello();
}
study.cpp
fucntions.cpp도
include 하면 된다.
알아야 할 배경지식 – 라이브러리(lib,dll)
125. 7. 오픈소스 빌드 파일에 대한 기초 지식
#include “study.hpp”
#include “functions.cpp”
void main(){
hello();
}
study.cpp
study.hpp와 functions.cpp는
같은 함수에 대한 선언부와 구현부
=>hpp와 cpp를 합쳐 더 간결하게 만든다
알아야 할 배경지식 – 라이브러리(lib,dll)
study.cpp 파일에 다 합쳤지만
조금더 간결하게 만들수 있을것 같다.
126. 7. 오픈소스 빌드 파일에 대한 기초 지식
#include “study.hpp”
#include “functions.cpp”
void main(){
hello();
}
study.cpp
study.cpp
study.hpp
functions.cpp
현재 프로그램 구조
study.cpp에
study.hpp와 functions.cpp가 include
알아야 할 배경지식 – 라이브러리(lib,dll)
127. 7. 오픈소스 빌드 파일에 대한 기초 지식
#include “study.hpp”
#include “functions.cpp”
void main(){
hello();
}
study.cpp
study.cpp
functions.cpp
수정하려는 프로그램 구조
study.cpp에 functions.cpp를 포함하는
study.hpp를 인클루드한다.
study.hpp
알아야 할 배경지식 – 라이브러리(lib,dll)
128. 7. 오픈소스 빌드 파일에 대한 기초 지식
study.cpp
study.hpp
functions.cpp
study.cpp
study.hpp
functions.cpp
코드 구조 변경
알아야 할 배경지식 – 라이브러리(lib,dll)
129. 7. 오픈소스 빌드 파일에 대한 기초 지식
void hello();
void plus();
void minus();
void multiply();
...
study.hpp
void hello(){
std::cout<<“hello!”<<std::endl;
}
int plus(int a, int b){
return a+b;
}
....
functions.cpp
functions.cpp를
study.hpp에 포함한다
알아야 할 배경지식 – 라이브러리(lib,dll)
130. 7. 오픈소스 빌드 파일에 대한 기초 지식
#include “functions.cpp”
void hello();
void plus();
void minus();
void multiply();
...
study.hpp
study.hpp헤더파일에
구현부 cpp를 인클루
드 한다.
알아야 할 배경지식 – 라이브러리(lib,dll)
131. 7. 오픈소스 빌드 파일에 대한 기초 지식
#include “functions.cpp”
void hello();
void plus();
void minus();
void multiply();
...
study.hpp
void main(){
hello();
}
study.cpp
main 함수 뿐인 study.cpp에
헤더파일(선언부)+구현부 cpp(라이브러리=함수모음)인 study.hpp를
포함시킨다.
알아야 할 배경지식 – 라이브러리(lib,dll)
132. 7. 오픈소스 빌드 파일에 대한 기초 지식
#include “study.hpp”
void main(){
hello();
}
study.cpp
정리 결과
알아야 할 배경지식 – 라이브러리(lib,dll)
133. 7. 오픈소스 빌드 파일에 대한 기초 지식
#include “study.hpp”
void main(){
hello();
}
study.cpp
void hello();
void plus();
void minus();
void multiply();
...
void main(){
hello();
}
void hello(){
std::cout<<“hello!”<<std::endl;
}
....
study.cpp
하나의 파일에 코드가 합쳐진 study.cpp를
functions.cpp -> study.hpp -> study.cpp의 순으로
분할하여 인클루드하였다.
알아야 할 배경지식 – 라이브러리(lib,dll)
134. 7. 오픈소스 빌드 파일에 대한 기초 지식
알아야 할 배경지식 – 라이브러리(lib,dll)
지금 이걸 왜 하고 있는걸까?
조금 더 진행하자..
135. 7. 오픈소스 빌드 파일에 대한 기초 지식
알아야 할 배경지식 – 라이브러리(lib,dll)
라이브러리
함수의 집합
void hello(){
std::cout<<“hello!”<<std::endl;
}
int plus(int a, int b){
return a+b;
}
....
functions.cpp
빌드
main 함수가 없는
함수 구현부 집합
136. 7. 오픈소스 빌드 파일에 대한 기초 지식
알아야 할 배경지식 – 라이브러리(lib,dll)
void hello(){
std::cout<<“hello!”<<std::endl;
}
int plus(int a, int b){
return a+b;
}
....
functions.cpp
#include “functions.cpp”
void hello();
void plus();
void minus();
void multiply();
...
study.hpp
dll, lib
include 폴더 내의
헤더파일
137. 7. 오픈소스 빌드 파일에 대한 기초 지식
알아야 할 배경지식 – 라이브러리(lib,dll)
그래서 lib와 dll은 뭐일까?
dynamic link library(dll) 동적 연결 라이브러리
해당 라이브러리가 연동된 실행파일을 실행시 같은
경로에 두거나 환경변수로 찾아 동적으로 연결하여
동작한다.
static library(lib) 정적 라이브러리
프로젝트에 헤더파일과 라이브러리를 설정하여 사용
할때 lib 파일을 사용한다.
138. 7. 오픈소스 빌드 파일에 대한 기초 지식
알아야 할 배경지식 – 라이브러리(lib,dll)
소스파일
정리
main 함수를 제외한 함수들의 집합을 빌드하면 라이브러리(dll,lib)가 된다.
라이브러리는 해더 파일를 include한 소스 파일에서 호출되어 라이브러리 내 함수들이 동작한다.
lib : 라이브러리를 프로젝트 연동시에 사용 / dll : 라이브러리가 연동된 실행 파일 실행시에 사용
139. 7. 오픈소스 빌드 파일에 대한 기초 지식
알아야 할 배경지식 – 오픈소스 연동 방법
1. 프로젝트의 includepath 설정
- 헤더파일 폴더인 include의 경로를 등록한다.
2. 가져올 라이브러리의 경로를 설정
- 헤더파일과 연결된 라이브러리의 경로를 등록한다
3. 불러올 라이브러리를 설정한다. (visual studio에서는 추가 종속성이라 한다)
- 등록한 라이브러리 폴더 내에 존재하는 lib 파일들 중 프로젝트에 가져올 lib 파일을 설정한다.
140. 7. 오픈소스 빌드 파일에 대한 기초 지식
알아야 할 배경지식 – 오픈소스 연동 방법
1. 프로젝트의 includepath 설정
- 헤더파일 폴더인 include의 경로를 등록한다.
2. 가져올 라이브러리의 경로를 설정
- 헤더파일과 연결된 라이브러리의 경로를 등록한다
3. 불러올 라이브러리를 설정한다.
(visual studio에서는 추가 종속성이라 한다)
- 등록한 라이브러리 폴더 내에 존재하는 lib 파일들 중
프로젝트에 가져올 lib 파일을 설정한다.
잘못할때 발생하는 에러
헤더파일을 찾지 못한다.
라이브러리를 호출하지 못한다.
->link 에러
라이브러리를 호출하지 못한다.
->link 에러
141. 8. 오픈소스 빌드 파일 분석
실행파일(exe)
동적라이브러리(dll)
헤더파일(h,hpp)
정적라이브러리(lib)
빌드 결과 폴더
142. 8. 오픈소스 빌드 파일 분석
bin 폴더
OPENCV 관련된 실행파일(exe)와 동적라이브러리(dll)이 존재한다.
143. 8. 오픈소스 빌드 파일 분석
bin 폴더
이전에 CMake 설정에서 opencv_world(OPENCV 기본 통합 라이브러리)를 빌드하도록 하여 bin 폴더에
opencv_world330(버전).dll 이 만들어져 있다.
CMake의 설정에 따라 빌드할 라이브러리나 실행파일 등을 수정 할 수 있다.
*여기서 opencv_world330.dll 을 제외한 파일들은 신경쓰지 않아도 된다.
144. 8. 오픈소스 빌드 파일 분석
오픈소스 환경변수 설정 관련 질의응답
질문) 예전에 오픈소스 사용하면서 환경변수를 등록했었던것 같은데
오픈소스를 빌드해서 만들어진 bin 폴더를 환경변수 등록해줘야 하지 않나요??
답변) 꼭 할 필요는 없습니다.
보통 오픈소스를 다운받은 후 [build]-[bin] 폴더를 시스템 환경 변수로 등록하는데
이는 오픈소스가 연동된 프로젝트를 빌드하여 만든 실행파일을 실행할 때
실행 파일이 필요한 오픈소스의 동적 라이브러리(dll)를 찾기 때문에
어디서 라이브러리를 찾으면 되는지 선언하는 것으로
사용자 환경 변수를 설정 하지 않더라도
필요한 dll을 실행파일과 같은 경로에 놓으면 환경 변수 등록 없이 쓸수있습니다.
=>이해를 위해 뒤 내용을 참고해 주세요.
*잠깐* 질의응답
145. 8. 오픈소스 빌드 파일 분석
오픈소스 환경변수 설정 관련 질의응답
사용자/시스템 환경 변수 설정의 이유
-> 현재 윈도우 계정(사용자)/시스템(컴퓨터) 영역에서 미리 자주 사용할 실행파일 또는
라이브러리의 경로를 쉽게 찾을 수 있도록 미리 선언하는 것으로 CMD 창에서 ‘ipconfig’
와 같은 명령어를 해당 실행 파일이 현재 경로에 없어도 모든 경로에서 사용할 수 있는 이
유도 ipconfig 실행파일의 경로가 환경변수 등록되어있기 때문이다.
C:Usershp 에는 ipconfig.exe가 없지만
ipconfig 위치를 미리 환경변수로 선언하였기
때문에 찾아서 실행됬다
146. 8. 오픈소스 빌드 파일 분석
환경변수 등록 파일 사용 흐름
현재 경로에 필요한
라이브러리 또는 실행
파일이 있는가?
현재 경로의 라이브러리를
링크 또는 실행파일 실행
YES NO
시스템 환경변수에
등록된 경로로 필요한
파일을 찾을수 있는가?
해당 시스템 환경변수
경로에서 파일 실행
YES NO
사용자 환경변수에
등록된 경로로 필요한
파일을 찾을수 있는가?
해당 사용자 환경변수
경로에서 파일 실행
YES NO
-ERROR-
실행 파일 또는 라이브러
리를 찾을수 없습니다
147. 8. 오픈소스 빌드 파일 분석
실행 흐름 – QT 연동의 예
VC15
구현
프로그램
COMPILE
QT 바이너리 프로그램 소스파일
INCLUDE
LINKING
구현
실행파일
EXE
148. 8. 오픈소스 빌드 파일 분석
VC15
구현
프로그램
VC15
COMPILE
QT header, lib
(lib만 약 38MB)
프로그램 소스파일
INCLUDE
LINKING
구현
실행파일
EXE
QT 기본 최소 라이브러리
약 38MB
QT 기본 연동
프로젝트 실행파일
620KB
실행파일은
620KB
실행 흐름 – QT 연동의 예
149. 8. 오픈소스 빌드 파일 분석
구현
실행파일
EXE
오픈소스 동적 라이브러리
DLL
오픈소스 연동
프로그램 실행
EXE + DLL로 프로그램 실행
실행lib 만 합쳐도 38MB인데
실행파일은 620KB
620KB 실행파일로 QT를 사용할수 있을까?
실행 흐름 – QT 연동의 예
150. 8. 오픈소스 빌드 파일 분석
구현
실행파일
EXE
오픈소스 동적 라이브러리
DLL
오픈소스 연동
프로그램 실행
실행 흐름 – QT 연동의 예
151. 8. 오픈소스 빌드 파일 분석
실행 요약
빌드 : 오픈소스를 프로젝트에 연동하여 빌드 할때 header와 lib가 필요하다.
-> 프로젝트 설정 시 includepath(include 폴더-헤더파일) 경로와 라이브러리 디렉터리(+링크 파일) 설정한다.
실행 : 실행 파일을 실행 시에는 오픈소스의 dll을 찾아서 사용한다.
*dll 검색과정 : 현재 디렉토리 -> 시스템 환경변수 -> 사용자 환경변수 -> 없으면 ERROR
152. 8. 오픈소스 빌드 파일 분석
실제 QT 연동 프로그램 실행 하기
환경 변수는 없지만, 현재 경로에 dll이 있는 경우 => 실행 OK
실행 파일 경로 환경 변수
153. 8. 오픈소스 빌드 파일 분석
환경 변수는 없고, 현재 경로에도 dll이 없는 경우 => 에러 발생
실행 파일 경로 환경 변수
실제 QT 연동 프로그램 실행 하기
154. 8. 오픈소스 빌드 파일 분석
환경 변수는 있지만, 현재 경로에 dll이 없는 경우 => 실행 OK
실행 파일 경로 환경 변수
C:Qt5.1.0(버전)msvc15_64(플랫폼)bin
->exe, dll 이 존재
실제 QT 연동 프로그램 실행 하기
155. 8. 오픈소스 빌드 파일 분석
환경 변수도 있고, 현재 경로에 dll도 있는 경우 => 실행 OK
실행 파일 경로 환경 변수
실제 QT 연동 프로그램 실행 하기
156. 8. 오픈소스 빌드 파일 분석
include 폴더
includepath로 설정하는 폴더로 헤더파일들이 들어가 있다.
157. 8. 오픈소스 빌드 파일 분석
lib 폴더
프로젝트 연동시에 연결하는 라이브러리의 폴더이다.
158. 8. 오픈소스 빌드 파일 분석
플랫폼 및 IDE 별 연동방법
이전에 작성한 문서들을 참고하여 연동한다.