首页 Soft PlugIn RAN乱 Dev开发 Info资料 English WAP 留言 登陆 注册
-
Posted by Yippee | 评论(0) | 引用(0) | 阅读2350次
MAGIC C++ PRO*C编程失败的尝试3

我按照你的方法也生成一个.A文件,可是还是没有办法链接上。应该怎么设置??谢谢!! 但是无论我怎么设置 LINK,如果在 OBJECT/LIBARY MODUALES输入 orasql9.a,结果总是变成 ,orasql9.a

回答:echo EXPORTS > orasql9.def
nm orasql9.lib | grep ' T _' | sed 's/.* T _//' >> orasql9.def

dlltool --def orasql9.def --dllname orasql9.dll --output-lib orasql9.a

然后修改makefile 文件
在编译的目标文件后面加上静态库orasql9.a

于是我:修改 $(OUTPUT):$(OBJS) $(APPENDLIB)
 $(LINK) $(LINKOPTION) $(LIBDIRS)   $(OBJS) $(APPENDLIB) M:\dll-o\ORASQL9.a

结果:     6 [main] ? 5904 cygheap_fixup_in_child: Couldn't reserve 9891544 bytes of
pace for cygwin's heap (0x61800000 <0xA40000>) in child, Win32 error 487
:\testcom\testoo\testoo.exe (5904): *** m.AllocationBase 0x0, m.BaseAddress 0x6
800000, m.RegionSize 0x20000, m.State 0x10000

$ uname -a
CYGWIN_NT-5.1 sf 1.5.13(0.122/4/2) 2005-03-01 11:01 i686 unknown unknown Cygwin

GOOGLE和BAIDU了半天,找到一大堆问这个问题的,可是没有找到一个有效的解决方法,有人建议用 ls $ROOTSYS/bin/*.exe $ROOTSYS/lib/*.dll | rebaseall -T - 结果是

$ ls $ROOTSYS/bin/*.exe $ROOTSYS/lib/*.dll | rebaseall -T -
ls: /lib/*.dll: No such file or directory

zcat: /etc/setup/ocaml.lst.gz: unexpected end of file

有个人和我一样:From: alienn at rocketmail dot com (Alienn)
Date: 7 May 2003 07:44:13 -0700
Newsgroups: gnu.gcc
Subject: gcc and oracle Pro*C on NT - Couldn't reserve space for cygwin's heap

Hello all,

I'm trying to write a Pro*C program using cygwin gcc and Oracle for NT
Precompiler
So far I could make it to the exe file converting the oracle DLL
(ORASQL8.DLL) that comes for VC compiler into the
lib file (orasql8.a using impdef and dlltool to create the lib) but
when I run the executable I get the following error:

19 [unknown (0x724)] ? 308 cygheap_fixup_in_child: Couldn't
reserve space for cygwin's heap (0x615F0000 <0x1240000>) in child,
Win32 error 487
h:\src\dgn_connect.exe: *** m.AllocationBase 0x0, m.BaseAddress
0x615F0000, m.RegionSize 0x110000, m.State 0x10000

I tried to "rebaseall" cygwin dlls as suggested on one of the posts on
google but with no luck

below is the pc source:

Please help

Paul

#include
#include
EXEC SQL BEGIN DECLARE SECTION;
#include
#define UNAME_LEN 20
#define PWD_LEN 40
#define SID_LEN 20

VARCHAR username[UNAME_LEN];
VARCHAR password[PWD_LEN];
VARCHAR sid[SID_LEN];
EXEC SQL END DECLARE SECTION;

void main()
{
printf("hello\n");
/* Connect to ORACLE.*/
EXEC SQL CONNECT :username IDENTIFIED BY :password USING :sid;
}


字体:

Permanant URI永久地址 http://www.shengfang.org/blog/p/magiccprocerr3.php
Trackback URI引用地址 http://www.shengfang.org/blog/tb.php?tb_id=1120119366

2005年6月30日16:16星期四  [Dev开发] 追踪此文的RSS
提示:
此文还没有评论。

称呼:    登陆   注册
   不注册,但记住我的信息
邮件:
(非必须)
评论: [UBB代码帮助]
粗体 斜体 下划线 链接 水平线 引用



验证码: 请输入你看见的数字
关闭UBB      提交时自动将内容复制到剪贴板

公告





统计信息
[Yippee]||[统计]||日志:2143
在线: 9||用户: 2635 [列表]
今日:771||到访:3654556
Rss:||评论:1668

最新日志

最新评论

友情链接

日历
342009 - 0734
   1234
567891011
12131415161718
19202122232425
262728293031 

最新引用
搜索

归档

杂项
Get RSS Feed (Version 2.0)
Get Atom Feed (Version 0.3)
编码:  UTF-8