activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Bish, Tim" <Tim.B...@Sensis.com>
Subject RE: status -1 when establishing socket connection - SocketException
Date Wed, 13 Sep 2006 11:12:53 GMT
> 
> 
> Here are my findings for people new to C++ and trying to compile
activemq-
> cpp
> with vs .net 2003. If you are using maven for building the library
here
> are
> some inputs for you. I found out all this a very hard way and dont
want
> the
> other new comers to go the same way.

Nice work.  Probably the most helpful thing would be for you to create a
VC 2003 pom.xml in another folder like the one's that are already there.
Since I don't have access to VC 2003 I can't really tell what works and
what doesn't.  If you create an issue and attach a pom.xml for VC 2003 I
can get it into the SVN repo.

> 
> Make sure that the following are done
> 
> 1. In win32-msvc folder file pom.xml , put the following tag in
> appropriate
> place
>         <activeByDefault>true</activeByDefault>
> Since I have my project properties setting "Code generation" as
> "Multi-threaded Debug DLL (/MDd)".
> I should also compile the activemq-cpp library also in the appropriate
way
> so i kept this tag under the
>     <profile>debug
> instead of the <profile>release
> 
> 2. In the <compiler.options> tag add a switch /GR (note both are upper
> case)

Ah yes, forgot about that little bit of goodness from the older MSVC
products.

> - this would enable RTTI ...
> Do this setting for both release and debug just to be in sync.
> if you dont put this on you run into the error rtti_object not found
....
> 
> 3. All the linking errors that come to you during compile with maven
(mvn
> -e
> package command run under the win32-msvc directory)
> Will be gone if the above approach is followed.
> 
> It basically is a miss - match if we dont keep the project settings of
vs
> .net 2003 and the pom.xml compiler options in sync
> and can give really wierd results.
> 
> Hope that would help the newcomers like me to avoid any wastage of
time.
> 
> Regards
> 
> Lalit Nagpal
> 
> 
> # Lalit Nagpal # wrote:
> >
> >     // Attempt the connection to the server.
> >     status = ::connect( socketHandle,
> >                         ( const sockaddr * )&target_addr,
> >                         sizeof( target_addr ) );
> >
> > 	cout << "stat ... is " << status << endl;
> >     if( status < 0 ){
> >         close();
> >         throw SocketException( __FILE__, __LINE__,
> >             "Socket::connect - %s", ::strerror( errno ) );
> >     }
> >
> > This piece of code in tcpsocket.cpp throws a socket exception when
> trying
> > to run the activemq cpp client with vs .net 2003 ...
> > OS is Win XP. Any hints would be really helpful. What could b the
> possible
> > reasons of the socketexception.
> >
> > Thanks in advance
> >
> >
> 
> --
> View this message in context: http://www.nabble.com/status--1-when-
>
establishing-socket-connection---SocketException-tf2257720.html#a6281323
> Sent from the ActiveMQ - User forum at Nabble.com.


Mime
View raw message