'Develop/VC'에 해당되는 글 8건

  1. uafxcwd.lib(afxmem.obj) error LNK2005 2013.02.12
  2. [LibJingle]VS2010 빌드 2013.01.15
  3. [펌]문서화 자료 찾다 찾은 링크 2009.04.15

구성 속성 - 링커 - 입력 - 특정 라이브러리 무시 항목에 다음을 입력.

uafxcwd.lib;LIBCMTD.lib

구성 속성 - 링커 - 입력 - 추가 종속성 항목에 다음을 순서대로 입력.

uafxcwd.lib LIBCMTD.lib

,

[LibJingle]VS2010 빌드

from Develop/VC 2013. 1. 15. 10:29

gclient를 이용 아래 순서에 따라 빌드

example내 call.exe의 경우 오픈파이어 서버 접속을 위해 url 수정 및 패스워드 전송추가


talk_base::InsecureCryptStringImpl pass;

if (argc > 2) {

      pass.password() = argv[2];

    }

if (pass.password().empty() && !test_server && oauth_token.empty()) {

    Console::SetEcho(false);

    Print("Password: ");

    std::cin >> pass.password();

    Console::SetEcho(true);

    Print("\n");

  }

pass.password() = jid.node();

xcs.set_pass(talk_base::CryptString(pass));//pmj add


현재 로그인 과정에서는 호환성 문제 없어보임.



Libjingle


1. Introduction


Libjingle is a set of components provided by Google to implement Jingle

protocols XEP-166 (http://xmpp.org/extensions/xep-0166.html) and XEP-167

(http://xmpp.org/extensions/xep-0167.html). Libjingle is also backward

compatible with Google Talk Call Signaling

(http://code.google.com/apis/talk/call_signaling.html). This package will

create several static libraries you may link to your projects as needed.


-talk               - No source files in talk/, just these subdirectories

|-base              - Contains basic low-level portable utility functions for

|                     things like threads and sockets

|-p2p               - The P2P stack

  |-base            - Base p2p functionality

  |-client          - Hooks to tie it into XMPP

|-session           - Signaling

  |-phone           - Signaling code specific to making phone calls

    |-testdata      - Samples of RTP voice and video dump

  |-tunnel          - Tunnel session and channel

|-third_party       - Folder for third party libraries

  |-libudev         - Folder containing libudev.h

|-xmllite           - XML parser

|-xmpp              - XMPP engine


In addition, this package contains two examples in talk/examples which

illustrate the basic concepts of how the provided classes work.


2. How to Build


We now support two ways to build libjingle: GYP and Scons. We recommend

using GYP which is easier to get dependencies and simple to use.


2.1. Building using GYP


2.1.1. Prerequisites


First, be sure to install the prerequisite software.

http://www.webrtc.org/reference/getting-started/prerequisite-sw


The currently supported platforms are Windows, Mac OS X, and Linux.


2.1.2. Getting the code and building


Create a working directory, enter it, and run:

$ gclient config http://libjingle.googlecode.com/svn/trunk

$ gclient sync


The sync will generate native build files for your environment using gyp

(Linux: make/ninja, OS X: XCode/make/ninja, Windows: Visual Studio). This

generation can also be forced manually:

$ gclient runhooks


It is also possible to choice the build method by set the environment variable

GYP_GENERATORS. For examplerun this on mac will generate makefiles instead of

xcode projects:

$ GYP_GENERATORS=make gclient runhooks


For more information on ninja build:

http://code.google.com/p/chromium/wiki/NinjaBuild


On Windows, gyp will use the latest Visual Studio on your system by default.

In order to specify a particular Visual Studio version, there are a few

options. You can set an environment variable GYP_MSVS_VERSION=<version> before

runhooks, or manually run the gyp command triggered by runhooks. From the

trunk/ directory:

$ build/gyp_chromium --depth=. -G msvs_version=<version> talk/libjingle_all.gyp


where <version> is, for example, 2008.


2.2. Building using SCons 


2.2.1. Prerequisites


Libjingle is built with swtoolkit (http://code.google.com/p/swtoolkit/), which

is a set of extensions to the open-source SCons build tool (www.scons.org).


  * First, install Python 2.4 or later from http://www.python.org/.

    Please note that since swtoolkit only works with Python 2.x, you will

    not be able to use Python 3.x.


    python --version to confirm that python is in your path, and 2.4 or greater.


  * Second, install the stand alone scons-local zip package 2.0.0 or later from

    http://www.scons.org/download.php and set an environment variable,

    SCONS_DIR, to point to the directory containing SCons.

    For example, on Windows, download

    http://sourceforge.net/projects/scons/files/scons-src/2.0.1/scons-local-2.0.1.zip

    Unzip to C:\src\libjingle\scons-local\

    set SCONS_DIR=C:\src\libjingle\scons-local\scons-local-2.0.1


  * Third, install swtoolkit from http://code.google.com/p/swtoolkit/.

    For example, on Windows download

    http://code.google.com/p/swtoolkit/downloads/detail?name=swtoolkit.0.9.1.zip

    Unzip to C:\src

    Optionally add swtoolkit to path.  Otherwise call hammer.bat directly.

    set PATH_TO_SWTOOLKIT=c:\src\swtoolkit

    set PATH=%PATH_TO_SWTOOLKIT%;%PATH%


  * Finally, download and install the unit test framework from

    http://code.google.com/p/googletest/downloads/list

    To install it, just unzip the package and put the file folder under

    /talk/third_party/ directory and rename it from "gtest-x.x.x" to "gtest",

    so that your folder structure looks like:

    /talk/third_party/gtest/...


2.2.2. libjingle


Libjingle needs to be downloaded and patched


  * First, install Libjingle.  Since this README lives within Libjingle,

    this step is normally already done.

    Libjingle home page is here http://code.google.com/p/libjingle/

    For example, on Windows, download

    http://libjingle.googlecode.com/files/libjingle-0.5.2.zip

    unzip to C:\src\


  * Second, Libjingle depends on two open-source projects, expat and srtp.

    Download expat from http://sourceforge.net/projects/expat/ to

    talk/third_party/expat-2.0.1/. Download srtp at

    http://libjingle.googlecode.com/files/srtp-cvs.zip to

    talk/third_party/srtp. Note that srtp-1.4.4 does not work since it misses

    the extensions used by Libjingle.

    If you put expat or srtp in a different directory, you need to edit

    talk/libjingle.scons correspondingly.

    rename srtp-cvs to srtp

    For example, on Windows, download expat

    http://sourceforge.net/projects/expat/files/expat/2.0.1/expat-2.0.1.tar.gz

    Unzip to C:\src\libjingle-0.5.2\talk\third_party

    Download srtp

    http://libjingle.googlecode.com/files/srtp-cvs.zip

    Unzip to C:\src\libjingle-0.5.2\talk\third_party

    rename C:\src\libjingle-0.5.2\talk\third_party\srtp-cvs srtp


  * Third, on Windows, copy config.h

    copy talk\third_party\srtp\config.hw talk\third_party\srtp\crypto\include\config.h


2.2.3. Build Libjingle under Linux or OS X

  * On Linux, you need to install libssl-dev, libasound2-dev and gtk+2.0.

  * Some optional new features in OpenSSL are only available in OpenSSL v1.0

    and above. To build with new OpenSSL features, you need to add the

    "HAS_OPENSSL_1_0" to the cppdefine under the

    "talk.Library(env, name = jingle..." section in the "libjingle.scons" file.

    Then download the OpenSSL v1.0 from the following URL:

    http://www.openssl.org/source/openssl-1.0.0e.tar.gz

    Unzip the downloaded package to the "third_party/openssl", such that it creates

    the directory "third_party/openssl/include/", etc.

  * To build Libjingle, first make sure the SCONS_DIR environment variable

    is set correctly.

  * Second, run talk/third_party/expat-2.0.1/configure and

    talk/third_party/srtp/configure.

  * Third, go to the talk/ directory and run $path_to_swtoolkit/hammer.sh. Run

    $path_to_swtoolkit/hammer.sh --help for information on how to build for

    different modes.


2.2.4. Build Libjingle under Windows

  * First, make sure the SCONS_DIR environment variable is set correctly and

    Microsoft Visual Studio is installed.

    dir %SCONS_DIR%

    Should show a folder containing Scons\

  * Second, go to the talk\ directory and run %PATH_TO_SWTOOLKIT%\hammer.bat.

    To get help run:

    %PATH_TO_SWTOOLKIT%\hammer.bat --help

    different modes. You can run the last step under Visual Studio Command

    Prompt if Visual Studio tools are not under the path environment variable.

    Example to build call.exe

    %PATH_TO_SWTOOLKIT%\hammer.bat

    Example to build opt and dbg all programs

    %PATH_TO_SWTOOLKIT%\hammer.bat --jobs=6 --verbose --mode=all all_programs



The built binaries are under talk/build/dbg/staging or talk/build/opt/staging,

depending on the build mode. When the build is complete, you can run the

examples, login or call. For the call sample, you can specify the input and

output RTP dump for voice and video. This package provides two samples of input

RTP dump: voice.rtpdump is a single channel, 16Khz voice encoded with G722, and

video.rtpdump is 320x240 video encoded with H264 AVC at 30 frames per second.

These provided samples will inter-operate with Google Talk Video. If you use

other input RTP dump, you may need to change the codecs in call_main.cc, lines

215 - 222.


Libjingle also builds two server tools, a relay server and a STUN server. The

relay server may be used to relay traffic when a direct peer-to-peer connection

could not be established. The STUN Server implements the STUN protocol for

Session Traversal Utilities for NAT(rfc5389), and the TURN server is in active

development to reach compatibility with rfc5766. See the Libjingle Developer

Guide at http://developers.google.com/talk/libjingle/developer_guide for

information about configuring a client to use this relay server and this STUN

server.


To use LinphoneMediaEngine, you need to perform the following additional steps:

  * Download and install the "MediaStreamer" library on your

    machine.

  * Add the following lines into the libjingle.scons file.

    In the "talk.Library(env, name = "libjingle",..." section, you need to add:

      "HAVE_LINPHONE",

      "HAVE_SPEEX",

      "HAVE_ILBC",

    to the "cppdefines = [".


    In the "talk.App(env, name = "call",..." section, you need to add:

      "mediastreamer",

    to the "libs = [".

  * In the libjingle.scons file, add the following line into the "srcs = [ ..."

    section of the "libjingle" Library.

      "session/phone/linphonemediaengine.cc",

,

 www.clien.net의 xman님의 글을 무단 발췌함!
 그분의 취지가 구닥다라 노가대 코더 탈출.. 생산성 향상 임으로
 그 뜻에 그게 반하지 않는다고 판단하였음.

 

 파일 폴더 비교 프로그램
 비교상태에서 틀린 부분을 옮기거나 간단한 수정도 됨
 "Beyond Compare" - http://www.scootersoftware.com

  유사 오픈 소스 프로젝트 http://winmerge.sourceforge.net/

 

 코드의 줄, 칸을 맞추어 주는 프로그램
 이런 것을 Code Beautifier 라고 부릅니다.

 "SourceStyler C++" -  http://www.ochre.com

 소스 코드를 플로차트로..
" SourceCode to Flowchart" - http://www.fatesoft.com

 프로그램 상에서는 순서도 그림이 이상하지만
  Word, Visio 등으로 변환할 수 있습니다.
  이때는 그림이 괜찮더군요.
  이런 종류를 CASE(Computer Aided Software Engineering)

  문서화

 "Doxygen" - http://www.stack.nl/~dimitri/doxygen/

  말 그대로 Document Generator 입니다.
 하지만 무슨 인공지능이 있는것도 아니고 소스코드를 알아서 문서화하지는
 않겠죠. 소스코드를 작성할 때 주석등을 일정한 형태의 Tag(? )를 달아 그것을 참고로 문 서가 되는 형태입니다. GNL 프로젝트로 소스도 공개되고 있고
어떤형태로 사용하든지 공짜인것 같습니다. 
 문서형태가 다양해서 Html, rtf, Latex 등 여러가지 포멧으로 나옵니다.
영문, 한글도 가능하고요. rtf 포멧이 Doc 문서와 거의 호환이 가능해서 문서
화에 가장 좋은 것 같습니다. 그런데 현재 버젼으로는 한글이 rtf로 나오지는
않지만 약간의 편법으로 한글 rtf 문서가 생성될 수 도 있습니다.
이것은 호응이 좋으면 제가 알려 드리죠.
html 문서도 링크도 생성되어 함수 검색도 쉬워지는 장점도 있고, 심지어
목차까지 생성됩니다.
일단 코드를 그냥 변환하면 되기 때문에 코드가 변경되었다고 또 다시 문서를 작성할 필요없이 바로 생성만 하면됩니다. 그래서 별도의 노력없이 그럴듯해보이는 문서가 클릭한방에 생성되기도 합니다.

물론 코드의 주석 작성할 때 노력을 하지 않으면 쓰레기 문서가 양산되겠지만요.
(쓰레기 문서라도 볼만합니다. 기본 함수와 클래스, 연결도 정도는 자동으로 나오니까요)
몇달전부터 Doxygen으로 주석붙이고 있는데 정말 만족스럽더라구요. ^^
게다가 Graphviz를 같이 사용하면 멋진 호출관계 다이어그램까지 만들어줍니다

 ( Source Insight+Araxis Merge+ClearCase)

 편집기 
  MFC를 사용하시는 분들은 MS Visual Studio 를 사용하시겠고.
  UltraEdit 나 TextPad 등을 사용하시나요?

   Source Insight - http://www.sourcedyn.com

저의 경우는 윈도우즈 용이 아니기 때문에
VI -> TextPad -> UltraEdit -> Source Insight 로 변경했습니다.
VI 경우는 UNIX를 쓸 때 만 썼고 그당시 방향키가 없는것이 크게 당황
했는데 또 쓰다보니 적응도 되더라고요.

현재는 Source Insight 를 사용하고 있는데 여러 면에서 만족스럽습니다.
Explorer에서 이전 페이지를 다음 페이지를 가는것 처럼 코드를 왔다갔다
하기도 편하고 함수나 변수를 마우스로 찍으면 이동하지 않고도 아래에
그 내용이 보이기도 합니다. (전 이기능이 가장 맘에 듭니다.) 함수/변수의 콜 관계도 쉽게 볼수 있고요.

S/W 작성하다 보면 라인수가 얼마냐는 이야기를 많이 듣게 됩니다.
그럴때 어떻게 하시나요?

흥 웃으시면서 Editor 가장 아래까지 가서 라인수를 알려주신다고요?

화일이 하나도 아닌데 그렇게 하면 힘드시겠죠?
주석도 있고 빈라인도 있는데 말이죠.

Line Counter http://noeld.com/programs.asp?cat=misc#lcounter

저는 위의 프로그램을 씁니다.
beggarware 라고 하는데 상업적으로 쓰면 연락해 달라고 하는데
이걸 돈 주고 사면 좀(?) 아까울것 같아요. 프로그램 크기가 84kbyte 밖에
안되고 프롬프트에서 작동합니다.

C/C++/C# 를 지원하고

lc  /s /v > result.txt

이런 방식으로 사용하면 하위 폴더까지 알려 줍니다.
여러개 찾아봤는데 이렇게 간단하면서 꼭 필요한 정보를
표시하는것이 별로 없더군요.

 

 하이퍼 터미널.

 Hyper Terminal은 Windows 기본인데 무슨 소리냐 하시는 분이 있는데

저의 경우 Hyper Terminal 을 쓰면 문제가 위로 올라가 버린 데이터들이
깨져서 보이지 않는 문제가 있었습니다. 물론 설정에는 500 라인 어쩌구
하는데 딱 화면에 보이는것만 괜찮고 위로 스크롤하면 데이터가 깨져서
볼수가 없었습니다.

물론 데이터맨을 깔 수 도 있지만 S/W 단속 때문에 깔수도 없고해서
알아보니 HyperTerminal 뜰때 나오는 회사(http://www.hilgraeve.com)
에 가면 6.3 버젼을 다운 받을 수 있습니다.

원래 Windows에 깔려있는것이 5.x 이지요.

 

-----------------------------------------------
 doxygen 관련 홈페이지 모음.

http://www.doxygen.org/index.html
: Doxygen 홈페이지

http://www.stack.nl/~dimitri/doxygen//manual.html
: Doxygen 홈페이지에 있는 매뉴얼

http://www.codeproject.com/macro/kingstools.asp
: KingsTools <= Visual Studio .NET 에서 설치 가능한 DoxyGen 자동화 툴

http://www.gpgstudy.com/gpgiki/DoxygenTutorial
: 류광님의 Doxygen Tutorial

http://www.viper.pe.kr/wiki/wiki.php/Doxygen%20%C0%B8%B7%CE%20%B9%AE%BC%AD%20%C0%DA%B5%BF%C8%AD%C7%CF%B1%E2
: Doxygen 설치 및 설정하기

http://www.redwiki.net/wiki/wiki.php/doxygen/%BC%D2%BD%BA%C1%D6%BC%AE%BA%D9%C0%CC%B1%E2
: Doxygen 사용법

http://www.pie.pe.kr/moniwiki/wiki.php/Doxygen
: Doxygen 사용법


,