(worker3, &ObserverWorker::handleNotification2));
69 |
70 |
71 | nc.postNotification(new BaseNotification(0));
72 | nc.postNotification(new BaseNotification(1));
73 | nc.postNotification(new BaseNotification(2));
74 |
75 | std::cout << std::endl << std::endl;
76 | }
--------------------------------------------------------------------------------
/PocoSamples/Samples/serverApplication.h:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jacking75/examples_Cpp_Poco/c483e846686dcea67ad49ab7eea13ac1010ac321/PocoSamples/Samples/serverApplication.h
--------------------------------------------------------------------------------
/PocoSamples/Samples/singletonholder.h:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jacking75/examples_Cpp_Poco/c483e846686dcea67ad49ab7eea13ac1010ac321/PocoSamples/Samples/singletonholder.h
--------------------------------------------------------------------------------
/PocoSamples/Samples/stopwatch.h:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jacking75/examples_Cpp_Poco/c483e846686dcea67ad49ab7eea13ac1010ac321/PocoSamples/Samples/stopwatch.h
--------------------------------------------------------------------------------
/PocoSamples/Samples/workerThread.h:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jacking75/examples_Cpp_Poco/c483e846686dcea67ad49ab7eea13ac1010ac321/PocoSamples/Samples/workerThread.h
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # CookBookPOCOCpp
2 | C++ 오픈소스 POCO 사용법 정리
3 |
--------------------------------------------------------------------------------
/build.md:
--------------------------------------------------------------------------------
1 | ## 개요
2 | - 다운로드: http://pocoproject.org/download/index.html
3 | - 문서: http://pocoproject.org/documentation/index.html
4 |
5 |
6 | ## Windows
7 | - VS2010, x64, static lib 으로 빌드
8 | - buildwin.cmd 100 build static_mt both x64 samples tests devenv
9 | - 이렇게 빌드하면 PocoFoundation만 빌드 된다. 그래서 Util, XML, Net, MongoDB 등을 직접 빌드해야 한다.
10 | - Util 등의 라이브러리 디렉토리에 VS 버전, 32 or 64 플랫폼별 VS 프로젝트 파일이 있다.
11 | - 모두 빌드가 완료되면 lib64 디렉토리에 만들어져 있다.
12 | - VS2015, static mt, debug/release, x64 로 빌드
13 | - buildwin.cmd 140 rebuild static_mt both x64
14 | - VS2015, static md, debug/release, x64 로 빌드
15 | - buildwin.cmd 140 rebuild static_md both x64
16 | - OpenSSL 빌드
17 | - openssl-1.0.2을 플랫폼 별로 빌드한다. D:/Libraries/openssl-1.0.2-x86 と D:/Libraries/openssl-1.0.2-x64
18 | - components 파일을 열어서 OpenSSL 관련 디렉토리를 위의 디렉토리로 변경한다. set OPENSSL_DIR=D:\Libraries\openssl-1.0.2-x64
19 | - 생성된 lib 파일과 헤더 파일 디렉토리로 VS 프로젝트 설정에 등록한다.
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 | ## Linux
31 |
32 | 공식 사이트에서 최신 버전을 다운로드 한다.
33 | 압축을 풀고, 빌드한다.
34 |
35 | 아래는 64비트, static 라이브러리, 테스트와 샘플은 제외 하는 설정으로 빌드 한다
36 |
37 | $ tar zxvf poco-1.7.8p2-all.tar.gz
38 | $ cd poco-1.7.8p2-all/
39 |
40 | $ export OSARCH_64BITS=1
41 | $ ./configure --static --no-tests --no-samples
42 | $ make
43 |
44 |
45 | 설정 정보는 아래 처럼 더 추가할 수 있다.
46 |
47 | ./configure --omit=Data/ODBC,Data/SQLite --prefix=/usr --cflags=-fPIC --cflags=-std=c++11 --static --shared --no-tests --no-samples
48 |
49 |
50 | 빌드가 끝나면 아래 디렉토리에 라이브러리가 만들어져 있다.
51 |
52 | lib/Linux/x86_64
53 |
54 |
55 | 디버그 버전은 라이브러리 이름 뒤에 'd'가 붙고, 64비트 버전은 뒤에 '64'가 붙는다.
56 |
57 |
58 | ### 샘플 예제
59 | sample.cpp
60 | ```
61 | #include
62 | #include
63 |
64 | int main() {
65 | Poco::RegularExpression regexp("^[a-zA-Z]+");
66 |
67 | std::string buf;
68 | regexp.extract("ABC123", buf);
69 | std::cout << buf << std::endl; //=> ABC
70 |
71 | return 0;
72 | }
73 | ```
74 |
75 | Makefile
76 | ```
77 | CXX=g++
78 | CXXFLAGS=-I/mnt/e/linux/dev/c++/thirdparty/poco/Foundation/include
79 | LDFLAGS=-L/mnt/e/linux/dev/c++/thirdparty/poco/lib/Linux/x86_64
80 | LDLIBS=-lPocoFoundation64
81 |
82 | all:sample
83 |
84 | clean:
85 | rm -rf sample
86 | rm -rf *.o
87 | ```
88 |
89 |
90 |
91 |
92 | ### 예제 돌려보기
93 |
94 | http://knoow.tistory.com/74
95 | http://scriptlabo.blog26.fc2.com/blog-entry-35.html
96 | https://www.qoosky.io/techs/8e92d3d34a
97 |
98 |
--------------------------------------------------------------------------------
/resource/PocoVCInclude.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jacking75/examples_Cpp_Poco/c483e846686dcea67ad49ab7eea13ac1010ac321/resource/PocoVCInclude.png
--------------------------------------------------------------------------------
/resource/PocoVCLib.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jacking75/examples_Cpp_Poco/c483e846686dcea67ad49ab7eea13ac1010ac321/resource/PocoVCLib.png
--------------------------------------------------------------------------------