Article View: borland.public.jbuilder.java.language
Article #15426calling a C++ DLL from a Java application
From: Bernard Lahaque
Date: Thu, 10 Jun 1999 00:00
Date: Thu, 10 Jun 1999 00:00
19 lines
1358 bytes
1358 bytes
Hi, My goal is to call a DLL written with C++Builder 3.0 from a java application. I already studied the tutorial located in the sun site (http://java.sun.com/docs/books/tutorial/native 1.1). It works fine when I compile the C file with the command line compiler BCC32 (the program is written in C). My question is : how do I have to write the code of the DLL in C++ to be able to compile it from the IDE (Integrated Development Environment). When I try to create a DLL with CBuilder (File/New/DLL) it creates automatically the code int WINAPI DllEntryPoint (..). I add the code to export a procedure that I wish to call from my java application (JNIEXPORT void JNICALL ...). Then I compiled to create a DLL but when I call the DLL from my java application I have the exception error : "Unsatisfied linked error...". Thanks in advance for your suggestions. Ben.
Technical Details
Message-ID:
<7jo6a4$dtf$1@news3.Belgium.EU.net>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailShow Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: f74b3,c0769d1d881e7b65,start X-Google-Attributes: gidf74b3,public From: "Bernard Lahaque" <bernard.lahaque@reality.be> Subject: calling a C++ DLL from a Java application Date: 1999/06/10 Message-ID: <7jo6a4$dtf$1@news3.Belgium.EU.net> X-Deja-AN: 487866195 Organization: EUnet Belgium, Leuven, Belgium X-MimeOLE: Produced By Microsoft MimeOLE V4.71.1712.3 Newsgroups: borland.public.jbuilder.java.language