You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@qpid.apache.org by Davide <da...@gmail.com> on 2019/03/12 16:14:19 UTC

Proton C++ library not working on Visual Studio new project.

Hello,

I've been trying to have the Proton C++ library working, to no avail, and
(after 3 days) I have no clue where the problem might be.

My configuration:

	- Qpid proton 0.27.0 
        - Windows 10 1703
	- Visual studio 2017 version 15.9.8
	- Swig 3.0.12
	- Cmake 3.13.4
	- Python 2.7.16

I go into the downloaded package directory, create a "build" directory,
navigate into it and launch:

 cmake .. -G "Visual Studio 15 2017" -DSWIG_EXECUTABLE="C:\Program
Files\swigwin-3.0.12\swig.exe"

Then, I load the ALL_BUILD solution in Visual Studio, select the
RelWithDebInfo configuration, x86, and build the solution.
I also build specifically the INSTALL project, which copies the proper
header, lib and dll files in a Proton directory, within Program Files (x86).

I create a new console project in Visual Studio, and replicate the
HelloWorld example code. I add the additional include directories,
additional dependencies and additional library directories for Proton in the
project's settings, along with a post-build step to copy the proton dlls in
the output directory.

The project compiles successfully, but when I run it I get an exception when
calling connect(conn_url_); on the container in the on_container_start
callback. The error message says: Vector<T> too long. Debugging the
application, I find that the conn_url_ I pass is correct, but as I step into
the connect function, the string becomes unintelligible, with a length set
in millions of characters. Could it be a different encoding?
Null-termination? Different C++ versions?

The corresponding example doesn't have this problem.

What am I doing wrong?




--
Sent from: http://qpid.2158936.n2.nabble.com/Apache-Qpid-users-f2158936.html

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@qpid.apache.org
For additional commands, e-mail: users-help@qpid.apache.org


Re: Proton C++ library not working on Visual Studio new project.

Posted by Robbie Gemmell <ro...@gmail.com>.
Thanks for letting folks know you got things working and how.

Robbie

On Fri, 15 Mar 2019 at 08:28, Davide <da...@gmail.com> wrote:
>
> It turned out that a very important step in integrating the Proton library in
> a VS project is to make sure both are compiled with the same runtime
> library, which can be set from the *Project Properties *-> *C/C++* -> *Code
> Generation *-> *Runtime Library*.
>
>
>
> --
> Sent from: http://qpid.2158936.n2.nabble.com/Apache-Qpid-users-f2158936.html
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@qpid.apache.org
> For additional commands, e-mail: users-help@qpid.apache.org
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@qpid.apache.org
For additional commands, e-mail: users-help@qpid.apache.org


Re: Proton C++ library not working on Visual Studio new project.

Posted by Davide <da...@gmail.com>.
It turned out that a very important step in integrating the Proton library in
a VS project is to make sure both are compiled with the same runtime
library, which can be set from the *Project Properties *-> *C/C++* -> *Code
Generation *-> *Runtime Library*. 



--
Sent from: http://qpid.2158936.n2.nabble.com/Apache-Qpid-users-f2158936.html

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@qpid.apache.org
For additional commands, e-mail: users-help@qpid.apache.org