Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1XOqBp-0002DF-S2 for pgsql-bugs@arkaria.postgresql.org; Tue, 02 Sep 2014 15:40:13 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1XOqBp-0005Yq-Bc for pgsql-bugs@arkaria.postgresql.org; Tue, 02 Sep 2014 15:40:13 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1XOpla-0000Zo-C9 for pgsql-bugs@postgresql.org; Tue, 02 Sep 2014 15:13:06 +0000 Received: from wrigleys.postgresql.org ([204.145.124.246]) by magus.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1XOplX-0008Ex-4F for pgsql-bugs@postgresql.org; Tue, 02 Sep 2014 15:13:05 +0000 MIME-Version: 1.0 Subject: BUG #11336: libpq.dll: file not recognized To: pgsql-bugs@postgresql.org From: soweasley@gmail.com Date: Tue, 02 Sep 2014 15:12:59 +0000 Message-ID: <20140902151259.2926.83795@wrigleys.postgresql.org> X-Pg-Spam-Score: -0.3 (/) Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-bugs Precedence: bulk Sender: pgsql-bugs-owner@postgresql.org The following bug has been logged on the website: Bug reference: 11336 Logged by: soweasley Email address: soweasley@gmail.com PostgreSQL version: 9.3.5 Operating system: Windows 7 64-bit Description: Hi all, I get the following error : C:\user\pgsql\lib/libpq.dll: file not recognized: File format not recognized collect2.exe: error: ld returned 1 exit status With the following C code: #include #include #include int main(int argc, char *argv[]){ PGconn *pgConn = PQconnectdb("dbname=xxx user=yyy password=zzz"); if (pgConn != NULL) { printf("Connected to database.\n"); } else { printf("Cannot connect to database.\n"); } return EXIT_SUCCESS; } And with the following settings: GCC C Compiler (-I "C:/user/pgsql/include") and the MinGW C Linker (-L "C:/user/pgsql/lib" -lpq) I already red the related topics and HTML documentation, but the error remains. Do you have any idea how to solve this? Thank you. Regards, -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs