Cygwin newbie, first try

Schaible, Joerg
Tue May 4 08:26:00 GMT 1999


our development environment contains several applications and DLL's build
with several compilers under Windows and OS/2. I wanna port this environment
for a version with cygwin / mingw32 i.e. I don't wanna use the cygwin.dll,
but the crtdll.dll or msvcrt.dll. To build the system we use a huge number
of makefiles with individual settings for each compiler package. For
compilation I use c++ for C++ files and gcc for C files. For linkage I use
ld. I've installed the cygwin package and the mingw32 available from Mumit
Khan's home page.

Currently I try to build one of our little command line tools.

All the C++ files were compiled using the following options:
c++ -D_CONSOLE -c -fno-for-scope -frepo -mpentium -D_GwOS_WIN -D_GwGUI_WIN
-DWIN32 -D_WIN32 -D__WIN32__ -W -Wreturn-type -Wunused -Wwrite-strings
-Wconversion -Wmissing-prototypes -Woverloaded-virtual -DWINNT -DSTANDALONE
-I../../core/win -I../../dde -I../../media -I../../meta -I../../base
-I../../core -I../../device -I../../gm -I../../help -I../../40ctl
-I../../cua -I../../chart -I../../dynobj -I../../license -I../../inter
-I../../comm -I../../gwproc -I../../textedit
-I//c/egcs-1-1-2/i386-mingw32/include -x c++ -DNDEBUG
-o../../egcs112/rel/depend/st/main.o  main.cxx

The ld was invoked by the following line:
ld -Lc:/egcs-1-1-2/i386-mingw32/lib\\  -S
..\\..\\egcs112\\rel\\depend\\st\\pr.o -o ..\\..\\egcs112\\bin\\depend.exe
-Map ..\\..\\egcs112\\bin\\ -lmingw32 -lcrtdll -lmoldname

But I have unresolved externals:
ld: warning: cannot find entry symbol _mainCRTStartup; defaulting to
..\..\egcs112\rel\depend\st\include.o(.text+0x53d) undefined
reference to `_alloca'
..\..\egcs112\rel\depend\st\main.o(.text+0x1352) undefined
reference to `__builtin_vec_new'
..\..\egcs112\rel\depend\st\main.o(.text+0x1a81) undefined
reference to `__builtin_vec_delete'

Interesting that my source is not using alloca anywhere (checked with the
preprocessor output) and the missing operator new[] and delete[] seem to
identify some basic configuration problem. Any idea how to the ld where to
find the missing symbols?

The environment:

The mounts:
Device           Directory           Type        Flags
C:\PROGRA~1\cygnus\CYGWIN~1 /usr/local          native      text!=binary
C:\TEMP          /tmp                native      text!=binary
C:\PROGRA~1\cygnus\CYGWIN~1\etc /etc                native      text!=binary
C:\PROGRA~1\cygnus\CYGWIN~1\H-I586~1\bin /bin                native
C:               /                   native      text!=binary

Want to unsubscribe from this list?
Send a message to

More information about the Cygwin mailing list