[USRP-users] Compiling own code in Visual Studio 2010, 64bit

Marcus Müller marcus.mueller at ettus.com
Thu Dec 18 12:34:05 EST 2014


Hi Emanuel,

just throwing guesses at you:

- Visual Studio sometimes is awesome. Other times, you can't (or at
least, I can't) mix debug and release binaries. This doesn't manifest as
a linker error, but as a runtime error the first time you call into the
library of the different build type. No hint what goes wrong whatsoever.
- Have you tried executing that executable with the debugger attached?

Greetings,
Marcus


On 12/18/2014 03:19 PM, Emanuel via USRP-users wrote:
>
> Hi all,
>
>  
>
> I read through so many different pages and approaches how to build
> your own code using the UHD API, but I did not manage to run
> everything successfully. Maybe somebody has a hint J
>
> That’s what I have right now:
>
> ·         USRP X310 connected via GigE or PCIe
>
> ·         Installed the lates UHD 64bit release, installed visual
> studio professional 2010
>
> ·         Boost library is installed as binary with the correct Visual
> Studio 2010 64bit Version (as I’m using Win7 64bit)
>
> I tested the uhd_find_device and the uhd_usrp_probe exe-files provided
> in the UHD installation directory: both worked fine and showed correct
> results.
>
>  
>
> I wanted a simple program: Starting with the thread safe uhd main, and
> then simply calling ….multi_usrp::make(“192.168.10.2”); as the USRP is
> currently connected via Ethernet.
>
> I set up Visual Studio as follows:
>
> ·         Starting with an empty Win32 console project and changing
> configuration to X64 (Debug)
>
> ·         In the C++ configuration I add the UHD and Boost include
> directories
>
> ·         In the Linker configuration I add the UHD lib and the Boost
> lib as additional library directories
>
> ·         I also add uhd.lib in the “Additional Dependencies” tab
>
> Everything compiles fine without errors. The Linker also does not
> through any errors. So far so good. Next, I copied the uhd.dll from
> the UHD installation directory (bin folder) to where by generated exe
> lies.
>
> I start my program and when I reach the ::make statement in my C++
> code, I get an access violation. The uhd.dll is found, otherwise my
> program complains about not finding the dll right at startup.
>
>  
>
> Why do I get an access violation? Is it the wrong uhd.dll?
>
>  
>
> Best regards,
>
> Emanuel
>
>  
>
>
>
> _______________________________________________
> USRP-users mailing list
> USRP-users at lists.ettus.com
> http://lists.ettus.com/mailman/listinfo/usrp-users_lists.ettus.com

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ettus.com/pipermail/usrp-users_lists.ettus.com/attachments/20141218/de590e87/attachment-0002.html>


More information about the USRP-users mailing list