Received: from localhost (unknown [200.46.204.184]) by postgresql.org (Postfix) with ESMTP id 9C8052E00CC for ; Wed, 9 Jan 2008 20:41:19 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.184]) (amavisd-maia, port 10024) with ESMTP id 54810-10 for ; Wed, 9 Jan 2008 20:41:08 -0400 (AST) Received: from fg-out-1718.google.com (fg-out-1718.google.com [72.14.220.156]) by postgresql.org (Postfix) with ESMTP id E08D02E02B2 for ; Wed, 9 Jan 2008 20:41:14 -0400 (AST) Received: by fg-out-1718.google.com with SMTP id 22so450290fge.23 for ; Wed, 09 Jan 2008 16:41:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:sender:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references:x-google-sender-auth; bh=K7mzeHBkXFa+J1sGRrdTI+ssKLgS6BjKL4CwAY1p2sE=; b=twEoJ+OCD3m/8EHb1SgxmNrEk84LIeZzwqolq/pZ+pN0mF87mQujqOcPbeDGPBbJxUxUnu6SCDrzZ1UFbZmfS9C8mGcyxrCwueYBP5Iq9+Fmt5zUzORVPuUhz4hVaHZ7GY/0oxKRrtKlk7C3kbz541EI+Fg83t9o6wBoZSdwmB0= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:sender:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references:x-google-sender-auth; b=WAd8e17/tCW9NkoT1/Ge8pu+j9DLREPEva8WWVRJYrPGQE/3YTItD+indgChKpGlBU8HUjuOg4KfvKOzmbSq23YPGZuxzTARwRzCeGtr2/RjdMjeRLB1xg+dPZIKXr8aMXUS293OfwPZkEH8MnkgDU2jEi6tR5D9tRMmyDxzyIk= Received: by 10.82.140.20 with SMTP id n20mr2214913bud.27.1199925673210; Wed, 09 Jan 2008 16:41:13 -0800 (PST) Received: by 10.82.178.18 with HTTP; Wed, 9 Jan 2008 16:41:13 -0800 (PST) Message-ID: <6910a60801091641r3f28af97i7a474ed706d4b06b@mail.gmail.com> Date: Wed, 9 Jan 2008 19:41:13 -0500 From: "Reini Urban" To: "Maciej Grygorcewicz" Subject: Re: Problem with compiling C function Cc: pgsql-cygwin@postgresql.org In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: X-Google-Sender-Auth: ed5cd6008ea2ce6a X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200801/2 X-Sequence-Number: 4384 2008/1/9, Maciej Grygorcewicz : > But linker threw such errors: > " > Unresolved External: _pgwin32_fopen referended from .... // and so on > Unresolved External: _pg_sprintfl referended from .... // and so on " > > Why???? I have included postgres.h , and all other required files . -lpgport is needed. > I tried to build almost the same code but in C++ style DLL. > DLL file was created succesfully , but on the other hand postgreSQL couldn't > find exported function... > DLL was in non-undernstadable format for postgresql. for c++ you have to wrap the postgresql functions into extern "C". -- Reini Urban http://phpwiki.org/ http://murbreak.at/ http://spacemovie.mur.at/ http://helsinki.at/