CSDN首页 空间 新闻 论坛 Blog 下载 读书 网摘 搜索 .NET Java 视频 接项目 求职 在线学习 买书 程序员 通知
可用分押宝游戏火热进行中... 专题改版:Java Web 专题
CSDN社区
搜索 收藏 打印 关闭
CSDN社区 >  C/C++ >  C语言

请问各位老大以dll编译的问题

楼主findajob(findajob)2003-06-02 17:40:07 在 C/C++ / C语言 提问

本人写了个dll要在java中调用  
  ShowMsgBox.h  
  /*   DO   NOT   EDIT   THIS   FILE   -   it   is   machine   generated   */  
  #include   <jni.h>  
  /*   Header   for   class   ShowMsgBox   */  
   
  #ifndef   _Included_ShowMsgBox  
  #define   _Included_ShowMsgBox  
  #ifdef   __cplusplus  
  extern   "C"   {  
  #endif  
  /*  
    *   Class:           ShowMsgBox  
    *   Method:         ShowMessage  
    *   Signature:   (Ljava/lang/String;)V  
    */  
  JNIEXPORT   void   JNICALL   Java_ShowMsgBox_ShowMessage  
      (JNIEnv   *,   jobject,   jstring);  
   
  #ifdef   __cplusplus  
  }  
  #endif  
  #endif  
   
   
  //   fds.cpp   :   Defines   the   entry   point   for   the   DLL   application.  
  //  
   
  #include   "stdafx.h"  
  #include   "ShowMsgBox.h"  
  BOOL   APIENTRY   DllMain(   HANDLE   hModule,    
                                                DWORD     ul_reason_for_call,    
                                                LPVOID   lpReserved  
    )  
  {  
          return   TRUE;  
  }  
  JNIEXPORT       void   JNICALL       Java_ShowMsgBox_ShowMessage(JNIEnv   *   jEnv,   jobject   this,   jstring   jMsg)   {  
    /*   const   char   *   msg;  
      msg   =   (*jEnv)->GetStringUTFChars(jEnv,   jMsg,0);  
      MessageBox(HWND_DESKTOP,   msg,    
          "Thinking   in   Java:   JNI",  
          MB_OK   |   MB_ICONEXCLAMATION);  
      (*jEnv)->ReleaseStringUTFChars(jEnv,   jMsg,msg);*/  
  }  
   
  可是在vc6种编译,总出现  
  :\vc6\MSDev98\MyProjects\fds\fds.cpp(13)   :   error   C2143:   syntax   error   :   missing   ')'   before   'this'  
  D:\vc6\MSDev98\MyProjects\fds\fds.cpp(13)   :   error   C2143:   syntax   error   :   missing   ';'   before   'this'  
  D:\vc6\MSDev98\MyProjects\fds\fds.cpp(13)   :   error   C2143:   syntax   error   :   missing   ';'   before   'this'  
  D:\vc6\MSDev98\MyProjects\fds\fds.cpp(13)   :   error   C2059:   syntax   error   :   ')'  
  D:\vc6\MSDev98\MyProjects\fds\fds.cpp(13)   :   error   C2143:   syntax   error   :   missing   ';'   before   '{'  
  D:\vc6\MSDev98\MyProjects\fds\fds.cpp(13)   :   error   C2447:   missing   function   header   (old-style   formal   list?)  
  Error   executing   cl.exe.  
   
  的错,本人初学vc,请各位老大多指教  
  问题点数:0、回复次数:1Top

1 楼cryincold(夜来☆幽梦忽还【湘】)回复于 2003-06-02 18:20:37 得分 0

呀   !!     java   中调用。。   偶不会噢Top

相关问题

  • 简单编译出错,各位老大,救救我
  • 编译成dll
  • Dll反编译
  • Dll反编译
  • Dll反编译
  • 各位老大,觉得反编译工具JODE怎么样?<b>(重要)</b>
  • 请教各位老大,关于编译连接MC文件的问题
  • 编译DLL问题
  • dll编译出错~~
  • dll编译出错

关键词

  • dll
  • showmsgbox
  • jenv
  • jmsg
  • showmessage
  • endif
  • msg
  • fds
  • include

得分解答快速导航

  • 帖主:findajob

相关链接

  • C/C++ Blog
  • C/C++类图书
  • C/C++类源码下载

广告也精彩

反馈

请通过下述方式给我们反馈
反馈
提问
网站简介|广告服务|VIP资费标准|银行汇款帐号|网站地图|帮助|联系方式|诚聘英才|English|问题报告
世纪乐知(北京)网络技术有限公司 版权所有, 京 ICP 证 020026 号
北京创新乐知广告有限公司 提供技术支持
Copyright © 2000-2007, CSDN.NET, All Rights Reserved
GongshangLogo