我按照你的方法也生成一个.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;
}