Problem running cygwin with 3rd party dll
Larry Hall (Cygwin)
reply-to-list-only-lh@cygwin.com
Mon Oct 9 03:09:00 GMT 2006
greg@kinostudios.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:
<http://cygwin.com/faq/faq-nochunks.html#faq.programming.msvcrt-and-cygwin>
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/
More information about the Cygwin
mailing list