public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
From: "Max Hadley" <max@susato.demon.co.uk>
To: "Cygwin mailing list" <gnu-win32@cygnus.com>
Subject: How do I avoid buying MSVC++?
Date: Wed, 23 Dec 1998 20:10:00 -0000	[thread overview]
Message-ID: <00de01be2eb5$f3921cf0$016464c0@susato.demon.co.uk> (raw)

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
"gnu-win32-request@cygnus.com" with one line of text: "help".

             reply	other threads:[~1998-12-23 20:10 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1998-12-23 20:10 Max Hadley [this message]
1998-12-24  7:49 ` Dan Haynes
1998-12-27 20:01 ` Fergus Henderson
1998-12-31 16:45 Max Hadley
1999-01-31 23:52 Max Hadley
1999-01-31 23:52 ` Mumit Khan
1999-01-31 23:52 Max Hadley
1999-01-31 23:52 ` Mumit Khan

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='00de01be2eb5$f3921cf0$016464c0@susato.demon.co.uk' \
    --to=max@susato.demon.co.uk \
    --cc=gnu-win32@cygnus.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).