[참고] 리눅스에서 컴파일시 사용했던 명령어,
gcc -fPIC -c -I/svc/oil/bin/des_java/des/lib_src/include -I/usr/local/java/include -I/usr/local/java/include/linux desc1.c
gcc -fPIC -c -I/svc/oil/bin/des_java/des/lib_src/include -I/usr/local/java/include -I/usr/local/java/include/linux xecure_util_EDTestJ.c
gcc -shared -o libSSONUM.so desc1.o xecure_util_EDTestJ.o -lc
컴파일1
cc -q64 -fPIC -c -I/home/batch/samsungcard/lib_src/include -I/usr/java14_64/include -I/usr/java14_64/include dess1.c
cc -q64 -fPIC -c -I/home/batch/samsungcard/lib_src/include -I/usr/java14_64/include -I/usr/java14_64/include dess1.c xecure_util_EDTestJ.c
cc -b64 -o libSSOCHAR.so xecure_util_EDTestJ.o dess1.o -lpthread -G
컴파일2
cc -q64 -fPIC -c -I/home/batch/samsungcard/lib_src/include -I/usr/java14_64/include -I/usr/java14_64/include desc1.c
cc -q64 -fPIC -c -I/home/batch/samsungcard/lib_src/include -I/usr/java14_64/include -I/usr/java14_64/include xecure_util_EDTestJ.c
cc -b64 -o libSSONUM.so xecure_util_EDTestJ.o desc1.o -lpthread -G
ld -b64 -o libSSONUM.so xecure_util_EDTestJ.o desc1.o -G -bexpall -bM:SRE -bnoentry -lc
cc -b64 -o libSSONUM.so xecure_util_EDTestJ.o desc1.o -G -bexpall -bM:SRE -bnoentry -lc
cc -b64 -o libSSONUM.a xecure_util_EDTestJ.o desc1.o -G -bexpall -bM:SRE -bnoentry -lc
cc -q64 -L./ -lSSONUM test.c
컴파일2 32비트
cc -q32 -fPIC -c -I/home/batch/samsungcard/lib_src/include -I/usr/java14_64/include -I/usr/java14_64/include desc1.c
cc -q32 -fPIC -c -I/home/batch/samsungcard/lib_src/include -I/usr/java14_64/include -I/usr/java14_64/include xecure_util_EDTestJ.c
cc -b32 -o libSSONUM.a xecure_util_EDTestJ.o desc1.o -G -bexpall -bM:SRE -bnoentry -lc
cc -q32 -L./ -lSSONUM test.c
컴파일2 64비트 옵션2
cc -q64 -c -I/home/batch/samsungcard/lib_src/include -I/usr/java14_64/include -I/usr/java14_64/include desc1.c
cc -q64 -c -I/home/batch/samsungcard/lib_src/include -I/usr/java14_64/include -I/usr/java14_64/include xecure_util_EDTestJ.c
ld -b64 -o libSSONUM.a xecure_util_EDTestJ.o desc1.o -G -bexpall -bM:SRE -bnoentry -lc
cc -q32 -fPIC -c -I/home/batch/samsungcard/lib_src/include -I/usr/java14_64/include -I/usr/java14_64/include desc1.c
cc -q32 -fPIC -c -I/home/batch/samsungcard/lib_src/include -I/usr/java14_64/include -I/usr/java14_64/include xecure_util_EDTestJ.c
cc -b32 -o libSSONUM.so xecure_util_EDTestJ.o desc1.o -lpthread -G
cc -b64 -o libSSONUM.so xecure_util_EDTestJ.o desc1.o -G -bexpall -bnoentry -lc
cc -b32 xecure_util_EDTestJ.o test.o -bexpall -bnoentry -lc
javac -d ./ CoopDesManager.java WrongArgumentException.java EncryptionException.java XecureDesChar.java XecureDesNum.java DecryptionException.java
javac DesTest.java
java -classpath ./ DesTest
## c에서는 잘 돌아감
xlc_r -q64 -c -I. -I/usr/java14_64/include -I/usr/java14_64/include/aix -I/home/batch/samsungcard/lib_src/include desc1.c xecure_util_EDTestJ.c
ld -b64 -o libSSONUM.so desc1.o xecure_util_EDTestJ.o -bnoentry -bM:SRE -bE:cimx.exp -blibpath:/lib/usr/lib -lc_r -L/usr/java14_64/lib/aix/native_threads
ld -b64 -o libSSONUM.a desc1.o xecure_util_EDTestJ.o -bnoentry -bM:SRE -bE:cimx.exp -blibpath:/lib/usr/lib -lc_r -L/usr/java14_64/lib/aix/native_threads
cc -q64 -L./ -lSSONUM test.c
## sample jni
xlc_r -q64 -c -I. -I/usr/java14_64/include -I/usr/java14_64/include/aix cimx.c NativeStringUtil.c
ld -b64 -o libcimx.so cimx.o NativeStringUtil.o -bnoentry -bM:SRE -bE:cimx.exp -blibpath:/lib/usr/lib -lc_r -L/usr/java14_64/lib/aix/native_threads
<b>[출처]</b> : <a href='http://www.coolx.net/main.jsp' target=_blank>www.coolx.net</a>
'컴퓨터/IT' 카테고리의 다른 글
게시물 보기모드에서 리스트 출력 해제 (0) | 2011.02.20 |
---|---|
한 개의 eclipse가 여러개의 workspace를 갖게 하는 방법 (0) | 2010.08.12 |
기업에서도 쓸수 있는 무료 씨디 버닝 프로그램 CDBurnerXP (0) | 2010.01.03 |
CPU온도 측정및 팬 속도 조절프로그램 speedfan 4.39 (0) | 2009.10.01 |
파워포인트 창 두개 띄우기 (MS 2007 기준) (0) | 2009.09.28 |