From activemq-users-return-4495-apmail-geronimo-activemq-users-archive=geronimo.apache.org@geronimo.apache.org Wed Sep 13 08:40:14 2006 Return-Path: Delivered-To: apmail-geronimo-activemq-users-archive@www.apache.org Received: (qmail 54689 invoked from network); 13 Sep 2006 08:40:13 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 13 Sep 2006 08:40:13 -0000 Received: (qmail 6140 invoked by uid 500); 13 Sep 2006 08:40:11 -0000 Delivered-To: apmail-geronimo-activemq-users-archive@geronimo.apache.org Received: (qmail 6121 invoked by uid 500); 13 Sep 2006 08:40:11 -0000 Mailing-List: contact activemq-users-help@geronimo.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: activemq-users@geronimo.apache.org Delivered-To: mailing list activemq-users@geronimo.apache.org Received: (qmail 6112 invoked by uid 99); 13 Sep 2006 08:40:11 -0000 Received: from idunn.apache.osuosl.org (HELO idunn.apache.osuosl.org) (140.211.166.84) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 13 Sep 2006 01:40:11 -0700 Authentication-Results: idunn.apache.osuosl.org smtp.mail=lists@nabble.com; spf=pass X-ASF-Spam-Status: No, hits=0.0 required=5.0 tests= Received-SPF: pass (idunn.apache.osuosl.org: domain nabble.com designates 72.21.53.35 as permitted sender) Received: from ([72.21.53.35:48802] helo=talk.nabble.com) by idunn.apache.osuosl.org (ecelerity 2.1 r(10620)) with ESMTP id D6/D0-08607-8F3C7054 for ; Wed, 13 Sep 2006 01:40:24 -0700 Received: from [72.21.53.38] (helo=jubjub.nabble.com) by talk.nabble.com with esmtp (Exim 4.50) id 1GNQHt-0002nQ-Tq for activemq-users@geronimo.apache.org; Wed, 13 Sep 2006 01:40:05 -0700 Message-ID: <6281323.post@talk.nabble.com> Date: Wed, 13 Sep 2006 01:40:05 -0700 (PDT) From: # Lalit Nagpal # To: activemq-users@geronimo.apache.org Subject: Re: status -1 when establishing socket connection - SocketException In-Reply-To: <6262598.post@talk.nabble.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Nabble-From: lalittechy@gmail.com References: <6262598.post@talk.nabble.com> X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N 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. Make sure that the following are done 1. In win32-msvc folder file pom.xml , put the following tag in appropriate place true 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 debug instead of the release 2. In the tag add a switch /GR (note both are upper case) - 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.