구성을 대충보니, minGW + cygwin 등으로 윈도우 패키지도 있는 듯 한데..
일단은 kscope 보다는 좋아보인다.



이런 프로그램 있다는걸 제보해준 용훈군에게 감사를 ㅋㅋ

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

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

Code::Blocks C++ 프로젝트  (0) 2009.09.14
Code::Blocks  (0) 2009.09.14
Posted by 구차니
sh4-linux 용으로 samba3.4.0 버전을 크로스컴파일을 시도하는데
이래저래 자꾸만 에러가 나서 검색을 해봤다.

결론 : 검색하고 꼼꼼하게 읽어보자.. OTL


실질적으로 크로스컴파일에서 필요한건 CC 환경변수 설정과 configure에서 --host=i686(혹은 현재 아키텍쳐)를
해주는 것 외에는 별다른 것이 없다.

Step 1. 다운받고 압축푼다.
Step 2. samba-3.4.0/source3/ 에서 ./autogen.sh 를 실행시킨다.
Step 3. 환경을 설정한다.
           export CC=sh4-linux-gcc
           export samba_cv_CC_NEGATIVE_ENUM_VALUES=yes

export samba_cv_CC_NEGATIVE_ENUM_VALUES=yes 를 해주는 이유는

checking that the C compiler understands negative enum values...
                                                    configure: error: cannot run test program while cross compiling

이런 에러가 발생을 하기 때문이다.
원래대로라면, 크로스 컴파일시에는 이 부분이 실행불가능 하므로 넘어가야 하는데,
이 부분이 제대로 처리되지 않아서 그런것으로 생각된다.

Step 4. configure를 실행한다. --target은 지정하지 않아야 컴파일이 진행된다.
           ./configure --host=i686

컴파일 하다가 winbind 와 ldap 오류가 나면 귀차니즘으로
./configure --host=i686 --without-winbind --without-ldap --disable-swat
라고 해주면 winbind와 ldap를 컴파일 하지 않는다.
SWAT(Samba Web Admin Tool)는 사용하지 않는다면 꺼주면 된다.

Step 5. Makefile을 수정한다.
           make install 시에 설치될 위치를 정해준다.
prefix=/usr/local/samba
exec_prefix=${prefix}
...
CONFIGDIR = ${exec_prefix}/lib

원래 내용은 위와 같지만,
prefix 의 주소는 target NFS 주소의 root를 정해주고
/etc/smb.conf가 기본 환경파일의 위치이므로, 이를 정해주기 위해
CONFIGDIR의 위치를 /etc로 정해준다.

prefix=$(HOME)/target
exec_prefix=${prefix}
...
CONFIGDIR = /etc

컴파일 시에 talloc.c 에서 lber.h ldap.h 에러가 나면
Compiling ../lib/talloc/talloc.c
In file included from ../lib/talloc/talloc.c:36:
include/includes.h:156:18: error: lber.h: No such file or directory
include/includes.h:172:18: error: ldap.h: No such file or directory

CPPFLAGS=-DHAVE_CONFIG_H -I/usr/include -Iinclude -I./include -I. -I. -I./../lib/replace -I./../lib/talloc -I./../lib/tevent -I./../lib/tdb/include -I./libaddns -I./librpc -I./.. -I./../lib/popt
를 추가해주면 해결된다. lber.h의 경로가 제대로 추가되지 않아서 발생하는 문제이다.

Step 6. 컴파일 및 설치 한다.
          make
          make install

Step 7. 파일이 부족하면 복사한다.
          나의 경우에는 libnsl.so libdl.so가 부족했다.

[링크 : http://en.wikibooks.org/wiki/Samba/Compiling_Samba_from_Source]
Posted by 구차니
$ ll /usr/bin/smb*
-rwxr-xr-x 1 root root 2109576 Sep  2  2006 /usr/bin/smbcacls
-rwxr-xr-x 1 root root 1177152 Sep  2  2006 /usr/bin/smbclient
-rwxr-xr-x 1 root root  748836 Sep  2  2006 /usr/bin/smbcontrol
-rwxr-xr-x 1 root root 2002796 Sep  2  2006 /usr/bin/smbcquotas
-rwxr-xr-x 1 root root 2080776 Sep  2  2006 /usr/bin/smbget
-rwxr-xr-x 1 root root 2006920 Sep  2  2006 /usr/bin/smbpasswd
-rwxr-xr-x 1 root root    2295 Sep  2  2006 /usr/bin/smbprint
-rwxr-xr-x 1 root root  911124 Sep  2  2006 /usr/bin/smbspool
-rwxr-xr-x 1 root root  727968 Sep  2  2006 /usr/bin/smbstatus
-rwxr-xr-x 1 root root    4896 Sep  2  2006 /usr/bin/smbtar
-rwxr-xr-x 1 root root 1091552 Sep  2  2006 /usr/bin/smbtree

다른건 잘 모르겠고,
smbtree는 workgroup / computer 별로 공유되어 있는 목록을 보여주는 프로그램이다.

$ smbtree
Password:
WORKGROUP
        \\STREAM
                \\STREAM\C$                     Default share
                \\STREAM\ADMIN$                 Remote Admin
                \\STREAM\temp
                \\STREAM\D$                     Default share
                \\STREAM\IPC$                   Remote IPC
                \\STREAM\Stream Data
                \\STREAM\E$                     Default share
MSHOME
        \\KSJEON
cli_rpc_pipe_open: cli_nt_create failed on pipe \srvsvc to machine KSJEON.  Error was NT_STATUS_ACCESS_DENIED

이런식으로 쭈욱 나온다.

[링크 : http://master.samba.org/samba/docs/man/manpages-3/smbtree.1.html]
--------------------
smbstatus는 현재 삼바서버에 접속중인 클라이언트의 목록을 보여준다.

$ smbstatus

Samba version 3.0.23c-2
PID     Username      Group         Machine
-------------------------------------------------------------------
 2515   nevis1        dev           kwangho      (192.168.10.5)

Service      pid     machine       Connected at
-------------------------------------------------------
nevis1       2515   kwangho       Mon Aug 17 17:39:15 2009

No locked files

[링크 : http://master.samba.org/samba/docs/man/manpages-3/smbstatus.1.html]


-----------------
c 언어에서 조작하는 방법(source of smbtree.c)

[링크 : http://www.koders.com/c/fidB866C576E4391966493432682AF098446FDE9468.aspx?s=%22sam%22#L199]
[링크 : http://www.codase.com/search/display?file]
Posted by 구차니
프로그램 사용2009. 9. 5. 11:55
삼바 문서를 긁어 오다가 귀찮아서 한번에 받는 방법을 강구하다가, free 프로그램이 있다길래
한번 사용해 보았다.

Step 1. 실행하면 아래와 같은 화면이 나오고


Step 2. New 버튼을 누르면 아래와 같이 나오는데, URL은 받으려고 하는 페이지의 시작 주소이고
           Depth는 그 페이지의 링크를 몇단계 까지 추적해서 받아오냐는 것을 의미한다.


사용법도 간단하고, 속도도 빠르고 괜찮은 듯 하다.

[발견 : http://hompy.info/535]
[링크 : http://www.spadixbd.com/backstreet/]
Posted by 구차니
samba는 윈도우에서 파일 공유 하듯, 리눅스 - 윈도우 간에 파일 공유 하도록 해주는 녀석이다.
원래 약자로 SMB를 읽기 쉽게 s m b 가 들어가는 단어를 찾다가 samba가 되었다고 하는데...

아무튼 리눅스에서 사용하는 명령어는

smbclient 이녀석은 단일 파일을 조작하는 녀석으로 보인다.
$ smbclient //mypc/yshare "" -N -Tx backup.tar

[링크 : http://linux.die.net/man/1/smbclient]
[링크 : http://linux.die.net/man/7/samba]

$ sudo mount -t cifs //SERVERIP/ /home/me/Desktop/SERVER/ -o user=myusername,password=mypass

cifs 타입으로 마운트 해서 사용도 가능하다.
[링크 : http://ubuntuforums.org/showthread.php?t=280473]

mount시에 //SERVERIP/path가 아닌 SERVERIP/path로 할 경우 아래의 에러가 발생하니 //를 꼭 넣어주도록 하자
CIFS: UNC Path does not begin with // or \\

만약에
mount: bad address 'SERVERNAME'
이라고 에러가 발생하면 SERVERNAME대신 SERVERIP로 해주면된다.

UNC는 Unified Naming Convention 의 약자로고 한다.
[링크 : http://www.terms.co.kr/UNC.htm ]

CIFS는 Common Internet File System 의 약자라고 한다(Interface가 아니군..)
[링크 : http://www.terms.co.kr/CIFS.htm]


Posted by 구차니


위의 옵션은 1.14.3에도 존재하는 녀석이다.
Shell - alias support를 선택해주면 된다.
Posted by 구차니
프로그램 사용/vi2009. 9. 2. 18:01
:set ci
혹은
/\c[검색어]

case ignore 에서 c 인가보다.
근데.. 막상해보니 case insensitive 한데?

[링크 : http://unixjunkie.blogspot.com/2006/03/ignore-case-in-vim-searches.html]



:set ignorecase
:set noignorecase

로 토글한다고 한다.

[링크 : http://www.tech-recipes.com/rx/406/perform-case-insensitive-searches-in-vi-or-vim/]




단어단위로 검색할경우(whole word match)
/\<검색어\>

[링크 : http://www.held.org.il/blog/?p=129]

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

vi auto indent  (0) 2009.10.06
busybox 1.14.3 vi editor  (0) 2009.09.16
VI에 ctags 사용하기  (0) 2009.07.21
VI syntax highlight 사용하기  (0) 2009.05.26
VI - hex mode  (2) 2009.03.03
Posted by 구차니
install.txt 파일에 다음의 내용이 있었다. (역시 설명서는 잘 읽어야 해..)

Microsoft Windows, Microsoft Visual C++ 6 Developer Studio:

We include makefiles that should work as project files in DevStudio 6.0 or later.
There is a library makefile that builds the IJG library as a static Win32 library,
and application makefiles that build the sample applications as Win32 console applications.
(Even if you only want the library, we recommend building the applications so that you can run the self-test.)

To use:
1. Copy
jconfig.vc to jconfig.h
makeadsw.vc6 to apps.dsw
makecdep.vc6 to cjpeg.dep
makecdsp.vc6 to cjpeg.dsp
makecmak.vc6 to cjpeg.mak
makeddep.vc6 to djpeg.dep
makeddsp.vc6 to djpeg.dsp
makedmak.vc6 to djpeg.mak
makejdep.vc6 to jpeg.dep
makejdsp.vc6 to jpeg.dsp
makejdsw.vc6 to jpeg.dsw
makejmak.vc6 to jpeg.mak
makerdep.vc6 to rdjpgcom.dep
makerdsp.vc6 to rdjpgcom.dsp
makermak.vc6 to rdjpgcom.mak
maketdep.vc6 to jpegtran.dep
maketdsp.vc6 to jpegtran.dsp
maketmak.vc6 to jpegtran.mak
makewdep.vc6 to wrjpgcom.dep
makewdsp.vc6 to wrjpgcom.dsp
makewmak.vc6 to wrjpgcom.mak
(Note that the renaming is critical!)

2. Click on jpeg.dsw and apps.dsw to load the project workspaces.
   (If you are using DevStudio more recent than 6.0, you'll probably
   get a message saying that the project files are being updated.)

3. Build the library project, then the applications project.

4. Move the application .exe files from `app`\Release to an appropriate location on your path.

5. To perform the self-test, execute the command line
    NMAKE /f makefile.vc  test



2단계에서 dsw 파일 읽어 오는것은 실패했다.. OTL
아무튼 5단계의 nmake를 이용하면 컴파일까지 완료된다.


Microsoft Windows, Microsoft Visual C++ 2008 Developer Studio (v9):

We include makefiles that should work as project files in Visual Studio 2008 or later.
There is a library makefile that builds the IJG library as a static Win32 library,
and application makefiles that build the sample applications as Win32 console applications.
(Even if you only want the library, we recommend building the applications so that you can run the self-test.)

To use:
1. Copy
jconfig.vc to jconfig.h
makeasln.vc9 to apps.sln
makecvcp.vc9 to cjpeg.vcproj
makedvcp.vc9 to djpeg.vcproj
makejsln.vc9 to jpeg.sln
makejvcp.vc9 to jpeg.vcproj
makervcp.vc9 to rdjpgcom.vcproj
maketvcp.vc9 to jpegtran.vcproj
makewvcp.vc9 to wrjpgcom.vcproj
(Note that the renaming is critical!)

2. Click on jpeg.sln and apps.sln to load the project solutions.
   (If you are using Visual Studio more recent than 2008 (v9), you'll
   probably get a message saying that the project files are being updated.)

3. Build the library project, then the applications project.

4. Move the application .exe files from `app`\Release to an appropriate location on your path.

5. To perform the self-test, execute the command line
    NMAKE /f makefile.vc  test

Posted by 구차니
$ gdb --help
This is the GNU debugger.  Usage:

    gdb [options] [executable-file [core-file or process-id]]
    gdb [options] --args executable-file [inferior-arguments ...]

Options:

  --args             Arguments after executable-file are passed to inferior
  -b BAUDRATE        Set serial port baud rate used for remote debugging.
  --batch            Exit after processing options.
  --batch-silent     As for --batch, but suppress all gdb stdout output.
  --return-child-result
                     GDB exit code will be the child's exit code.
  --cd=DIR           Change current directory to DIR.
  --command=FILE, -x Execute GDB commands from FILE.
  --eval-command=COMMAND, -ex
                     Execute a single GDB command.
                     May be used multiple times and in conjunction
                     with --command.
  --core=COREFILE    Analyze the core dump COREFILE.
  --pid=PID          Attach to running process PID.
  --dbx              DBX compatibility mode.
  --directory=DIR    Search for source files in DIR.
  --epoch            Output information used by epoch emacs-GDB interface.
  --exec=EXECFILE    Use EXECFILE as the executable.
  --fullname         Output information used by emacs-GDB interface.
  --help             Print this message.
  --interpreter=INTERP
                     Select a specific interpreter / user interface
  -l TIMEOUT         Set timeout in seconds for remote debugging.
  --nw             Do not use a window interface.
  --nx               Do not read .gdbinit file.
  --quiet            Do not print version number on startup.
  --readnow          Fully read symbol files on first access.
  --se=FILE          Use FILE as symbol file and executable file.
  --symbols=SYMFILE  Read symbols from SYMFILE.
  --tty=TTY          Use TTY for input/output by the program being debugged.
  --tui              Use a terminal user interface.
  --version          Print version information and then exit.
  -w                 Use a window interface.
  --write            Set writing into executable and core files.
  --xdb              XDB compatibility mode.

For more information, type "help" from within GDB, or consult the
GDB manual (available as on-line info or a printed manual).
Report bugs to "bug-gdb@gnu.org".

스크립트에는 gdb에서 입력하던 명령어들을 넣어주면 된다.

[링크 : http://darkfader.net/arm/files/Example%20GDB%20script.txt]

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

insight(gdb) 아키텍쳐별 차이점(?)  (0) 2010.05.18
gdb cross compile 관련  (0) 2010.05.18
gdb 명령어 - next / step / [엔터]  (0) 2009.07.01
gdb help  (0) 2009.06.26
간단한 gdb/gdbserver/insight 사용법  (0) 2009.06.26
Posted by 구차니
프로그램 사용/nfs2009. 9. 1. 10:02

$ sudo apt-get install nfs
라는 말에 낚여 해보니 안되는데 -ㅁ-!! 광분을 하면서 패키지 검색을 해봤더니

$ sudo apt-cache search nfs | grep ^nfs
nfs-user-server - User space NFS server
nfsboot - Allow clients to boot over the network
nfsbooted - Prepares your image for nfs boot
nfs-common - NFS support files common to client and server
nfs-kernel-server - support for NFS kernel server

머.. 아무튼, nfs-common만 해도 되는지는 모르겠지만,
synaptic package manager에서는 의존성이 없는지 두개가 따로 선택이 가능했다.
Posted by 구차니