Return-Path: Delivered-To: apmail-ant-user-archive@ant.apache.org Received: (qmail 48878 invoked by uid 500); 4 Aug 2003 12:30:45 -0000 Mailing-List: contact user-help@ant.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Ant Users List" Reply-To: "Ant Users List" Delivered-To: mailing list user@ant.apache.org Received: (qmail 48867 invoked from network); 4 Aug 2003 12:30:45 -0000 Received: from motgate.mot.com (129.188.136.100) by daedalus.apache.org with SMTP; 4 Aug 2003 12:30:45 -0000 Received: from il06exr02.mot.com (il06exr02.mot.com [129.188.137.132]) by motgate.mot.com (Motorola/Motgate) with ESMTP id h74CUhSD010985 for ; Mon, 4 Aug 2003 05:30:43 -0700 (MST) Received: from zwg18exm01.sps.mot.com (zwg18exm01.sps.mot.com [10.170.73.30]) by il06exr02.mot.com (Motorola/il06exr02) with ESMTP id h74BUdTO019240 for ; Mon, 4 Aug 2003 07:30:40 -0400 Received: from motorola.com (murilo.sps.mot.com [10.170.79.101]) by zwg18exm01.sps.mot.com with SMTP (Microsoft Exchange Internet Mail Service Version 5.5.2657.2) id QFW5KSTX; Mon, 4 Aug 2003 14:30:40 +0200 Message-ID: <3F2E51F0.9020201@motorola.com> Date: Mon, 04 Aug 2003 14:30:40 +0200 From: Astrid Wagner User-Agent: Mozilla/5.0 (X11; U; SunOS sun4u; en-US; rv:1.0.1) Gecko/20020719 Netscape/7.0 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Ant Users List Subject: Re: how to compile native c code References: <961522C00478694CB10DAFE295B7ED8101B7ADA4@sl-mail2.spde.net> Content-Type: multipart/alternative; boundary="------------020804080602050702080500" X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N --------------020804080602050702080500 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Thanks for the info! I added this section in the build.xml: But when I build I receive: [cc] "/ccvob/minerva_data/min_web/ipr_files/web_applications/src/com/mot/sps/ipr/common/IprShellInterf ace.c", line 34: Error: Pointer type needed instead of JNIEnv_. [cc] "/ccvob/minerva_data/min_web/ipr_files/web_applications/src/com/mot/sps/ipr/common/IprShellInterf ace.c", line 35: Error: Pointer type needed instead of JNIEnv_. [cc] "/ccvob/minerva_data/min_web/ipr_files/web_applications/src/com/mot/sps/ipr/common/IprShellInterf ace.c", line 36: Error: Pointer type needed instead of JNIEnv_. [cc] "/ccvob/minerva_data/min_web/ipr_files/web_applications/src/com/mot/sps/ipr/common/IprShellInterf ace.c", line 37: Error: Pointer type needed instead of JNIEnv_. [cc] "/ccvob/minerva_data/min_web/ipr_files/web_applications/src/com/mot/sps/ipr/common/IprShellInterf ace.c", line 69: Error: Pointer type needed instead of JNIEnv_. [cc] 5 Error(s) detected. Snippet of the c-code: #include #include "com_mot_sps_ipr_common_IprShellInterface.h" #include #include #include JNIEXPORT jstring JNICALL Java_com_mot_sps_ipr_common_IprShellInterface_callIprShellInterface(JNIEnv *e nv, jobject obj, jstring account, jstring machine, jstring command, jstring output) { /* Obtain a C-copy of the Java strings */ const char *c_account = (*env)->GetStringUTFChars(env, account, 0); const char *c_machine = (*env)->GetStringUTFChars(env, machine, 0); const char *c_command = (*env)->GetStringUTFChars(env, command, 0); const char *c_output = (*env)->GetStringUTFChars(env, output, 0); where the compiler complains about the last 4 lines above. When I compile on the shell (or with make) it works though (cc -G -I/tools/java/j2sdk1.4.0/include -I/tools/java/j2sdk1.4.0/include/solaris src/com/mot/sps/ipr/common/* .c -o libTest.so) My question: which c compiler is used when saying "CC" and how can I set a specific one (if that is the source of my problems)? I am working on Solaris 8. Thanks for your help. Astrid Harkness, David wrote: >Check out Ant-contrib's cc task: >http://ant-contrib.sourceforge.net/cc.html > >I've also seen much mention on this list regarding a cpp task, and it >seems to be part of Ant-contrib (it's mentioned in their developer >mailing list), so maybe it's in an alpha/beta version. > >David Harkness >Sony Pictures Digital Networks >(310) 482-4756 > > >-----Original Message----- >From: Astrid Wagner [mailto:Astrid.Wagner@motorola.com] >Sent: Friday, August 01, 2003 1:27 AM >To: user@ant.apache.org >Subject: how to compile native c code > > >Hi, >I want to include the compilation (and installation) of some native c >code into my build.xml. Can someone tell me how or tell me where I can >look? Thanks. Astrid > > >--------------------------------------------------------------------- >To unsubscribe, e-mail: user-unsubscribe@ant.apache.org >For additional commands, e-mail: user-help@ant.apache.org > > >--------------------------------------------------------------------- >To unsubscribe, e-mail: user-unsubscribe@ant.apache.org >For additional commands, e-mail: user-help@ant.apache.org > > --------------020804080602050702080500--