'프로그램 사용'에 해당되는 글 2190건

  1. 2015.09.10 nginx fastcgi 캐싱
  2. 2015.08.19 svn merge
  3. 2015.08.13 Xwin DISPLAY 고찰(?)
  4. 2015.08.05 gstreamer
  5. 2015.08.04 vi 문자열 치환
  6. 2015.08.03 clang 으로 컴파일
  7. 2015.08.03 clang on ubnutu
  8. 2015.07.30 라즈베리 파이 with yocto project 2
  9. 2015.07.30 precompiled header on GCC (라즈베리로 테스트) 2
  10. 2015.07.29 gcc에서 precompiled header 사용하기
프로그램 사용/nginx2015. 9. 10. 16:26

혹시나 해서 찾아 봤더니 ㄷㄷㄷ

그나저나...

nginx는 프로그램 자체에서 지원하고..

php의 경우 fpm-php에서 fastcgi에 대해서 캐싱을 지원한다고 한다.



[링크 : https://www.digitalocean.com/.../how-to-setup-fastcgi-caching-with-nginx-on-your-vps]

[링크 : http://websetnet.com/ko/how-to-configure-nginx-fastcgi-cache/]

Posted by 구차니

dry run 이라는 옵션도 있네.

merge는 안하고 항상 혼자 쓰다 보니..

그냥 trunk 날리고 branch를 다시 trunk로 복사하거나(이력으로 인해)

trunk와 branch를 수동 머지 했는데 조금 편한법을 찾아 봐야겠다 ㅠㅠ


[링크 : http://asbear.tistory.com/72]

    [링크 : http://asbear.tistory.com/50]

[링크 : http://egloos.zum.com/codenongsa/v/258234]

[링크 : http://jee1.tistory.com/888]

[링크 : http://greenbay.usc.edu/csci577/tools/Subversion/Subversion_User_Manual.pdf]



+

2015.12.02

[링크 : http://svnbook.red-bean.com/en/1.7/svn.ref.svn.c.merge.html]

[링크 : https://tortoisesvn.net/docs/release/TortoiseSVN_en/tsvn-dug-merge.html]

[링크 : http://hoiogi.tistory.com/20]

Posted by 구차니

는... FAIL? -_ㅠ



아으..감이 올 듯 말듯..

그러니까.. display쪽은 multiseat 관련 내용이고

screen은 멀티 모니터 쪽 내용이려나?


Key terms

The X window system has nuanced usage of a number of terms when compared to common usage, particularly "display" and "screen", a subset of which is given here for convenience:


device

A graphics device such as a computer graphics card or a computer motherboard's integrated graphics chipset.

monitor

A physical device such as a CRT or a flat screen computer display.

screen

An area into which graphics may be rendered, either through software alone into system memory as with VNC, or within a graphics device, some of which can render into more than one screen simultaneously, either viewable simultaneously or interchangeably. Interchangeable screens are often set up to be notionally left and right from one another, flipping from one to the next as the mouse pointer reaches the edge of the monitor.

virtual screen

Two different meanings are associated with this term:

A technique allowing panning a monitor around a screen running at a larger resolution than the monitor is currently displaying.

An effect simulated by a window manager by maintaining window position information in a larger coordinate system than the screen and allowing panning by simply moving the windows in response to the user.

display

A collection of screens, often involving multiple monitors, generally configured to allow the mouse to move the pointer to any position within them. Linux-based workstations are usually capable of having multiple displays, among which the user can switch with a special keyboard combination such as control-alt-function-key, simultaneously flipping all the monitors from showing the screens of one display to the screens in another.

The term "display" should not be confused with the more specialized jargon "Zaphod display". The latter is a rare configuration allowing multiple users of a single computer to each have an independent set of display, mouse, and keyboard, as though they were using separate computers, but at a lower per-seat cost.

[링크 : https://en.wikipedia.org/wiki/X_Window_System] 


displaynumber

multiseat 설정 아닌 이상은 0 으로 고정으로 봐도 무방?


screennumber

만약 모니터가 4개이고 2개씩 묶어 버리면 2개의 screen이 되려나?

즉, screen은 모니터의 모음


Display Names


From the user's perspective, every X server has a display name of the form:


hostname:displaynumber.screennumber

This information is used by the application to determine how it should connect to the server and which screen it should use by default (on displays with multiple monitors):


hostname

The hostname specifies the name of the machine to which the display is physically connected. If the hostname is not given, the most efficient way of communicating to a server on the same machine will be used.

displaynumber

The phrase "display" is usually used to refer to collection of monitors that share a common keyboard and pointer (mouse, tablet, etc.). Most workstations tend to only have one keyboard, and therefore, only one display. Larger, multi-user systems, however, frequently have several displays so that more than one person can be doing graphics work at once. To avoid confusion, each display on a machine is assigned a display number (beginning at 0) when the X server for that display is started. The display number must always be given in a display name.

screennumber

Some displays share a single keyboard and pointer among two or more monitors. Since each monitor has its own set of windows, each screen is assigned a screen number (beginning at 0) when the X server for that display is started. If the screen number is not given, screen 0 will be used.


[링크 : http://linux.die.net/man/7/x] 



2012/02/10 - [Linux/Ubuntu] - SSH를 통해 SSH 서버측에 X 응용프로그램 실행하기


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

xming / xdmcp 성공  (0) 2016.02.02
cygwin bash 쉘 시작 위치 지정하기  (0) 2015.12.02
Xming vs cygwin/x  (0) 2012.01.25
Cygwin/X 추려내기 - ing  (0) 2011.09.10
Xming 신버전은 유료?  (0) 2011.09.09
Posted by 구차니

imx 시리즈의 SDK에도 gstreamer가 들어있긴 했는데

그냥 넘겼거늘... 상당히 대단한 프레임워크로 보여서 급 관심..



먼저, 지연 없는 스트림 전송이라고 제목을 지었지만, 실제 딜레이는 720p 영상전송에서 0.3초 가량 되는 것 같습니다.

[링크 : http://www.rasplay.org/?p=5607]


[링크 : http://gstreamer.freedesktop.org/]

[링크 : https://en.wikipedia.org/wiki/GStreamer]

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

gstreamer element 생성 gst_element_factory_make()  (0) 2021.07.13
gst fpsdisplaysink  (0) 2021.02.18
gst videorate  (0) 2021.02.09
gstreamer tee  (0) 2021.02.08
gstreamer pipeline  (0) 2015.11.02
Posted by 구차니
프로그램 사용/vi2015. 8. 4. 10:07


아랫방향 검색

/검색어 

n

윗방향 검색

?검색어

N



대소문자 구분

:set noci



대소문자 비구분

:set ci


치환

:%s/FROM/TO


치환(질문)

:%s/FROM/TO/c


정확한 치환

:%s/\<FROM\>/TO


치환 대소문자 비구분

:%s/FROM/TO/i


치환 파일전체

:%s/FROM/TO/g


[링크 : http://mwultong.blogspot.com/2006/09/vim-vi-gvim-find-and-replace.html]


+

2017.04.10

[링크 : https://kldp.org/node/74138]

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

vim -X / X server 연결 하지 않기  (0) 2016.11.04
vi 버전 차이?  (0) 2016.07.09
vi 사각형 선택하기  (0) 2014.09.11
vi 유용한 플러그인 - F12 mouse 토글  (0) 2014.09.05
vi를 source insight 처럼 설정하기  (0) 2014.09.04
Posted by 구차니
프로그램 사용/clang2015. 8. 3. 16:57

test.c:3:1: error: 'main' must return 'int'

clang은 int main() 아니면 배쨰는 중 -_-


음.. 코드가 허접한거라..

$ cat test.c

#include <stdio.h>


int main()

{

        int *p;


        free(p);

        return 0;

} 


시간은 큰 의미가 없지만.. 아무튼 빌드가 아니라 --analyze만 해서는

빠르게 작동하는 걸 보니 꽤 쓸만해 보이기도?


$ time gcc -o gcc.o test.c

test.c: In function ‘main’:

test.c:7:2: warning: incompatible implicit declaration of built-in function ‘free’ [enabled by default]


real    0m0.611s

user    0m0.510s

sys     0m0.070s


$ time clang -o gcc.o test.c

test.c:7:2: warning: implicit declaration of function 'free' is invalid in C99

      [-Wimplicit-function-declaration]

        free(p);

        ^

1 warning generated.


real    0m0.728s

user    0m0.560s

sys     0m0.110s



$ time clang -o gcc.o test.c --analyze

test.c:7:2: warning: Function call argument is an uninitialized value

        free(p);

        ^    ~

1 warning generated.


real    0m0.325s

user    0m0.220s

sys     0m0.080s



$ time gcc -o gcc.o test.c -fsyntax-only
test.c: In function ‘main’:
test.c:7:2: warning: incompatible implicit declaration of built-in function ‘free’ [enabled by default]

real    0m0.185s
user    0m0.140s
sys     0m0.030s

어?


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

semgrep  (0) 2023.04.17
cppcheck 사용  (0) 2023.04.17
clang on ubnutu  (0) 2015.08.03
llvm / clang / cppcheck  (0) 2015.02.21
Posted by 구차니
프로그램 사용/clang2015. 8. 3. 16:05

clang이 요즘 뜨는건지.. 한번 해보려는데.. 흐음...

일단 귀차니즘으로.. (-_-) 라즈베리 파이에 ㅋㅋ


$ sudo apt-get install clang

패키지 목록을 읽는 중입니다... 완료

의존성 트리를 만드는 중입니다

상태 정보를 읽는 중입니다... 완료

다음 패키지를 더 설치할 것입니다:

  libclang-common-dev libffi-dev libllvm3.0 llvm-3.0 llvm-3.0-dev llvm-3.0-runtime

제안하는 패키지:

  llvm-3.0-doc

다음 새 패키지를 설치할 것입니다:

  clang libclang-common-dev libffi-dev libllvm3.0 llvm-3.0 llvm-3.0-dev llvm-3.0-runtime

0개 업그레이드, 7개 새로 설치, 0개 제거 및 0개 업그레이드 안 함.

24.2 M바이트 아카이브를 받아야 합니다.

이 작업 후 71.3 M바이트의 디스크 공간을 더 사용하게 됩니다.

계속 하시겠습니까 [Y/n]?

받기:1 http://mirrordirector.raspbian.org/raspbian/ wheezy/main libllvm3.0 armhf 3.0-10 [6,778 kB]

받기:2 http://mirrordirector.raspbian.org/raspbian/ wheezy/main libclang-common-dev armhf 1:3.0-6.2 [76.7 kB]

받기:3 http://mirrordirector.raspbian.org/raspbian/ wheezy/main clang armhf 1:3.0-6.2 [4,510 kB]

받기:4 http://mirrordirector.raspbian.org/raspbian/ wheezy/main libffi-dev armhf 3.0.10-3+b3 [113 kB]

받기:5 http://mirrordirector.raspbian.org/raspbian/ wheezy/main llvm-3.0-runtime armhf 3.0-10 [40.7 kB]

받기:6 http://mirrordirector.raspbian.org/raspbian/ wheezy/main llvm-3.0 armhf 3.0-10 [1,215 kB]

받기:7 http://mirrordirector.raspbian.org/raspbian/ wheezy/main llvm-3.0-dev armhf 3.0-10 [11.5 MB]

내려받기 24.2 M바이트, 소요시간 17초 (1,386 k바이트/초)

Selecting previously unselected package libllvm3.0:armhf.

(데이터베이스 읽는중 ...현재 120356개의 파일과 디렉터리가 설치되어 있습니다.)

libllvm3.0:armhf 패키지를 푸는 중입니다 (.../libllvm3.0_3.0-10_armhf.deb에서) ...

Selecting previously unselected package libclang-common-dev.

libclang-common-dev 패키지를 푸는 중입니다 (.../libclang-common-dev_1%3a3.0-6.2_armhf.deb에서) ...

Selecting previously unselected package clang.

clang 패키지를 푸는 중입니다 (.../clang_1%3a3.0-6.2_armhf.deb에서) ...

Selecting previously unselected package libffi-dev:armhf.

libffi-dev:armhf 패키지를 푸는 중입니다 (.../libffi-dev_3.0.10-3+b3_armhf.deb에서) ...

Selecting previously unselected package llvm-3.0-runtime.

llvm-3.0-runtime 패키지를 푸는 중입니다 (.../llvm-3.0-runtime_3.0-10_armhf.deb에서) ...

Selecting previously unselected package llvm-3.0.

llvm-3.0 패키지를 푸는 중입니다 (.../llvm-3.0_3.0-10_armhf.deb에서) ...

Selecting previously unselected package llvm-3.0-dev.

llvm-3.0-dev 패키지를 푸는 중입니다 (.../llvm-3.0-dev_3.0-10_armhf.deb에서) ...

man-db에 대한 트리거를 처리하는 중입니다 ...

install-info에 대한 트리거를 처리하는 중입니다 ...

libllvm3.0:armhf (3.0-10) 설정하는 중입니다 ...

libclang-common-dev (1:3.0-6.2) 설정하는 중입니다 ...

clang (1:3.0-6.2) 설정하는 중입니다 ...

libffi-dev:armhf (3.0.10-3+b3) 설정하는 중입니다 ...

llvm-3.0-runtime (3.0-10) 설정하는 중입니다 ...

llvm-3.0 (3.0-10) 설정하는 중입니다 ...

llvm-3.0-dev (3.0-10) 설정하는 중입니다 ...


$ ls  -al /usr/bin/clang*
-rwxr-xr-x 1 root root 10524368 10월 18  2013 /usr/bin/clang
lrwxrwxrwx 1 root root        5 10월 18  2013 /usr/bin/clang++ -> clang

$ ls -al /usr/bin/scan-*
lrwxrwxrwx 1 root root 36 10월 18  2013 /usr/bin/scan-build -> ../share/clang/scan-build/scan-build
lrwxrwxrwx 1 root root 34 10월 18  2013 /usr/bin/scan-view -> ../share/clang/scan-view/scan-view


빌드 시간이나 바이너리 사이즈나.. clang이 우세한 듯...

$ time clang++ a.cpp

real    0m2.595s
user    0m2.350s
sys     0m0.210s

$ time g++ a.cpp

real    0m3.307s
user    0m2.490s
sys     0m0.230s

$ ls -al *.out
-rwxr-xr-x 1 pi pi 6033  8월  3 07:37 clang++.out
-rwxr-xr-x 1 pi pi 6492  8월  3 07:38 g++.out

$ strip *.out
$ ls -al *.out
-rwxr-xr-x 1 pi pi 3396  8월  3 07:39 clang++.out
-rwxr-xr-x 1 pi pi 3616  8월  3 07:39 g++.out



정적분석을 지원한다는데 잘 모르겠다.. 어떻게 쓰는지는 ㅠㅠ
clang static analyzer


$ scan-build clang++ a.cpp

scan-build: 'clang' executable not found in '/usr/share/clang/scan-build/bin'.

scan-build: Using 'clang' from path: /usr/bin/clang

scan-build: Removing directory '/tmp/scan-build-2015-08-03-1' because it contains no reports.


$ scan-build g++ a.cpp
scan-build: 'clang' executable not found in '/usr/share/clang/scan-build/bin'.
scan-build: Using 'clang' from path: /usr/bin/clang
scan-build: Removing directory '/tmp/scan-build-2015-08-03-1' because it contains no reports.

[링크 : http://web.cs.ucla.edu/~tianyi.zhang/tutorial.html]


$ clang --analyze a.cpp

[링크 : http://kthan.tistory.com/158]

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

semgrep  (0) 2023.04.17
cppcheck 사용  (0) 2023.04.17
clang 으로 컴파일  (0) 2015.08.03
llvm / clang / cppcheck  (0) 2015.02.21
Posted by 구차니


yocto proejct - poky 다운로드

pi@raspberrypi ~/src $ git clone git://git.yoctoproject.org/poky yoctoProject

Cloning into 'yoctoProject'...

remote: Counting objects: 279679, done.

remote: Compressing objects: 100% (68614/68614), done.

Receiving objects: 100% (279679/279679), 112.68 MiB | 1.40 MiB/s, done.

Resolving deltas: 100% (205623/205623), done.

Checking out files: 100% (5101/5101), done. 



meta-raspberrypi layer 다운로드

pi@raspberrypi ~/src $ cd yoctoProject/

pi@raspberrypi ~/src/yoctoProject $ git clone git://git.yoctoproject.org/meta-raspberrypi

Cloning into 'meta-raspberrypi'...

remote: Counting objects: 1924, done.

remote: Compressing objects: 100% (906/906), done.

remote: Total 1924 (delta 841), reused 1924 (delta 841)

Receiving objects: 100% (1924/1924), 351.58 KiB | 255 KiB/s, done.

Resolving deltas: 100% (841/841), done. 


환경변수 및 라즈베리 파이 빌드할 경로 생성

pi@raspberrypi ~/src/yoctoProject $ source oe-init-build-env raspberryPiBuild/

You had no conf/local.conf file. This configuration file has therefore been

created for you with some default values. You may wish to edit it to use a

different MACHINE (target hardware) or enable parallel build options to take

advantage of multiple cores for example. See the file for more information as

common configuration options are commented.


You had no conf/bblayers.conf file. The configuration file has been created for

you with some default values. To add additional metadata layers into your

configuration please add entries to this file.


The Yocto Project has extensive documentation about OE including a reference

manual which can be found at:

    http://yoctoproject.org/documentation


For more information about OpenEmbedded see their website:

    http://www.openembedded.org/



### Shell environment set up for builds. ###


You can now run 'bitbake <target>'


Common targets are:

    core-image-minimal

    core-image-sato

    meta-toolchain

    adt-installer

    meta-ide-support


You can also run generated qemu images with a command like 'runqemu qemux86' 


라즈베리 파이 빌드를 위한 환경 설정 1

pi@raspberrypi ~/src/yoctoProject/raspberryPiBuild $ vim conf/local.conf

MACHINE ?= "raspberrypi" 


라즈베리 파이 빌드를 위한 환경 설정 2

pi@raspberrypi ~/src/yoctoProject/raspberryPiBuild $ vim conf/bblayers.conf

# LAYER_CONF_VERSION is increased each time build/conf/bblayers.conf

# changes incompatibly

LCONF_VERSION = "6"


BBPATH = "${TOPDIR}"

BBFILES ?= ""


BBLAYERS ?= " \

  /home/pi/src/yoctoProject/meta \

  /home/pi/src/yoctoProject/meta-yocto \

  /home/pi/src/yoctoProject/meta-yocto-bsp \

  /home/pi/src/yoctoProject/meta-raspberrypi \

  "

BBLAYERS_NON_REMOVABLE ?= " \

  /home/pi/src/yoctoProject/meta \

  /home/pi/src/yoctoProject/meta-yocto \

  "


빌드를 위한 패키지 설치(라즈비안에서 한 120메가 다운로드 / 500메가 용량 필요)

pi@raspberrypi ~/src/yoctoProject/raspberryPiBuild $ sudo apt-get install sed wget cvs subversion git-core coreutils unzip texi2html texinfo libsdl1.2-dev docbook-utils gawk python-pysqlite2 diffstat help2man make gcc build-essential g++ desktop-file-utils chrpath libgl1-mesa-dev libglu1-mesa-dev mercurial autoconf automake groff libtool xterm


빌드 시작

pi@raspberrypi ~/src/yoctoProject/raspberryPiBuild $ bitbake core-sato-image


리부팅후 환경변수 재설정

pi@raspberrypi ~/src/yoctoProject $ source oe-init-build-env 


끄응.. 왜 안되지? 라즈베리에서 라즈베리를 빌드하려고 해서 그런가? ㅋㅋㅋ

pi@raspberrypi ~/src/yoctoProject/raspberryPiBuild $ bitbake core-sato-image

WARNING: Host distribution "Raspbian-GNU-Linux-7" has not been validated with this version of the build system; you may possibly experience unexpected failures. It is recommended that you use a tested distribution.

ERROR: Unable to determine endianness for architecture 'armv6l' | ETA:  --:--:--

ERROR: Please add your architecture to siteinfo.bbclass

ERROR: Failed to parse recipe: /home/pi/src/yoctoProject/meta/recipes-core/coreutils/coreutils_8.24.bb


Summary: There was 1 WARNING message shown.

Summary: There were 3 ERROR messages shown, returning a non-zero exit code.



---

pi@raspberrypi ~/src/yoctoProject $ ls -al

합계 92

drwxr-xr-x 12 pi pi  4096  7월 30 06:33 .

drwxr-xr-x 10 pi pi  4096  7월 30 06:29 ..

drwxr-xr-x  8 pi pi  4096  7월 30 06:33 .git

-rw-r--r--  1 pi pi   346  7월 30 06:32 .gitignore

-rw-r--r--  1 pi pi    66  7월 30 06:32 .templateconf

-rw-r--r--  1 pi pi   515  7월 30 06:32 LICENSE

-rw-r--r--  1 pi pi  2458  7월 30 06:32 README

-rw-r--r--  1 pi pi 19318  7월 30 06:32 README.hardware

drwxr-xr-x  6 pi pi  4096  7월 30 06:32 bitbake

drwxr-xr-x 13 pi pi  4096  7월 30 06:32 documentation

drwxr-xr-x 21 pi pi  4096  7월 30 06:32 meta

drwxr-xr-x 13 pi pi  4096  7월 30 06:33 meta-raspberrypi

drwxr-xr-x  5 pi pi  4096  7월 30 06:32 meta-selftest

drwxr-xr-x  7 pi pi  4096  7월 30 06:32 meta-skeleton

drwxr-xr-x  5 pi pi  4096  7월 30 06:32 meta-yocto

drwxr-xr-x  8 pi pi  4096  7월 30 06:32 meta-yocto-bsp

-rwxr-xr-x  1 pi pi  2002  7월 30 06:32 oe-init-build-env

-rwxr-xr-x  1 pi pi  2432  7월 30 06:32 oe-init-build-env-memres

drwxr-xr-x  8 pi pi  4096  7월 30 06:32 scripts


pi@raspberrypi ~/src $ du -h yoctoProject/

178M    yoctoProject/



[링크 : http://ric96.blogspot.in/2014/09/yocto-for-raspberry-pi-build-guide.html]

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

imx8 yocto  (0) 2023.08.28
imx8 yocto build on ubuntu 22.04  (0) 2023.02.10
yocto project 구조  (0) 2015.07.29
라즈베리 파이 2 yocto 프로젝트?  (0) 2015.06.08
rpi in yocto project  (0) 2015.04.29
Posted by 구차니
프로그램 사용/gcc2015. 7. 30. 10:10

-c -o gch를 통해서 gcc precompiled header를 생성이 가능하다.

물론 gch가 생성되면 원래 헤더파일이 사라져도 문제없이 컴파일 된다.

pi@raspberrypi ~/src/pch $ g++ -c stdafx.h -o stdafx.h.gch


pi@raspberrypi ~/src/pch $ ls -al

합계 4244

drwxr-xr-x 2 pi pi    4096  7월 30 00:58 .

drwxr-xr-x 9 pi pi    4096  7월 30 00:58 ..

-rw-r--r-- 1 pi pi      37  7월 30 00:58 1

-rw-r--r-- 1 pi pi      91  7월 30 00:58 a.cpp

-rw-r--r-- 1 pi pi      37  7월 30 00:58 stdafx.h

-rw-r--r-- 1 pi pi 4324036  7월 30 00:59 stdafx.h.gch


pi@raspberrypi ~/src/pch $ file stdafx.h.gch

stdafx.h.gch: GCC precompiled header (version 013) for C++


pi@raspberrypi ~/src/pch $ mv stdafx.h stdafx.h.bak

pi@raspberrypi ~/src/pch $ g++ a.cpp 


확장자 gch로 확인하기 때문에 다른 확장자로 변경시 gch 헤더를 찾지 못한다.

pi@raspberrypi ~/src/pch $ mv stdafx.h.gch stdafx.h.gch.bak

pi@raspberrypi ~/src/pch $ ls -al

합계 4248

drwxr-xr-x 2 pi pi    4096  7월 30 01:01 .

drwxr-xr-x 9 pi pi    4096  7월 30 00:58 ..

-rw-r--r-- 1 pi pi      91  7월 30 00:58 a.cpp

-rwxr-xr-x 1 pi pi    6492  7월 30 01:00 a.out

-rw-r--r-- 1 pi pi      37  7월 30 00:58 stdafx.h.bak

-rw-r--r-- 1 pi pi 4324036  7월 30 00:59 stdafx.h.gch.bak

pi@raspberrypi ~/src/pch $ g++ a.cpp

a.cpp:1:20: fatal error: stdafx.h: 그런 파일이나 디렉터리가 없습니다

compilation terminated.


-c가 좀더 간편한듯.

-x c++-hedaer

-x c-header는 너무 길어 -_-

pi@raspberrypi ~/src/pch $ gcc -x c++-header stdafx.h -o stdafx.h.gch

pi@raspberrypi ~/src/pch $ ls -al

합계 4248

drwxr-xr-x 2 pi pi    4096  7월 30 01:01 .

drwxr-xr-x 9 pi pi    4096  7월 30 00:58 ..

-rw-r--r-- 1 pi pi      91  7월 30 00:58 a.cpp

-rwxr-xr-x 1 pi pi    6492  7월 30 01:00 a.out

-rw-r--r-- 1 pi pi      37  7월 30 00:58 stdafx.h

-rw-r--r-- 1 pi pi 4324036  7월 30 01:01 stdafx.h.gch  


-c는 찾는거 포기 -_-

-x language

Specify explicitly the language for the following input files (rather than letting the compiler choose a default based on the file name suffix). This option applies to all following input files until the next -x option. Possible values for language are:

c  c-header  c-cpp-output

c++  c++-header  c++-cpp-output

objective-c  objective-c-header  objective-c-cpp-output

objective-c++ objective-c++-header objective-c++-cpp-output

assembler  assembler-with-cpp

ada

f77  f77-cpp-input f95  f95-cpp-input

java


-o file

Place output in file file. This applies regardless to whatever sort of output is being produced, whether it be an executable file, an object file, an assembler file or preprocessed C code.

If -o is not specified, the default is to put an executable file in a.out, the object file for source.suffix in source.o, its assembler file in source.s, a precompiled header file in source.suffix.gch, and all preprocessed C source on standard output.

[링크 : http://linux.die.net/man/1/gcc] 


췟 이건 안되네 -_-

pi@raspberrypi ~/src/pch $ gcc stdafx.h -o stdafx.h.gch

stdafx.h:1:18: fatal error: string: 그런 파일이나 디렉터리가 없습니다

compilation terminated. 



결론 -c -o .gch로 하자


2015/07/29 - [프로그램 사용/gcc] - gcc에서 precompiled header 사용하기




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

gcc -M -MM  (0) 2015.12.17
gcc 초기화 관련  (0) 2015.10.21
gcc에서 precompiled header 사용하기  (0) 2015.07.29
gcc 64bit 변수 선언하기  (0) 2015.07.14
gcc 32bit/ 64bit 컴파일하기  (0) 2015.07.14
Posted by 구차니
프로그램 사용/gcc2015. 7. 29. 13:47

한번 시도는 해봐야겠다.


g++ -Wall -fexceptions -H  -g     -c main.cpp -o obj/Debug/main.o

! /usr/local/include/boost/xpressive/xpressive.hpp.gch

main.cpp

. /usr/include/c++/4.4/iostream

.. /usr/include/c++/4.4/x86_64-linux-gnu/bits/c++config.h

.. /usr/include/c++/4.4/ostream

.. /usr/include/c++/4.4/istream

main.cpp

The ! means that the compiler was able to use the precompiled header. An x means it was not able to use it. Using the appropriate compiler flags is crucial. I took off the -H and ran some speed tests. The precompiled header had an improvement from 14 seconds to 11 seconds. Not bad but not great.


Note: Here's the link to the example: http://www.boost.org/doc/libs/1_43_0/doc/html/xpressive/user_s_guide.html#boost_xpressive.user_s_guide.examples I couldn't get it to work in the post.

[링크 : http://stackoverflow.com/questions/58841/precompiled-headers-with-gcc]



Caution: There are a few known situations where GCC will crash when trying to use a precompiled header. If you have trouble with a precompiled header, you should remove the precompiled header and compile without it.


To create a precompiled header file, simply compile it as you would any other file, if necessary using the -x option to make the driver treat it as a C or C++ header file.


Each of the following options must be the same when building and using the precompiled header:

          -fexceptions -funit-at-a-time


[링크 : https://gcc.gnu.org/onlinedocs/gcc-4.0.0/gcc/Precompiled-Headers.html]



아래는 cpp 의 경우,

g++ -x c++-header stdafx.h -o stdafx.h.gch

아래는 c 의 경우,

gcc -x c-header stdafx.h -o stdafx.h.gch

[링크 : https://kldp.org/node/22714]



Precompiled headers are supported in GCC (3.4 and newer).

[링크 : http://softwareji.tistory.com/65]

Posted by 구차니