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

  1. 2019.06.21 gcc의 linker 옵션 은 가장 끝에
  2. 2019.06.21 c large file support
  3. 2019.06.18 xsd to postgresql DDL
  4. 2019.06.14 gcc5 atoi / stoi
  5. 2019.06.14 postgresql dbms 설정
  6. 2019.06.13 docker run -p hport:cport
  7. 2019.06.13 pgadmin dashboard 살려내기
  8. 2019.06.12 postresql backup & recovery
  9. 2019.06.12 postgresql schema
  10. 2019.06.12 docker api
프로그램 사용/gcc2019. 6. 21. 17:40

예전글에서 누락된 부분인데..

-l로 링커에 넘겨서 붙일 녀석들은 왜인지 모르겠지만 가장 마지막에 옵션을 주어야 한다.

 

아래처럼 파일명 이후에 -l을 넣어주면 문제없이 되는데

$ gcc -I/usr/include/libxml2 reader2.c  -lxml2 

 

-l 이후에 파일명을 넣으면 해당 파일을 찾을수 없다고 나온다.

(그냥 테스트 해보면 -lxml2를 넣지 않은것과 동일하다)

$ gcc -I/usr/include/libxml2 -lxml2 reader2.c
/tmp/ccUmEsNl.o: In function `processNode':
reader2.c:(.text+0x19): undefined reference to `xmlTextReaderConstName'
reader2.c:(.text+0x3b): undefined reference to `xmlTextReaderConstValue'
reader2.c:(.text+0x4b): undefined reference to `xmlTextReaderHasValue'
reader2.c:(.text+0x5a): undefined reference to `xmlTextReaderIsEmptyElement'
reader2.c:(.text+0x69): undefined reference to `xmlTextReaderNodeType'
reader2.c:(.text+0x77): undefined reference to `xmlTextReaderDepth'
reader2.c:(.text+0xb8): undefined reference to `xmlStrlen'
/tmp/ccUmEsNl.o: In function `streamFile':
reader2.c:(.text+0x11d): undefined reference to `xmlReaderForFile'
reader2.c:(.text+0x138): undefined reference to `xmlTextReaderRead'
reader2.c:(.text+0x155): undefined reference to `xmlTextReaderRead'
reader2.c:(.text+0x16a): undefined reference to `xmlTextReaderIsValid'
reader2.c:(.text+0x19a): undefined reference to `xmlFreeTextReader'
/tmp/ccUmEsNl.o: In function `main':
reader2.c:(.text+0x209): undefined reference to `xmlCheckVersion'
reader2.c:(.text+0x221): undefined reference to `xmlCleanupParser'
reader2.c:(.text+0x226): undefined reference to `xmlMemoryDump'
collect2: error: ld returned 1 exit status

 

머지?

foo.o -lz bar.o일 경우

foo.o는 libz가 로드 되지만, bar.o 에서는 libz가 로드되지 않는다?

-llibrary
-l library
Search the library named library when linking. (The second alternative with the library as a separate argument is only for POSIX compliance and is not recommended.)
It makes a difference where in the command you write this option; the linker searches and processes libraries and object files in the order they are specified. Thus, foo.o -lz bar.o searches library z after file foo.o but before bar.o. If bar.o refers to functions in z, those functions may not be loaded.

The linker searches a standard list of directories for the library, which is actually a file named liblibrary.a. The linker then uses this file as if it had been specified precisely by name.

The directories searched include several standard system directories plus any that you specify with -L.

Normally the files found this way are library files---archive files whose members are object files. The linker handles an archive file by scanning through it for members which define symbols that have so far been referenced but not defined. But if the file that is found is an ordinary object file, it is linked in the usual fashion. The only difference between using an -l option and specifying a file name is that -l surrounds library with lib and .a and searches several directories.

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

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

gcc offloading support  (0) 2020.11.24
gcc 특정 영역만 최적화 하지 않게 하기  (0) 2020.10.21
c large file support  (0) 2019.06.21
gcc5 atoi / stoi  (0) 2019.06.14
gcc variadic macro  (0) 2017.06.20
Posted by 구차니
프로그램 사용/gcc2019. 6. 21. 17:02

아래의 선언을 해주면 된다는데.. 모르겠다?

 

-D_LARGE_FILE_SOURCE=1

[링크 : https://stackoverflow.com/questions/14533836/large-file-support-not-working-in-c-programming]

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

gcc 특정 영역만 최적화 하지 않게 하기  (0) 2020.10.21
gcc의 linker 옵션 은 가장 끝에  (0) 2019.06.21
gcc5 atoi / stoi  (0) 2019.06.14
gcc variadic macro  (0) 2017.06.20
문자열에 escape 로 특수문자 넣기  (0) 2017.06.19
Posted by 구차니

별다르게 빌드 안하고 이미 빌드 된 녀석으로 바로 실행해도 잘 된다.

java -classpath ./xsd2pgschema.jar xsd2pgschema --xsd xsd_file > ddl.psql

[링크 : https://sourceforge.net/projects/xsd2pgschema/]

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

postgresql truncate table  (0) 2019.06.25
libpq  (0) 2019.06.24
postgresql dbms 설정  (0) 2019.06.14
pgadmin dashboard 살려내기  (0) 2019.06.13
postresql backup & recovery  (0) 2019.06.12
Posted by 구차니
프로그램 사용/gcc2019. 6. 14. 15:28

????

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

gcc의 linker 옵션 은 가장 끝에  (0) 2019.06.21
c large file support  (0) 2019.06.21
gcc variadic macro  (0) 2017.06.20
문자열에 escape 로 특수문자 넣기  (0) 2017.06.19
gcc cpp type (유니코드 문자열)  (0) 2017.04.04
Posted by 구차니

WAL은 트랜잭션 데이터?

 

[링크 : http://hochul.net/blog/postgresql-configuration-tuning-basic-guide/]

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

libpq  (0) 2019.06.24
xsd to postgresql DDL  (0) 2019.06.18
pgadmin dashboard 살려내기  (0) 2019.06.13
postresql backup & recovery  (0) 2019.06.12
postgresql schema  (0) 2019.06.12
Posted by 구차니
프로그램 사용/docker2019. 6. 13. 10:13

헐.. 반대로 생각하고 있었네?

 

[링크 : https://gist.github.com/nacyot/8366310]

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

docker desktop for windows  (0) 2019.07.09
docker / win10 home / hyper-V  (0) 2019.07.09
docker api  (0) 2019.06.12
docker ps 옵션 차이  (0) 2019.06.11
docker 컨테이너 이미지 이름으로 검색하기  (0) 2019.06.10
Posted by 구차니

실수로 오른쪽의 X를 눌러 없앴는데

다시 살리는법 찾다가 도움되는건 못보고

걍 위에 우클릭하고 Add Panel 하니 다시 살릴수 있네...

 

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

xsd to postgresql DDL  (0) 2019.06.18
postgresql dbms 설정  (0) 2019.06.14
postresql backup & recovery  (0) 2019.06.12
postgresql schema  (0) 2019.06.12
postgres db 속도 향상  (0) 2019.06.07
Posted by 구차니

기존의 시스템에서 사용자가 설치한 postgresql 을 쓰고 있는데

이걸 리눅스 패키지에서 제공하는 녀석으로 파일 레벨에서 갈아 치우는 방법 찾는 중

(일일이 백업해서 옮기기 귀찮...)

 

[링크 : https://www.postgresql.org/docs/9.1/backup-file.html]

[링크 : https://stackabuse.com/backing-up-and-restoring-postgresql-databases/]

 

 

+

[링크 : https://h391106.tistory.com/352]

 

 

+

정 안되면 

pg_dumpall | gzip > backup.gz

식으로 한번 뺴봐야 할 듯

 

[링크 : https://www.postgresql.org/docs/9.1/backup-dump.html]

 

+

[링크 : https://www.opsdash.com/blog/postgresql-backup-restore.html]

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

postgresql dbms 설정  (0) 2019.06.14
pgadmin dashboard 살려내기  (0) 2019.06.13
postgresql schema  (0) 2019.06.12
postgres db 속도 향상  (0) 2019.06.07
postgresql drop all tables  (0) 2019.06.05
Posted by 구차니

pgadmin 으로 보다 보니 database > schema > table 순서로 냐오는게 있어서 찾는중

기본은 public schema인데 이게 머하는거지?

 

DB는 하나 이상의 'named schemaf'를 포함함. 

일단은.. 귀찮으면 기본으로 제공되는 public 하나만 쓰고 테이블 별로 권한을 주고 싶으면

schema를 생성해서 테이블별로 사용자 권한을 주면 될 듯.

A database contains one or more named schemas, which in turn contain tables. Schemas also contain other kinds of named objects, including data types, functions, and operators.

 

There are several reasons why one might want to use schemas:
 To allow many users to use one database without interfering with each other. 
 To organize database objects into logical groups to make them more manageable.
 Third-party applications can be put into separate schemas so they do not collide with the names of other objects.

 

database.schema.table

 

Thus, the following are equivalent:

CREATE TABLE products ( ... );
and:

CREATE TABLE public.products ( ... );

[링크 : https://www.postgresql.org/docs/9.1/ddl-schemas.html]

 

 

스키마는 테이블들의 named collection 이다.

A schema is a named collection of tables. A schema can also contain views, indexes, sequences, data types, operators, and functions.

[링크 : https://www.tutorialspoint.com/postgresql/postgresql_schema.htm]

[링크 : http://www.postgresqlforbeginners.com/2010/12/schema.html]

 

[링크 : https://ktdsoss.tistory.com/184]

[링크 : https://blog.naver.com/seuis398/70097173659]

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

pgadmin dashboard 살려내기  (0) 2019.06.13
postresql backup & recovery  (0) 2019.06.12
postgres db 속도 향상  (0) 2019.06.07
postgresql drop all tables  (0) 2019.06.05
postgresql import from csv  (0) 2019.06.04
Posted by 구차니
프로그램 사용/docker2019. 6. 12. 10:12

 

윽... 뱀은 있어도 c계열은 unofficial이네..

걍 소켓으로 HTTP로 주고 받는게 편하려나...

 

[링크 : https://docs.docker.com/develop/sdk/]

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

docker / win10 home / hyper-V  (0) 2019.07.09
docker run -p hport:cport  (0) 2019.06.13
docker ps 옵션 차이  (0) 2019.06.11
docker 컨테이너 이미지 이름으로 검색하기  (0) 2019.06.10
docker create와 docker rm  (0) 2019.05.30
Posted by 구차니