From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 1441 invoked by alias); 1 Nov 2002 22:16:49 -0000 Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner@cygwin.com Mail-Followup-To: cygwin@cygwin.com Received: (qmail 1364 invoked from network); 1 Nov 2002 22:16:48 -0000 Received: from unknown (HELO ripple.fruitbat.org) (66.80.62.153) by sources.redhat.com with SMTP; 1 Nov 2002 22:16:48 -0000 Received: (from daemon@localhost) by ripple.fruitbat.org (8.10.2/8.8.8/PAC-1.3) id gA1MEki18162; Fri, 1 Nov 2002 14:14:46 -0800 Received: from ming.fruitbat.org(192.168.1.2) by ripple.fruitbat.org via smap (V2.1/2.1+anti-relay+anti-spam) id xma018159; Fri, 1 Nov 02 14:13:47 -0800 Received: from gremlin.fruitbat.org (doctor@gremlin.fruitbat.org [192.168.1.4]) by ming.fruitbat.org (8.10.2/8.10.2/PAC-1.6) with ESMTP id gA1MDlV19785; Fri, 1 Nov 2002 14:13:47 -0800 Date: Fri, 01 Nov 2002 14:16:00 -0000 From: "Peter A. Castro" To: Brunda Sathi cc: cygwin@cygwin.com Subject: Re: Sample makefile In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-SW-Source: 2002-11/txt/msg00037.txt.bz2 On Fri, 1 Nov 2002, Brunda Sathi wrote: > Hi, > I am trying to compile an oracle oci sample program "cdemo81.c" which > is under > d:\oracle\ora92\oci\samples directory. It is referring to a > library called oci.lib which is under > d:\oracle\ora92\oci\lib\msvc directory. > All include files are under d:\oracle\ora92\oci\include directory > cygwin dev tools are under d:\cygwin\bin directory. > > My question is how do I create a simple cdemo1.exe file by compiling and > linking (command line). > > I tried following command > D:\Oracle\ora92\oci\samples>gcc -c -Id:\oracle\ora92\oci\include > cdemo81.c > > copilation was successful. > > I am trying to link using following command and I am unable to link to > oci.lib. > > D:\Oracle\ora92\oci\samples>ld -o cdemo81 -ld:\oracle\ora92\oci\lib\msvc\oci.lib cdemo81.o -lc > > I am getting undefined reference all functions that are called from oci.lib. It would help if you provided the output from the linker so we can see what's unresolved. I'm a bit weary that this will work anyway. Oracle's OCI libraries were built using the MS Visual C++ environment. As such, it has references to things in the MSVCRT an expects to be run in that environment. I don't recall if gcc's linker can easily link with the MSVCRT environment. Perhaps Christopher can comment on this. > Thanks, > Brunda -- Peter A. Castro or "Cats are just autistic Dogs" -- Dr. Tony Attwood -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Bug reporting: http://cygwin.com/bugs.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/