Thank you Andrew, you're very helpful. I should have replied-to-self; I did get past this, and yes that's what was going on, in short. Compiling Proton as Debug permitted Debugging in VS. I was able to get everything working ... I noticed that the auto-generating vcxproj files are created with /MDd by default. I'm considering creating a PR to include build-time switches so someone can specify which type of MT support the compiled library should be; we were trying to create a static lib and /MT would be ideal for our needs. Any thoughts on that?
On Fri, Aug 26, 2022 at 10:38 AM Andrew Stitcher <astitc...@redhat.com> wrote: > You don't say where you are getting the proton cpp library but I'm assuming > you're building it yourself. Are you building and using debug versions of > the proton libraries? > > I'm not sure how familiar you are with Windows development, so sorry if you > already know this, but the Windows Visual studio environment uses different > libraries for debug and release so for debug build you need to use debug > libraries. Usually the debug libraries have a 'd' suffix to the name. > > One point that may be confusing is that the default build type is > 'RelWithDebInfo'. This is a Release build but also has debug information so > that you can debug the release build to some extent, however it is not > compatible with a Debug build of an application. > > HTH > > Andrew > > On Thu, Aug 18, 2022 at 11:40 PM Zaq Rizer <idhindsi...@gmail.com> wrote: > > > Perhaps I'm missing something very obvious ... we have an existing C++ > > application that I'd like to integrate QPID Proton CPP into (it will be > > both Windows and Linux). On Windows, I imported the qpid-proton-cpp.lib > and > > compilation is all fine and linked fine. > > > > To make things simple, I basically just copied examples/simple_send.cpp > > into a little console app as the main. > > > > During runtime, but only using the Debug configuration, I get strange > > errors such as "string too long" or "std::bad_alloc at memory location > > ...". Running the Release configuration is just fine. > > > > Any ideas? Eventually I would like to make this available as a dll where > > our partners in other divisions can use the Debugger for their own > > applications so "Just use Release" isn't really a viable option. This is > > using version 0.37 of the cpp lib (latest). > > > > Thanks, > > Zaq > > >