免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 2479 | 回复: 0
打印 上一主题 下一主题

[故障求助] 请教aix5.3+oracle10g+proc的编译问题 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2009-11-13 18:26 |只看该作者 |倒序浏览
刚装了aix5.3+oracle10g的环境,准备试试PROC的编译。
PC程序:
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <sqlca.h>
#include <sys/types.h>
#include <netdb.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include <sys/select.h>

int GetSysDate(char *)
{
        EXEC SQL select sysdate from dual;
}


MAKEFILE:
# makefile for generate ubcs batch run-time file.
# Written by Fudefeng
# Date: 2000-04-18

# Define suffix
.SUFFIXES:.pc .c .o .a .so .PHONY

#include a file from oracle env
include $(ORACLE_HOME)/precomp/lib/env_precomp.mk

HOME=/smoke
#define variable

PROCFLAGS= include=/usr/include include=/usr/lpp/xlC/include include=$(HOME)/include include=$(ORACLE_HOME)/precomp/public

CFLAGS=-g -q64 -I/smoke/include -I$(ORACLE_HOME)/precomp/public -L$(LIBHOME) $(SYS_LIB) $(PROLDLIBS)

CC=cc

#define some rules  with  double suffix
.pc.a:
        $(PROC) $(PROCFLAGS) iname=$<
        @$(CC) $(CFLAGS) -c $(<:.pc=.c)
        @ar -X64 -rv $@ $%
        @rm $(<:.pc=.c) $(<:.pc=.o) $(<:.pc=.lis)
        @echo $@ is now up-to-date $(BUG)

.pc.o:
        $(PROC) $(PROCFLAGS) iname=$<
        @$(CC) $(CFLAGS) -c $(?:.pc=.c)

.pc.c:
        echo "3333"
        $(PROC) $(PROCFLAGS) iname=$<
#        $(PROC) iname=$<

.c.o:
        @$(CC) $(CFLAGS) -c $<

.PRECIOUS:

LIB=/smoke/lib/libynlib.a
applib(LIB)
$(LIB):\
        $(LIB)(test.o) \
        $(LIB)(ynfunc.o)
       

$make applib
        proc include=/usr/include include=/usr/lpp/xlC/include include=/csps/include include=/oracle/product/10g/rdbms/precomp/public  iname=test.pc

Pro*C/C++: Release 10.2.0.4.0 - Production on Fri Nov 13 18:09:53 2009

Copyright (c) 1982, 2007, Oracle.  All rights reserved.

System default option values taken from: /oracle/product/10g/rdbms/precomp/admin/pcscfg.cfg

Syntax error at line 362, column 10, file /usr/include/netinet/in.h:
Error at line 362, column 10 in file /usr/include/netinet/in.h
uint64_t ntohll(uint64_t);
.........1
PCC-S-02201, Encountered the symbol "ntohll" when expecting one of the following
:

   ; , = ( [
The symbol ";" was substituted for "ntohll" to continue.

Syntax error at line 363, column 10, file /usr/include/netinet/in.h:
Error at line 363, column 10 in file /usr/include/netinet/in.h
uint64_t htonll(uint64_t);
.........1
PCC-S-02201, Encountered the symbol "htonll" when expecting one of the following
:

   ; , = ( [
The symbol ";" was substituted for "htonll" to continue.

Syntax error at line 183, column 2, file /usr/include/sys/socket.h:
Error at line 183, column 2 in file /usr/include/sys/socket.h
        tid64_t tid;
.1
PCC-S-02201, Encountered the symbol "tid64_t" when expecting one of the followin
g:

   } char, const, double, enum, float, int, long, ulong_varchar,
   OCIBFileLocator OCIBlobLocator, OCIClobLocator, OCIDateTime,
   OCIExtProcContext, OCIInterval, OCIRowid, OCIDate, OCINumber,
   OCIRaw, OCIString, short, signed, sql_context, sql_cursor,
   struct, union, unsigned, utext, uvarchar, varchar, void,
   volatile, a typedef name,
The symbol "enum," was substituted for "tid64_t" to continue.

Error at line 0, column 0 in file test.pc
PCC-F-02102, Fatal error while doing C preprocessing

我感觉应该是64位环境问题,但找不到原因?
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP