X-Spam-Check-By: sourceware.org Message-ID: <4529BD4F.3070708@cygwin.com> Date: Sun, 08 Oct 2006 23:09:03 -0400 From: "Larry Hall (Cygwin)" Reply-To: cygwin AT cygwin DOT com User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.0.7) Gecko/20060916 Fedora/1.5.0.7-1.fc4.remi Thunderbird/1.5.0.7 Mnenhy/0.7.4.0 MIME-Version: 1.0 To: cygwin AT cygwin DOT com Subject: Re: Problem running cygwin with 3rd party dll References: <2585 DOT 128 DOT 227 DOT 55 DOT 228 DOT 1160361615 DOT squirrel AT webmail DOT kinostudios DOT com> In-Reply-To: <2585.128.227.55.228.1160361615.squirrel@webmail.kinostudios.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com greg AT kinostudios DOT com wrote: > Hi all, > > I am working on a project that requires mixing linux code with windows > code. I have a lot of code that is already written for linux and it > compiles fine under cygwin, but I need to use it under windows so that I > can have access to a MATRIX Vision camera that has drivers only for > windows. > > The CD that came with the camera installed the drivers along with > libraries that allow me to interface with it. The example code runs fine > in Visual Studio. > > In cygwin with gcc, to compile and link against the dll I link against two > .lib files that came with the camera's software using these commands: > > gcc -c -g -mwindows -I./include/ -o ./Build/mvTest.o ./src/blah.c > gcc -o ./bin/mvTest ./Build/mvTest.o $(LIBS) > > Where $(LIBS) is: > LIBS=./lib/mvDeviceManager.lib \ > ./lib/mvDisplay.lib \ > -lpthread > > > The simple test code I have compiles and links against these libs (and > headers) with no problems. But when I run it it crashes, and gdb gives me > this output: > > --------- > $ gdb ./bin/mvTest.exe > GNU gdb 6.3.50_2004-12-28-cvs (cygwin-special) > Copyright 2004 Free Software Foundation, Inc. > GDB is free software, covered by the GNU General Public License, and you are > welcome to change it and/or distribute copies of it under certain conditions. > Type "show copying" to see the conditions. > There is absolutely no warranty for GDB. Type "show warranty" for details. > This GDB was configured as "i686-pc-cygwin"... > (gdb) run > Starting program: > /home/Administrator/CIMAR/Core/Johnson/mvTestProject/bin/mvTest.exe > 0 > > Program received signal SIGSEGV, Segmentation fault. > 0x20012de1 in mvPropHandling!mvCreateAccessToken () > from /cygdrive/c/WINDOWS/system32/mvPropHandling.dll > (gdb) quit > The program is running. Exit anyway? (y or n) y > -------- > > This same code runs fine in Visual Studio. > > Is this problem just something that cygwin can't solve? Or is there > something I could try to get this to work? My cygwin configuration is > attached. > > Any helpful suggestions would be GREATLY appreciated as I'm running out of > time to get this working. Sounds to me like you have a case of: But noticing your environment calls out two other things. You have a pretty old version of Cygwin (1.5.19) in your installation directory (C:/cygwin/bin) and an *ancient* version (1.3.22) in your c:/WinAVR/bin directory. Both are visible in your path. That's a *big no-no*. I suggest removing the ancient version. You should also consider upgrading your older installation at some convenient time in the future. -- Larry Hall http://www.rfk.com RFK Partners, Inc. (508) 893-9779 - RFK Office 216 Dalton Rd. (508) 893-9889 - FAX Holliston, MA 01746 -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/