From: max AT susato DOT demon DOT co DOT uk (Max Hadley) Subject: How do I avoid buying MSVC++? 23 Dec 1998 22:20:53 -0800 Message-ID: <00de01be2eb5$f3921cf0$016464c0.cygnus.gnu-win32@susato.demon.co.uk> Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit To: "Cygwin mailing list" 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 AT 8' //E/Users/max/progs/WAVstuff/temp/ntcdemo.c:90: undefined reference to `GetStockObject AT 4' //E/Users/max/progs/WAVstuff/temp/ntcdemo.c:93: undefined reference to `RegisterClassA AT 4' //E/Users/max/progs/WAVstuff/temp/ntcdemo.c:97: undefined reference to `GetSystemMetrics AT 4' .... .... ntcdemo.o: In function `MainMessageHandler': //E/Users/max/progs/WAVstuff/temp/ntcdemo.c:166: undefined reference to `GetDC AT 4' //E/Users/max/progs/WAVstuff/temp/ntcdemo.c:167: undefined reference to `GetStockObject AT 4' //E/Users/max/progs/WAVstuff/temp/ntcdemo.c:168: undefined reference to `SelectObject AT 8' //E/Users/max/progs/WAVstuff/temp/ntcdemo.c:169: undefined reference to `GetTextMetricsA AT 8' .... .... //E/Users/max/progs/WAVstuff/temp/ntcdemo.c:246: undefined reference to `DefWindowProcA AT 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 "gnu-win32-request AT cygnus DOT com" with one line of text: "help".