Boos's Discovery

  • 홈
  • 태그
  • 방명록

Engineering/JNI 2

jni 로 작성한 c 파일에서 "request for member in something not a structure or union" 컴파일 오류가 날때

jni 로 작업할 일이 있었는데 설정 방법을 잘 몰라서인지 의외로 컴파일 오류가 많이 발생한다. $ gcc -shared -o libjnifuncs.so jnifuncs.c -I$JAVA_HOME/include -I$JAVA_HOME/include/linux -fPICjnifuncs.c: In function ‘Java_jnifuncs_makeIntArray’:jnifuncs.c:21: error: request for member ‘NewIntArray’ in something not a structure or unionjnifuncs.c: In function ‘Java_jnifuncs_setIntArray’:jnifuncs.c:44: error: request for member ‘GetArrayL..

Engineering/JNI 2012.07.24

HelloWorld jni 테스트 in linux

- HelloWorld.java 작성// HelloWorld.java//import java.io.*; public class HelloWorld { public native void printMessage(); void init() { System.loadLibrary("HelloWorld"); } public static void main (String args[]) { HelloWorld hello = new HelloWorld(); hello.init(); hello.printMessage(); }} - HelloWorld 컴파일$ javac HelloWorld.java - HelloWorld.h 헤더파일 생성$ javah -jni HelloWorld - 헤더파일 확인/* DO NOT EDIT T..

Engineering/JNI 2012.07.24
이전
1
다음
더보기
프로필사진

Boos's Discovery

당당하게 걷기

  • 분류 전체보기
    • Thinking
      • Book
      • Music
      • Writing
      • Study
      • CodingGame
      • 웹소설
    • Traveling
    • Tasking
    • Living
      • Lotto
    • Engineering
      • BSD
      • DB
      • Facebook
      • Etc
      • JNI
      • Kernel
      • Linux
      • Mac
      • Docker
      • Network
      • Tomcat
      • PHP
      • javascript
      • Vue
      • Spring
      • Python
      • Java
      • ShellScript
      • Elasticsearch
      • C#
      • Redis
      • Flutter
      • Unity
      • Android
      • Windows
      • AI

Tag

OpenJDK, xcrun altool, elasticsearch, yt-dlp, docker build, docker, ip addr, MAC, 박성현, MySQL, upload, Gradle, 티스토리챌린지, 토비의 봄, centOS7, Python, 연금 복권 번호, 연금 복권, 오블완, redis,

최근글과 인기글

  • 최근글
  • 인기글

최근댓글

공지사항

페이스북 트위터 플러그인

  • Facebook
  • Twitter

Archives

Calendar

«   2025/05   »
일 월 화 수 목 금 토
1 2 3
4 5 6 7 8 9 10
11 12 13 14 15 16 17
18 19 20 21 22 23 24
25 26 27 28 29 30 31

방문자수Total

  • Today :
  • Yesterday :

Copyright © Kakao Corp. All rights reserved.

  • 네이버 블로그 - firstboos

티스토리툴바