Subject: How do I avoid buying MSVC++?
From: [email-masked] (Max Hadley)

23 Dec 1998 22:20:53 -0800
Message-ID: <[email-masked]>
Mime-Version: 1.0
Content-Type: text/plain;
	charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
To: "Cygwin mailing list" <[email-masked]>

Dear Cygwin list,

After much messing around, involving a complete new second installation
of Windows NT, I *think* I have got b20.1 installed. Cygnus, it's only
*your* Installshield installer that fails every time on my original NT.
It would be nice if there was a text file or SOMETHING that spells out
exactly what the installer does in the registry & environment, as I had
to spelunk it out of one registry & edit it into the other. Not
pleasant.

I can build a 'hello world' console application happily.

Now I need to build win32 API code, supplied by a third party, to drive
a PCI card in the PC. Here is my makefile (I'm using MKS make, not GNU):

HEADERS := windecl.h
SOURCES :=  ntcdemo.c
OBJECTS := $(SOURCES:db:+"$(O)")
LIBRARIES := ntgpib.lib

CFLAGS += -g -pedantic -Wall -mwindows

ntcdemo.exe : $(OBJECTS) $(LIBRARIES)

..PRECIOUS $(OBJECTS) : $(HEADERS)

BTW my default value of CFLAGS is null. This generates a bunch of lines
like this (ellipses mark deletions):

susato[230] $ make
gcc  -o ntcdemo.exe ntcdemo.o ntgpib.lib
//E/cygwin/cygwin-b20/H-i586-cygwin32/i586-cygwin32/bin/ld:
ntgpib.lib(NTGPIB.dll): warning: ignoring duplicate section `.text'
//E/cygwin/cygwin-b20/H-i586-cygwin32/i586-cygwin32/bin/ld:
ntgpib.lib(NTGPIB.dll): warning: ignoring duplicate section `.idata$5'
....
....
ntcdemo.o: In function `WinMain':
//E/Users/max/progs/WAVstuff/temp/ntcdemo.c:89: undefined reference to
`LoadCursorA@8'
//E/Users/max/progs/WAVstuff/temp/ntcdemo.c:90: undefined reference to
`GetStockObject@4'
//E/Users/max/progs/WAVstuff/temp/ntcdemo.c:93: undefined reference to
`RegisterClassA@4'
//E/Users/max/progs/WAVstuff/temp/ntcdemo.c:97: undefined reference to
`GetSystemMetrics@4'
....
....
ntcdemo.o: In function `MainMessageHandler':
//E/Users/max/progs/WAVstuff/temp/ntcdemo.c:166: undefined reference to
`GetDC@4'
//E/Users/max/progs/WAVstuff/temp/ntcdemo.c:167: undefined reference to
`GetStockObject@4'
//E/Users/max/progs/WAVstuff/temp/ntcdemo.c:168: undefined reference to
`SelectObject@8'
//E/Users/max/progs/WAVstuff/temp/ntcdemo.c:169: undefined reference to
`GetTextMetricsA@8'
....
....
//E/Users/max/progs/WAVstuff/temp/ntcdemo.c:246: undefined reference to
`DefWindowProcA@16'
collect2: ld returned 1 exit status
make: Error code 1
susato[231] $

So what is going wrong? I assume some windows libraries are not getting
linked, but how do I find out which? Why all the duplicate sections
warnings from the board vendor's library?

Assuming this code works with MSVC++ (& I have no reason to assume it
doesn't) is it possible to make it work with CYGWIN? Or do I have to get
MSVC++ to use this card I have just bought.

Thanks in advance, and Merry Christmas

Max Hadley

-
For help on using this list (especially unsubscribing), send a message to
"[email-masked]" with one line of text: "help".