# UHD compiling under Windows, invalid vector\<T\> error

**URL:** <https://www.ruby-forum.com/t/uhd-compiling-under-windows-invalid-vector-t-error/224624>\
**Category:** GNU Radio\
**Created:** [November 19, 2012, 5:50pm UTC](https://www.ruby-forum.com/t/uhd-compiling-under-windows-invalid-vector-t-error/224624 "2012-11-19T17:50:58Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![aris](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/258eb7/32.png) [@aris](https://www.ruby-forum.com/u/aris)\
**Post date:** [November 19, 2012, 5:50pm UTC](https://www.ruby-forum.com/t/uhd-compiling-under-windows-invalid-vector-t-error/224624/1 "2012-11-19T17:50:58Z")

</div>

Hi,  
This is mostly a UHD questions.

I have taken the source code of UHD and compiled with the CMAKE option  
under Windows 7 using Visual Studio 2010 with Boost 1.51.

Some of the examples (rx\_timed\_samples and tx\_timed\_samples) do not work  
right giving an “/invalid vector subscript/” error when run.

However, when I add the compile option /Zi (Debug Program information,  
Program Database (/Zi)), then they seem to work.

Thanks,  
Seth

_example without /Zi_\*  
\*  
C:\uhd\host\build\examples\Release\>tx\_timed\_samples

Win32; Microsoft Visual C++ version 10.0; Boost\_105100;  
UHD\_003.004.004-255-g4c2  
254b9

Creating the usrp device with: …  
– Opening a USRP2/N-Series device…  
– Current recv frame size: 1472 bytes  
– Current send frame size: 1472 bytes  
– Creating WSA UDP transport for 192.168.10.2:49156  
– Creating WSA UDP transport for 192.168.10.2:49158  
– Creating WSA UDP transport for 192.168.10.2:49157  
– Creating WSA UDP transport for 192.168.10.2:49159  
Error: invalid vector subscript

_example with /Zi_\*  
\*  
C:\uhd\host\build\examples\Release\>tx\_timed\_samples.exe  
Win32; Microsoft Visual C++ version 10.0; Boost\_105100;  
UHD\_003.004.004-255-g4c2  
254b9

Creating the usrp device with: …  
– Opening a USRP2/N-Series device…  
– Current recv frame size: 1472 bytes  
– Current send frame size: 1472 bytes  
– Creating WSA UDP transport for 192.168.10.2:49156  
– Creating WSA UDP transport for 192.168.10.2:49158  
– Creating WSA UDP transport for 192.168.10.2:49157  
– Creating WSA UDP transport for 192.168.10.2:49159  
Using Device: Single USRP:  
Device: USRP2 / N-Series Device  
Mboard 0: N210r4  
RX Channel: 0  
RX DSP: 0  
RX Dboard: A  
RX Subdev: SBXv3 RX  
TX Channel: 0  
TX DSP: 0  
TX Dboard: A  
TX Subdev: SBXv3 TX

Setting TX Rate: 6.250000 Msps…  
Actual TX Rate: 6.250000 Msps…

Setting device timestamp to 0…  
Sent packet: 363 samples  
Sent packet: 363 samples  
Sent packet: 363 samples  
Sent packet: 363 samples  
Sent packet: 363 samples  
Sent packet: 363 samples  
Sent packet: 363 samples  
Sent packet: 363 samples  
Sent packet: 363 samples  
Sent packet: 363 samples  
Sent packet: 363 samples  
Sent packet: 363 samples  
Sent packet: 363 samples  
Sent packet: 363 samples  
Sent packet: 363 samples  
Sent packet: 363 samples  
Sent packet: 363 samples  
Sent packet: 363 samples  
Sent packet: 363 samples  
Sent packet: 363 samples  
Sent packet: 363 samples  
Sent packet: 363 samples  
Sent packet: 363 samples  
Sent packet: 363 samples  
Sent packet: 363 samples  
Sent packet: 363 samples  
Sent packet: 363 samples  
Sent packet: 199 samples

Waiting for async burst ACK… success

Done!

---

<div class="post-metadata">

**Author:** ![Seth\_Hollar](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/3bc359/32.png) [@Seth\_Hollar](https://www.ruby-forum.com/u/Seth_Hollar)\
**Post date:** [November 19, 2012, 6:04pm UTC](https://www.ruby-forum.com/t/uhd-compiling-under-windows-invalid-vector-t-error/224624/2 "2012-11-19T18:04:24Z")

</div>

On 11/19/2012 08:49 AM, Seth Hollar wrote:

> Hi,  
> This is mostly a UHD questions.

[http://lists.ettus.com/mailman/listinfo/usrp-users\_lists.ettus.com](http://lists.ettus.com/mailman/listinfo/usrp-users_lists.ettus.com)

🙂

> I have taken the source code of UHD and compiled with the CMAKE option  
> under Windows 7 using Visual Studio 2010 with Boost 1.51.
> 
> Some of the examples (rx\_timed\_samples and tx\_timed\_samples) do not work  
> right giving an “/invalid vector subscript/” error when run.
> 
> However, when I add the compile option /Zi (Debug Program information,  
> Program Database (/Zi)), then they seem to work.

Sounds like an ABI mismatch. Perhaps you also build the UHD library in  
Debug mode. Make sure that the client app and the library build type  
match.

-josh
