Subject: VirtualProtect problem when rebuilding tool chain
From: [email-masked] ("Boatwright, Charles")

7 Mar 1997 18:33:10 -0800
Approved: [email-masked]
Distribution: cygnus
Message-ID: <c=US%a=_%p=Canon_Informatio%l=[email-masked]>
Mime-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Original-To: "[email-masked]'" <[email-masked]>
X-Mailer: Microsoft Exchange Server Internet Mail Connector Version 4.0.994.63
Original-Sender: [email-masked]

*** This is a repost with more complete information.

Hey people,

I am aware that this problem may have been beaten to 
death in recent weeks, however I have not been on the list long,
and there is no reference in the archives.

Under b17.1, I am getting a strange error when compiling.

I am attempting to rebuild the tool chain, such that ld can 
read and write a.out  i.e.  

.../wip/configure --enable-targets=i386-unknown-aout,i386-unknown-pe
--program-suffix=.exe --prefix=/usr -v > configure.log 2>&1
make 

gcc -O2 -DVERSION='"cygnus-2.7.1"' -I. -I. -I../bfd -I./../bfd
-I./../include  -g -O -c ./version.c
gcc -O2  -g -O  -o size size.o -Lcygwin bucomm.o version.o filemode.o
-L../bfd -lbfd ../libiberty/libiberty.a  
c:\usr\lib\gcc-lib\i386-cygwin32/cygnus-2.7.2-961023/libgcc.a(_trampolin
e.o): In function `mprotect':
/pizza/mushroom/noer/beta17/src/gcc/libgcc2.c(.text+0x67): undefined
reference to `VirtualProtect'
make: *** [size] Error 1

(note: I added the -Lcygwin)

VirtualProtect is exported from kernel32.lib, and it is used 
for changing access protection for pages. (inside function mprotect)

I have verified that I can compile and link proprerly, i.e.  hello.c 
and some other console type apps, therefor the tool chain is working
(somewhat)

any clues what is going on?

Sorry if this is a "beaten" issue, but for my efforts it is not dead.

-chuck boatwright

-
For help on using this list, send a message to
"[email-masked]" with one line of text: "help".