Welcome to CMake, the cross-platform, open-source build system. CMake is a family of tools designed to build, test and package software. CMake is used to control the software compilation process using simple platform and compiler independent configuration files. CMake generates native makefiles and workspaces that can be used in the compiler environment of your choice.

[링크 : http://www.cmake.org/]

oscam을 컴파이르 하는데 cmake 라는것을 요구하길래 먼가해서 검색해 봤더니
cross platform을 지원하는 make 라고 한다.

사용법은
cmake
make 라는데

configure 와 유사한 역활을 하는것으로 보인다.

'프로그램 사용 > make, configure' 카테고리의 다른 글

cmake 사용  (0) 2011.10.07
cross compile 초기화 하기  (0) 2010.05.18
makefile 에서 컴파일할 목록 생성하기  (0) 2010.04.03
makefile 정렬하기  (2) 2010.03.31
make, gmake  (0) 2010.03.02
Posted by 구차니
mysql 실행하기
mysql -uUSERID -pPASSWORD

mysql 종료하기
quit
exit
ctrl-D

데이터베이스(database) > 테이블(table)
생성(create) / 삭제(drop)

블로그나 wiki 설치을 위한 데이터베이스 생성
create database DATABASENAME;

목록보기(show)
show databases;
use DATABASENAME;
show tables;

데이터베이스 삭제
drop DATABASENAME;

[링크 : http://mulsoft.com/site/bbs/board.php?bo_table=mulsoft04&wr_id=1&sca=USER]

'프로그램 사용 > mysql & mariaDB' 카테고리의 다른 글

mysql / mariaDB  (1) 2014.04.16
mysql transaction  (0) 2014.04.08
mysql grant 문  (0) 2014.04.01
mysql 암호변경하기  (0) 2013.02.21
mysql 명령어 정리  (0) 2012.12.01
Posted by 구차니
makefile에서
OBJS = a.o b.o
SRC = $(OBJ:.o=.c)

a.o : a.c
b.o : b.c
이런식으로 파일을 일일이 나열을 하는데, 아무래도 귀찮다 -ㅁ-!

하지만 $(wildcard) 라는 함수를 이용하면 나열은 하지 않아도 된다.
SRC = $(wildcard *.c)
OBJ = $(SRC:.c=.o)

이렇게 하면 (의존성은 제외하더라도) 복잡하게 할 필요 없이 간단하게 끝!

[링크 : http://www.viper.pe.kr/docs/make-ko/make-ko_4.html#SEC21]

'프로그램 사용 > make, configure' 카테고리의 다른 글

cross compile 초기화 하기  (0) 2010.05.18
cmake - cross make  (0) 2010.04.06
makefile 정렬하기  (2) 2010.03.31
make, gmake  (0) 2010.03.02
개발환경 자동화 - autoconf, automake, libtool  (0) 2010.03.02
Posted by 구차니
프로그램 사용2010. 4. 3. 00:23
APM을 설치하고
보안 기본설정에서 http://localhost 로 접속하면 인트라넷 보안수준으로 접속을 하는데
텍스트큐브 로그인이 되지 않는다.(로컬에 설치한 텍큐)

http://127.0.0.1 로 접속하면 인터넷 보안수준으로 접속하는데,
이 경우에는 텍스트큐브 로그인이 된다.


음.. IE8 문제일까? 텍큐 문제일까?
Posted by 구차니
만우절 이벤트로 안되게 했을리는 없고..
머가 바뀌걸까?
Posted by 구차니
expat xml 파서를 이용해서 xml을 구조화시키는(간단하게 탭정렬) 것을 하다보니, data 부분에서 파싱에러가 발생한다.
URL 등에서 &가 & 로 변환되지 않았다고
"세미콜론이(;)이 와야 합니다." 라는 문법오류가 발생한다.

아무튼 expat의 기본샘플 프로그램(?)인
xmlwf.c의 내용을  보니 별도로 이러한 특수문자를 처리하는 함수가 있었다.

static void XMLCALL
characterData(void *userData, const XML_Char *s, int len)
{
  FILE *fp = (FILE *)userData;
  for (; len > 0; --len, ++s) {
    switch (*s) {
    case T('&'):
      fputts(T("&"), fp);
      break;
    case T('<'):
      fputts(T("<"), fp);
      break;
    case T('>'):
      fputts(T(">"), fp);
      break;
#ifdef W3C14N
    case 13:
      fputts(T("&#xD;"), fp);
      break;
#else
    case T('"'):
      fputts(T("""), fp);
      break;
    case 9:
    case 10:
    case 13:
      ftprintf(fp, T("&#%d;"), *s);
      break;
#endif
    default:
      puttc(*s, fp);
      break;
    }
  }
}

아무튼, 많이 보던 녀석인데 도대체 어떤 표준인지 알수가 없는데,
검색하다 보니 iso8859-1 인것 같기도 하고.. 구분이 모호하다.
아무튼, XHTML/HTML에서 사용되는 방식인듯 하다.

Reserved Characters in HTML

Some characters are reserved in HTML and XHTML. For example, you cannot use the greater than or less than signs within your text because the browser could mistake them for markup.

HTML and XHTML processors must support the five special characters listed in the table below:

Character Entity Number Entity Name Description
" &#34; &quot; quotation mark
' &#39; &apos; (does not work in IE) apostrophe 
& &#38; &amp; ampersand
< &#60; &lt; less-than
> &#62; &gt; greater-than
Note: Entity names are case sensitive!

[링크 : http://www.w3schools.com/tags/ref_entities.asp]
[링크 : http://microweb.textcube.com/31]

'프로그램 사용 > expat & XML' 카테고리의 다른 글

xml 트리 탐색 - XML tree navigation  (0) 2010.04.17
expat XML_SetCharacterDataHandler() function  (0) 2010.04.09
expat '간략한' 사용법  (0) 2010.03.28
expat-2.0.1 example  (11) 2010.03.23
expat  (4) 2010.03.21
Posted by 구차니
make를 이용하여 컴파일할 소스들의 목록을 작성할때

# cat Makefile
OBJS-$(CONFIG_AAC_DEMUXER)               += raw.o id3v1.o id3v2.o
OBJS-$(CONFIG_AC3_DEMUXER)               += raw.o
OBJS-$(CONFIG_AC3_MUXER)                 += raw.o

위와 같이 OBJS에 += 로 계속 더해나가다 보면
raw.o 가 여러개 붙어지고, 이 상태로 컴파일을 하면 symbol들이 중복되어

Function funcname() is deprecated in path/filename.ext on line 00

이런식으로 에러를 발생한다.
이를 간편하게 해결하기 위해서는 sort를 이용하면 된다.
sort는 중복된 내용을 제거해주는 역활도 한다.

$(sort list)
    Sorts the words of list in lexical order, removing duplicate words.
    The output is a list of words separated by single spaces. Thus,

              $(sort foo bar lose)
        

    returns the value `bar foo lose'.

    Incidentally, since sort removes duplicate words,
    you can use it for this purpose even if you don't care about the sort order.

[링크 : http://www.gnu.org/software/make/manual/make.html#Text-Functions]
[링크 : http://korea.gnu.org/manual/4check/make-3.77/ko/make_8.html#SEC76]
Posted by 구차니
expat은 handler를 기반으로 작동한다.
특정 이벤트에 작동하는 핸들러를 등록하여 그 값을 뺴내는데
이벤트(?)는 아래의 SetHandler 함수로 등록을 한다.

StartElement는 <tag>
EndElement는 </tag> 에
대해서 값을 받아 오도록 한다.

[링크 : http://www.hpc.wm.edu/SciClone/documentation/software/misc/expat/reference.html]

머.. 일단 실행은 해보고 -ㅁ-?
Start와 End는 확실한데.. 다른건 좀 일단 실험을... ㅠ.ㅠ

XML_SetElementHandler 는 XML_SetStartElementHandler 보다 우선하고,
static void XMLCALL ElementHandler (void *userData, const XML_Char *name, const XML_Char **atts)
에서 name은 XML_SetStartElementHandler 에서 리턴하는 것과 같고
atts는 몇 개인지 알수는 없으므로  atts[idx] != NULL 일때 까지 돌리는수 밖에 없다.

원본데이터
<ns0:feed xmlns:ns00="http://www.w3.org/2005/Atom">

결과물
name[ns0:feed]
atts[xmlns:ns0] atts[http://www.w3.org/2005/Atom]

atts[idx]

'프로그램 사용 > expat & XML' 카테고리의 다른 글

xml 트리 탐색 - XML tree navigation  (0) 2010.04.17
expat XML_SetCharacterDataHandler() function  (0) 2010.04.09
&amp; &lt; &gt; &quot; 는 머지?  (0) 2010.03.31
expat-2.0.1 example  (11) 2010.03.23
expat  (4) 2010.03.21
Posted by 구차니
프로그램 사용/doxygen2010. 3. 26. 13:32
doxygen은 html / pdf / rtf / xml 타입으로
함수들의 목록이나 사용방법 메뉴얼을 만들어 주는 독한 녀석이다.
가장 익숙한 유사한 녀석은
API tree view인데
[링크 : http://java.sun.com/j2se/1.4.2/docs/api/]

이런녀석이 doxygen 류의(자바는 javadoc 이라고 자체 지원하는듯) 프로그램을 통해 자동 생성되는 녀석이다.
이런걸 왜하나면.. 프로그램 문서화의 일환이기도 하고, 좋게 말하면 인수인계 안하고
"소스를 보면 다 보이르니라~" 라고 발빼기 편하기 위함이다.(응?)


doxygen은 굳이 doxygen 문법으로 주석을 달아주지 않아도, 일단 생성은 해준다.
자세한 사용방법이나 설명서는 별도로 주석에 포함하여 작업을 해주어야 하지만 말이다.

Step 1. Project 탭
            Doxygen을 실행시키면 아래와 같은 화면이 나오고
           "Step 1:Specify ..." 부분에 프로젝트 루트의 경로를 입력한다.
            그리고 Project name / version or id 에는 임의로 넣어주어도 되니 대충 패스
            source code directory 에는 프로젝트 루트를 입력하고 "Scan recursively"를 반드시 체크해야
            빠짐없이 소스를 검색해서 api 문서를 작성해준다.
            Destination directory는 생성된 html 이나 pdf 파일이 저장될 위치로,
            프로젝트 내에 doc 폴더를 만들거나, 다른 경로로 지정해주어도 무방하다.

            단, 경로명에 한글을 지원하지 않으므로,
            중간에 "바탕 화면" 이런게 들어가면 작동하지 못하니 경로를 옮겨야 한다.


Step 2. Mode 탭
           출력될 내용을 고르는 것으로, 많은 양의 출력을 원하면 아래와 같이
           All Entities / Include cross-referenced source code in the output을 선택한다.
           그리고 doxygen이 인식할 언어를 고르는 건, 프로젝트의 언어에 맞게 골라주면 된다.


Step 3. Output 탭
           이 탭은 결과물을 어떤형식으로 저장할지에 대한 부분이다.
           HTML은 원래 웹에서 사용하는 용도로 만들어지긴 하지만,
           가장 알록달록해서 HTML로 저장해서 로컬에서 봐도 꽤 유용하다.
           API 탐색에 익숙한 tree 구조로 만들어주는게 좋기에 "with frames and a navigation tree" 를 추천한다.
           아무튼, 지원하는 문서 형식은 HTML / PDF(LaTeX) / RTF(word) / Manpage(Linux help) / XML 이다.


Step 4. Diagram 탭
           이녀석은 다른 작업을 해야 하는지 모르겠지만, GraphViz 는 별도의 패키지를 깔아야 하고
           built-in은 독립적으로 생성이 가능하다는 차이가 있다.(결과물은 당연히 GraphViz가 좋을듯?)


Step 5. Run
           솔찍히.. Next만 죽어라 누르다가 계속 누르면 만들어 지겠지.. 했는데 안만들어져서 한참을
           찾다보니 겨우겨우 "Run doxygen" 이라는 버튼이 발견되었다. ㄱ-
           아무튼 설정을 다하고 Run 버튼을 누르면 문서 생성이 시작된다.


[링크 : http://www.stack.nl/~dimitri/doxygen/] doxygen 공식 홈페이지
[링크 : http://www.stack.nl/~dimitri/doxygen/download.html#latestsrc] 다운로드 링크
[링크 : http://www.graphviz.org/Download_windows.php] 그래프 그려주는 plugin(?)

[링크 : http://jwmx.tistory.com/1496]

'프로그램 사용 > doxygen' 카테고리의 다른 글

doxygen  (0) 2015.11.09
Posted by 구차니
아래와 같이 localhost:6010에 대한 주소를 받아오지 못한다고 에러가 나면
/etc/hosts 파일이 존재하는지 확인을 해야한다.

$ gedit
_X11TransSocketINETConnect() can't get address for localhost:6010: Name or service not known
cannot open display:
Run 'gedit --help' to see a full list of available command line options.

파일이 존재한다 하더라도, 내용이 없다면 내용을 추가해준다.
$ cat /etc/hosts
# Do not remove the following line, or various programs
# that require network functionality will fail.
::1     localhost.localdomain   localhost

Posted by 구차니