This is the mail archive of the
mailing list for the Cygwin project.
Re: undefined refernce symbol __chkstk
- From: Reini Urban <rurban at x-ray dot at>
- To: cygwin at cygwin dot com
- Date: Tue, 05 Feb 2008 21:15:53 +0100
- Subject: Re: undefined refernce symbol __chkstk
- References: <firstname.lastname@example.org>
Anik Pal schrieb:
I got the linking error message "undefined reference symbol __chkstk". When
I try to link my source code with a MSVC compiled library. From the
following url I got a workaround to remove this problem is to copy
CHKSTK.OBJ from MSVC library and rename it to chkstk.o and link with it.
But that option remove this error message and create the executable, But
when run the executable it doesn't give anything just abort, no error
I'm also linking my code with cygwin/lib/mingw/libmsvcrt.a
Now I suspect that wither CHKSTK.OBJ MSVC object file or mingw libmsvcrt.a
library or both is causing this problem. But I'm not sure How to replace
them with equivalent lib if I want to remove dependency from Mingc and MSVC
If your goal is to remove the dependency from Mingw and MSVC, so why are
still trying to link against MSVC libs with ggc and MSVC specific
__chkstk is a MSVC-specific stack checker compiled into each debugging
Get rid of your MSVC build script with cygwin, and use the cygwin
equivalent of the solaris environment. Esp. get cygwin or mingw libs.
That's your work to do. Or use MSVC.
The day you got your cygwin application to compile against those
MSVC libs will not be the end of your problems.
> -LF:/geolog6.6.1/lib -lcgg -lgeolog6 -llicence -llogs_dll -lPGILc_dll
> -lPGILcTool_dll -lcgs -llmgr9a -LD:/cygwin/lib -lcygwin
> -LD:/cygwin/lib/mingw -lmsvcrt -Bstatic -LD:/cygwin/lib -lm
>undefined reference to `?instance@OrbInit@@SAPAV1@HPBDH@Z'
So you link against a MSVC C++ library with gcc? Corba?
Maybe possible with a lot of work. But most likely not.
E.g. besides the different C++ name mangling, your lib is linked against
the microsoft c runtime, on cygwin you use the cygwin c runtime.
Both together will not work. The C++ members allocate new memory with
the msvcrt malloc(), which cannot be free'd from any cygwin function.
And vice versa.
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Problem reports: http://cygwin.com/problems.html