• AVR Freaks

Helpful ReplyHot!xc32 std lib link error

Author
pic32cpp
New Member
  • Total Posts : 2
  • Reward points : 0
  • Joined: 2019/08/28 23:33:23
  • Location: 0
  • Status: offline
2019/08/29 18:51:48 (permalink)
0

xc32 std lib link error

Hi there,
 
I have just upgrade from XC32 v2.15 to v.2.20. I now get a linker errors when I compile the following code. Can someone help me fix?
 
Code:
 
#include <string>
int main(void)
{
std::string test = "123";
}
 
Linker error: undefined reference to "typeinfo for std::exception"
 
Please see link.txt attached.
 
Thanks!
 
James

Attachment(s)

Attachments are not available: Download requirements not met
#1
BobbyCannon
New Member
  • Total Posts : 26
  • Reward points : 0
  • Joined: 2019/01/06 16:50:28
  • Location: 0
  • Status: offline
Re: xc32 std lib link error 2019/09/17 07:29:05 (permalink)
0
I'm also experiencing this but when upgrading from 2.1 to 2.3.
#2
billreinhold
Super Member
  • Total Posts : 194
  • Reward points : 0
  • Joined: 2011/02/10 16:35:50
  • Location: Atlanta, GA
  • Status: offline
Re: xc32 std lib link error 2019/09/19 12:17:19 (permalink)
0
Any resolution to this?  I'm having exactly the same issue as the OP.
#3
billreinhold
Super Member
  • Total Posts : 194
  • Reward points : 0
  • Joined: 2011/02/10 16:35:50
  • Location: Atlanta, GA
  • Status: offline
Re: xc32 std lib link error 2019/09/19 13:49:23 (permalink)
+1 (1)
Update -- same problem with 2.30.
 
Here's the error:
build/default/production/_ext/1152627186/rdau.o:(.gnu.linkonce.r._ZTISt9bad_alloc+0x8): undefined reference to `typeinfo for std::exception'
c:/program files (x86)/microchip/xc32/v2.30/bin/bin/../../lib/gcc/pic32mx/4.8.3/../../../../pic32mx/lib/fpu64\libxcpp.a(xthrow.o):(.gnu.linkonce.r._ZTISt11logic_error+0x8): undefined reference to `typeinfo for std::exception'
collect2.exe: error: ld returned 255 exit status

#4
billreinhold
Super Member
  • Total Posts : 194
  • Reward points : 0
  • Joined: 2011/02/10 16:35:50
  • Location: Atlanta, GA
  • Status: offline
Re: xc32 std lib link error 2019/09/20 06:29:25 (permalink)
0
This appears to be related to the C++ standard libraries.  If I remove assignments to std::string and std::vector variables the error goes away.  I'll file a case report.
#5
Luca Pascarella
Starting Member
  • Total Posts : 73
  • Reward points : 0
  • Joined: 2007/05/28 00:53:17
  • Location: The Netherlands
  • Status: offline
Re: xc32 std lib link error 2019/09/20 07:51:26 (permalink)
0
breinhold
Update -- same problem with 2.30.
 
Here's the error:
build/default/production/_ext/1152627186/rdau.o:(.gnu.linkonce.r._ZTISt9bad_alloc+0x8): undefined reference to `typeinfo for std::exception'
c:/program files (x86)/microchip/xc32/v2.30/bin/bin/../../lib/gcc/pic32mx/4.8.3/../../../../pic32mx/lib/fpu64\libxcpp.a(xthrow.o):(.gnu.linkonce.r._ZTISt11logic_error+0x8): undefined reference to `typeinfo for std::exception'
collect2.exe: error: ld returned 255 exit status



Same problem for me upgrading XC32 from v2.15 to 2.30
 

nbproject/Makefile-impl.mk:39: recipe for target '.build-impl' failed
/Applications/microchip/xc32/v2.30/bin/bin/../../lib/gcc/pic32mx/4.8.3/../../../../pic32mx/lib/fpu64/libxcpp.a(iostream.o):(.gnu.linkonce.r._ZTISt9bad_alloc+0x8): undefined reference to `typeinfo for std::exception'
/Applications/microchip/xc32/v2.30/bin/bin/../../lib/gcc/pic32mx/4.8.3/../../../../pic32mx/lib/fpu64/libxcpp.a(iostream.o):(.gnu.linkonce.r._ZTISt13runtime_error+0x8): undefined reference to `typeinfo for std::exception'
/Applications/microchip/xc32/v2.30/bin/bin/../../lib/gcc/pic32mx/4.8.3/../../../../pic32mx/lib/fpu64/libxcpp.a(xthrow.o):(.gnu.linkonce.r._ZTISt11logic_error+0x8): undefined reference to `typeinfo for std::exception'
collect2: error: ld returned 255 exit status
make[2]: *** [dist/pic32mz_ef_sk_freertos/production/pic32mz_ef_sk_freertos.X.production.hex] Error 255
make[1]: *** [.build-conf] Error 2
make: *** [.build-impl] Error 2

#6
billreinhold
Super Member
  • Total Posts : 194
  • Reward points : 0
  • Joined: 2011/02/10 16:35:50
  • Location: Atlanta, GA
  • Status: offline
Re: xc32 std lib link error 2019/09/20 08:33:04 (permalink) ☄ Helpfulby Luca Pascarella 2019/09/20 08:37:36
+2 (2)
I submitted a support case and got an almost immediate reply -- it's a bug, they're aware of it, and they're looking at it.
#7
BobbyCannon
New Member
  • Total Posts : 26
  • Reward points : 0
  • Joined: 2019/01/06 16:50:28
  • Location: 0
  • Status: offline
Re: xc32 std lib link error 2019/09/27 07:02:46 (permalink)
0
It's been the case for multiple releases now? I hope they fix it in the next release...
#8
billreinhold
Super Member
  • Total Posts : 194
  • Reward points : 0
  • Joined: 2011/02/10 16:35:50
  • Location: Atlanta, GA
  • Status: offline
Re: xc32 std lib link error 2019/09/27 07:07:23 (permalink)
0
I received a message from Microchip this morning -- they say it will be fixed in the next release.  They don't have a date for that release yet.
#9
NKurzman
A Guy on the Net
  • Total Posts : 17847
  • Reward points : 0
  • Joined: 2008/01/16 19:33:48
  • Location: 0
  • Status: offline
Re: xc32 std lib link error 2019/09/27 08:36:11 (permalink)
0
The releases are usually done quarterly.
#10
Jump to:
© 2019 APG vNext Commercial Version 4.5