This is the mail archive of the cygwin mailing list for the Cygwin project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Problem running cygwin with 3rd party dll 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

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 \

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:

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

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 RFK Partners, Inc. (508) 893-9779 - RFK Office 216 Dalton Rd. (508) 893-9889 - FAX Holliston, MA 01746

Unsubscribe info:
Problem reports:

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]