From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 31299 invoked by alias); 30 Nov 2011 01:21:25 -0000 Received: (qmail 31291 invoked by uid 22791); 30 Nov 2011 01:21:24 -0000 X-SWARE-Spam-Status: No, hits=-1.8 required=5.0 tests=AWL,BAYES_00,TW_CV X-Spam-Check-By: sourceware.org Received: from bender.grapevine.net.au (HELO bender.grapevine.net.au) (203.129.32.139) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 30 Nov 2011 01:21:07 +0000 Received: from localhost (localhost [127.0.0.1]) by bender.grapevine.net.au (Postfix) with ESMTP id C43E324013C; Wed, 30 Nov 2011 12:21:05 +1100 (EST) Received: from bender.grapevine.net.au ([127.0.0.1]) by localhost (bender.grapevine.net.au [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id eKWiJlL0wCgE; Wed, 30 Nov 2011 12:21:05 +1100 (EST) Received: from [192.168.2.2] (ppp-248.38.129.203.grapevine.net.au [203.129.38.248]) (Authenticated sender: Ross.Johnson@homemail.com.au) by bender.grapevine.net.au (Postfix) with ESMTPA id 74D30240139; Wed, 30 Nov 2011 12:21:05 +1100 (EST) Message-ID: <4ED584BF.70500@homemail.com.au> Date: Wed, 30 Nov 2011 01:21:00 -0000 From: Ross Johnson User-Agent: Mozilla/5.0 (Windows NT 6.0; rv:8.0) Gecko/20111105 Thunderbird/8.0 MIME-Version: 1.0 To: Immanuel Dold CC: pthreads-win32@sourceware.org Subject: Re: compiler error with vs 2008 References: In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes Mailing-List: contact pthreads-win32-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: pthreads-win32-owner@sourceware.org X-SW-Source: 2011/txt/msg00029.txt.bz2 On 30/11/2011 7:53 AM, Immanuel Dold wrote: > Hello everybody. > > I am new to this project but I need help. I am a German student and I am > currently working with PTAM and libcvd. The program I am building works > fine under windows 7 32-bit. The problem is that my tutor for my thesis > works with windows 7 64-bit. You are probably guessing right that on > that machine the program only hangs. I get a 100% processor load but the > program not even gets to the main() function. Until now I used pthread > 2.8.0 and after some research on the net I found out that I have to use > more recent code. Since there is no release I tried to build my own > libraries. You do need to use the latest cvs version for 64 bit builds. > > This is why I looked up for wincvs and checked out the newest code from > the server. I looked into the README file for instructions on how to > build all the .lib and .dll files. Now there is my problem. Using nmake > from Visual Studio 2008 Pro with the parameters "clean VC" and "clean > VSE" works just fine. But libcvd and PTAM rely both on the VCE version > and so I tried "nmake clean VCE" and there I got stuck. The compiler > throws errors (C2264) in "ptw32-MCS_lock.c" in lines 108, 127, 136, 197 > and 215 saying that the it can not cast "volatile size_t *" into > "volatile LONG *". You may find that using the VC build works with your application. The VCE version has problems anyway and is not really recommended. This problem has been reported to me by Daniel Richard G. who has also provided a substantial patch that also includes a large number of other changes not necessarily related to this issue. Unfortunately I just don't have the time now or the [64 bit MSVS] tools to properly incorporate and test complex patch sets or coordinate those who do, considering that this project aims to work with several compilers (e.g. MS and GNU) and their various versions and supported architectures. But I do want to note here that the current code in cvs has been built and well tested on several 64 bit systems and compilers, but presumably not using this specific MSVC++ compiler version. I don't know if this link helps at all with the cast error, i.e. adding the /DNO_STRICT compiler option to the compiler flags in the nmake Makefile: http://msdn.microsoft.com/en-us/library/aa383679%28v=vs.85%29.aspx Regards. Ross