gcc 3.4.4-x (WinXP Win2K) failure to link for 'new'

Arthur Schwarz aschwarz1309@verizon.net
Tue Dec 19 15:53:00 GMT 2006


I just downloaded gcc-3.4.4-03 on my WinXP and have the previous version of
gcc-3.4.4 on my Win2K computer. In both machines the following code fails to
link. The error message indicates that 'new(unsigned int)' could not be found
which I suppose means that 'new int' is translated into 'new((unsigned
int)sizeof(int))'. <br><br>Since I haven't seen another posting on this message
I assume that there's something wrong with my installation or installation
procedures. I usually execute an 'install from internet' so the problem must be
local. Any direction would be a great help.<br><br>art<br><br><span
style="font-family: courier;">int main(void)</span><br style="font-family:
courier;"><span style="font-family: courier;">{</span><br style="font-family:
courier;"><span style="font-family: courier;">  int * p;</span><br
style="font-family: courier;"><span style="font-family: courier;">  int *
q = new int;</span><br style="font-family: courier;"><br style="font-family:
courier;"><span style="font-family: courier;">  p = new int;</span><br
style="font-family: courier;"><br style="font-family: courier;"><span
style="font-family: courier;">  return 3;</span><br style="font-family:
courier;"><span style="font-family: courier;">    </span><br
style="font-family: courier;"><span style="font-family: courier;">}</span><br
style="font-family: courier;"><br style="font-family: courier;"><br
style="font-family: courier;"><span style="font-family:
courier;">/c/DOCUME~1/ra07220/LOCALS~1/Temp/ccAgrALS.o:main.c++:(.text+0x32):
undefined reference to `operator new(unsigned int)'</span><br
style="font-family: courier;"><span style="font-family:
courier;">/c/DOCUME~1/ra07220/LOCALS~1/Temp/ccAgrALS.o:main.c++:(.text+0x41):
undefined reference to `operator new(unsigned int)'</span><br
style="font-family: courier;"><span style="font-family: courier;">collect2: ld
returned 1 exit status</span><br style="font-family: courier;"><span
style="font-family: courier;">>> gcc --version</span><br
style="font-family: courier;"><span style="font-family: courier;">gcc (GCC)
3.4.4 (cygming special, gdc 0.12, using dmd 0.125)</span><br
style="font-family: courier;"><span style="font-family: courier;">Copyright (C)
2004 Free Software Foundation, Inc.</span><br style="font-family:
courier;"><span style="font-family: courier;">This is free software; see the
source for copying conditions.  There is NO</span><br style="font-family:
courier;"><span style="font-family: courier;">warranty; not even for
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.</span><br
style="font-family: courier;"><br style="font-family: courier;"><span
style="font-family: courier;">>> cygcheck -s -v -r >
cygcheck.out</span><br style="font-family: courier;"><br>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: WinXP_cygcheck.out
Type: application/octet-stream
Size: 84910 bytes
Desc: 2444029899-WinXP_cygcheck.out
URL: <http://cygwin.com/pipermail/cygwin/attachments/20061219/74bb21ea/attachment.obj>
-------------- next part --------------
--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/


More information about the Cygwin mailing list