|
From: | Marty Heyman |
Subject: | Re: [open-cobol-list] linking stuff (statically linked same code) |
Date: | Mon, 15 Sep 2014 09:54:20 -0400 |
Different compile behavior — START SESSION CLIP — address@hidden:~/Projects/PlanBTest/mhWork$ cobc -L/usr/lib -lpq -std=mvs -static -x -w ../cobol_source/PGTest.cbl /tmp/cob42052_0.c: In function ‘pgcob_’: /tmp/cob42052_0.c:102:3: warning: implicit declaration of function ‘PQconnectdb’ [-Wimplicit-function-declaration] (*(unsigned char **) (b_5)) = (void *)PQconnectdb ((cob_u8_ptr)"dbname = postgres\000"); ^ /tmp/cob42052_0.c:102:33: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast] (*(unsigned char **) (b_5)) = (void *)PQconnectdb ((cob_u8_ptr)"dbname = postgres\000"); ^ /tmp/cob42052_0.c:110:3: warning: implicit declaration of function ‘PQstatus’ [-Wimplicit-function-declaration] b_1 = PQstatus ((*(unsigned char **) (b_5))); ^ /tmp/cob42052_0.c:119:3: warning: implicit declaration of function ‘PQuser’ [-Wimplicit-function-declaration] (*(unsigned char **) (b_7)) = (void *)PQuser ((*(unsigned char **) (b_5))); ^ /tmp/cob42052_0.c:119:33: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast] (*(unsigned char **) (b_7)) = (void *)PQuser ((*(unsigned char **) (b_5))); ^ /tmp/cob42052_0.c:140:3: warning: implicit declaration of function ‘PQexec’ [-Wimplicit-function-declaration] (*(unsigned char **) (b_6)) = (void *)PQexec ((*(unsigned char **) (b_5)), (cob_u8_ptr)"select version();\000"); ^ /tmp/cob42052_0.c:140:33: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast] (*(unsigned char **) (b_6)) = (void *)PQexec ((*(unsigned char **) (b_5)), (cob_u8_ptr)"select version();\000"); ^ /tmp/cob42052_0.c:150:3: warning: implicit declaration of function ‘PQgetvalue’ [-Wimplicit-function-declaration] (*(unsigned char **) (b_7)) = (void *)PQgetvalue ((*(unsigned char **) (b_6)), (cob_s32_t)0LL, (cob_s32_t)0LL); ^ /tmp/cob42052_0.c:150:33: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast] (*(unsigned char **) (b_7)) = (void *)PQgetvalue ((*(unsigned char **) (b_6)), (cob_s32_t)0LL, (cob_s32_t)0LL); ^ /tmp/cob42052_0.c:167:3: warning: implicit declaration of function ‘PQfinish’ [-Wimplicit-function-declaration] PQfinish ((*(unsigned char **) (b_5))); ^ /tmp/cob42052_0.c:185:33: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast] (*(unsigned char **) (b_7)) = (void *)PQuser ((*(unsigned char **) (b_5))); ^ address@hidden:~/Projects/PlanBTest/mhWork$ ./PGTest Before connect:0x0000000000000000 After connect: 0x0000000000f13590 Status: +0000000001 User: marty call PQexec 0x0000000000000000 Attempt to reference unallocated memory (Signal SIGSEGV) Abnormal termination - File contents may be incorrect address@hidden:~/Projects/PlanBTest/mhWork$ — END SESSION CLIP —— — Marty Heyman 510-290-6484 (Mobile) On Sep 15, 2014, at 9:10 AM, Marty Heyman <address@hidden> wrote:
|
[Prev in Thread] | Current Thread | [Next in Thread] |