我在做一个JNI练习的时候,生成动态连接库文件报错。。如下
D:\java\text>cl -Ic:\progra~1\Java\jdk1.6.0_01\include -Ic:\progra~1\Java\jdk1.6
.0_01\include\win32 -LD HelloWorldImp.c -Fehello.dll
Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 12.00.8168 for 80x86
Copyright (C) Microsoft Corp 1984-1998. All rights reserved.HelloWorldImp.c
c:\progra~1\Java\jdk1.6.0_01\include\jni.h(21) : fatal error C1083: Cannot open
include file: 'stdio.h': No such file or directory
但是VC的INCLUDE目录下有stdio.h文件啊。。??????????
D:\java\text>cl -Ic:\progra~1\Java\jdk1.6.0_01\include -Ic:\progra~1\Java\jdk1.6
.0_01\include\win32 -LD HelloWorldImp.c -Fehello.dll
Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 12.00.8168 for 80x86
Copyright (C) Microsoft Corp 1984-1998. All rights reserved.HelloWorldImp.c
c:\progra~1\Java\jdk1.6.0_01\include\jni.h(21) : fatal error C1083: Cannot open
include file: 'stdio.h': No such file or directory
但是VC的INCLUDE目录下有stdio.h文件啊。。??????????
解决方案 »
- 帮忙分析一个java小程序的运行结果
- ###JTable问题####
- Thread类中能运行线程体的方法是
- 请教各位朋友,Hibernate 能不能对oracle中视图的数据进行删除。目前只能查询
- 如何过的标题栏参数?
- 在浏览器上的APPLET 程序,出现如下错误。请问如何处理?
- 求助:怎样改变JTable 表头项 的颜色或者风格
- 关于线程同步取得数据的问题。
- 面对java我痛苦的无话可说!!!!!!!!!!
- 请教大神!!mysql数据库里tinyint类型的数据在实体类里我应该定义什么类型?
- 请各位帮忙指点一下
- 会聚csdn中的所有java jni 高手可能都解决不了这jni问题,我一天发一问连续三个星期,坚持再坚持还没有碰到jni 高手,高手太少了,这一帖
Copyright (C) Microsoft Corp 1984-1998. All rights reserved.
=========================================
MS楼主用的VC++6.0里面的编译器。……楼主可以试下使用C++编写。HelloWorldImp.c改名成HelloWorldImp.cpp;把里面的
#include <stdio.h>
换成:
#include <cstdio>
// 其他头文件
using namespace std;// 其他代码其他的C风格的头文件也换成C++风格。我这里倒是有JNI简单的成功例子。楼主感兴趣的话可以发给你,我邮箱:[email protected]。Good Luck!^_^!