public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* Psapi.dll/lib problem
@ 2000-08-08  7:13 Addison, Darrick
  0 siblings, 0 replies; 3+ messages in thread
From: Addison, Darrick @ 2000-08-08  7:13 UTC (permalink / raw)
  To: 'cygwin@sourceware.cygnus.com'

Hi,

I recently downloaded cygwin and installed it on a Win NT 4.0 workstation
I'm currently in the process of porting a Linux application to the Windows
NT platform. The Linux code seems to compile and link with only a few
changes
to the source however when I try to make a few Win API calls from the ported
code I experience the problems listed below.

1.) The code compiles okay but when I attempt to link I receive the
     following error messages using the below makefile:

# Makefile to build pinf program
# --- macros

CC = gcc
CFLAGS=	-I /usr/local/include -g 
OBJECTS=pinf.o hash.o path.o argenv.o 
LIBS = -L/usr/local/lib/psapi.a  

# --- targets
all:	pinf
	@echo "Successufully compiled!"

pinf:	$(OBJECTS)
	$(CC) -o pinf $(OBJECTS) $(LIBS)

pinf.o:	/usr/local/include/psapi.h 
	$(CC) $(CFLAGS) -c pinf.c hash.c argenv.c path.c

hash.o: /usr/local/include/hash.h /usr/local/include/stdtypes.h
	$(CC) $(CFLAGS) -c hash.c

path.o: /usr/local/include/ptlist.h /usr/local/include/path.h
	$(CC) $(CFLAGS) -c path.c

argenv.o: /usr/local/include/argenv.h /usr/local/include/ptlist.h
	$(CC) $(CFLAGS) -c argenv.c
 
# --- remove binary and executable files
clean:
	rm -f pinf $(OBJECTS)

Linking Error message:
make
gcc -I /usr/local/include -g -c pinf.c hash.c argenv.c path.c
gcc -o pinf pinf.o hash.o path.o argenv.o -L/usr/local/lib/psapi.a
pinf.o: In function 'main':
/cygdrive/c/backup/pinf.c:135 undefined reference to 'EnumProcesses'
pinf.o: In function 'PrintProcessNameAndID':
/cygdrive/c/backup/pinf.c:467: undefined reference to 'EnumProcessModules'
/cygdrive/c/backup/pinf.c:470: undefined reference to 'GetModuleBaseName@16'
/cygdrive/c/backup/pinf.c:472: undefined reference to
'GetModuleFileNameExA@16'
collect2: ld returned 1 exit status
make: *** [pinf] Error 1

Any suggestions,
Darrick



--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Psapi.dll/lib problem
@ 2000-08-08  6:24 Addison, Darrick
  0 siblings, 0 replies; 3+ messages in thread
From: Addison, Darrick @ 2000-08-08  6:24 UTC (permalink / raw)
  To: 'vinschen@cygnus.com'; +Cc: 'cygwin@sources.redhat.com'

Hi,

I recently downloaded cygwin and installed it on a Win NT 4.0 workstation
I'm currently in the process of porting a Linux application to the Windows
NT platform. The Linux code seems to compile and link with only a few
changes to the source however when I try to make a few Win API calls 
from the ported code I experience the problems listed below.

1.) The code compiles okay but when I attempt to link I receive the
     following error messages using the below makefile:

# Makefile to build pinf program
# --- macros

CC = gcc
CFLAGS=	-I /usr/local/include -g 
OBJECTS=pinf.o hash.o path.o argenv.o 
LIBS = -L/usr/local/lib/psapi.a  

# --- targets
all:	pinf
	@echo "Successufully compiled!"

pinf:	$(OBJECTS)
	$(CC) -o pinf $(OBJECTS) $(LIBS)

pinf.o:	/usr/local/include/psapi.h 
	$(CC) $(CFLAGS) -c pinf.c hash.c argenv.c path.c

hash.o: /usr/local/include/hash.h /usr/local/include/stdtypes.h
	$(CC) $(CFLAGS) -c hash.c

path.o: /usr/local/include/ptlist.h /usr/local/include/path.h
	$(CC) $(CFLAGS) -c path.c

argenv.o: /usr/local/include/argenv.h /usr/local/include/ptlist.h
	$(CC) $(CFLAGS) -c argenv.c
 
# --- remove binary and executable files
clean:
	rm -f pinf $(OBJECTS)

Linking Error message:
make
gcc -I /usr/local/include -g -c pinf.c hash.c argenv.c path.c
gcc -o pinf pinf.o hash.o path.o argenv.o -L/usr/local/lib/psapi.a
pinf.o: In function 'main':
/cygdrive/c/backup/pinf.c:135 undefined reference to 'EnumProcesses'
pinf.o: In function 'PrintProcessNameAndID':
/cygdrive/c/backup/pinf.c:467: undefined reference to 'EnumProcessModules'
/cygdrive/c/backup/pinf.c:470: undefined reference to 'GetModuleBaseName@16'
/cygdrive/c/backup/pinf.c:472: undefined reference to
'GetModuleFileNameExA@16'
collect2: ld returned 1 exit status
make: *** [pinf] Error 1

Any suggestions,
Darrick




--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Psapi.dll/lib problem
@ 2000-07-27 11:33 Addison, Darrick
  0 siblings, 0 replies; 3+ messages in thread
From: Addison, Darrick @ 2000-07-27 11:33 UTC (permalink / raw)
  To: 'cygwin@sourceware.cygnus.com'
  Cc: 'gnu-win32@cygnus.com', 'gnu-win32-request@cygnus.com'

Hi,

I recently downloaded cygwin and installed it on a Win NT 4.0 workstation
I'm currently in the process of porting a Linux application to the Windows
NT
platform. The Linux code seems to compile and link with only a few changes
to the source however when I try to make a few Win API calls from the ported
code I experience the problems listed below.

1.) The code compiles okay but when I attempt to link I receive the
following error messages
     using the below makefile:

	# Makefile to build pinf program
# --- macros

CC = gcc
CFLAGS=	-I /usr/local/include -g 
OBJECTS=pinf.o hash.o path.o argenv.o 
LIBS = -L/usr/local/lib/psapi.a  

# --- targets
all:	pinf
	@echo "Successufully compiled!"

pinf:	$(OBJECTS)
	$(CC) -o pinf $(OBJECTS) $(LIBS)

pinf.o:	/usr/local/include/psapi.h 
	$(CC) $(CFLAGS) -c pinf.c hash.c argenv.c path.c

hash.o: /usr/local/include/hash.h /usr/local/include/stdtypes.h
	$(CC) $(CFLAGS) -c hash.c

path.o: /usr/local/include/ptlist.h /usr/local/include/path.h
	$(CC) $(CFLAGS) -c path.c

argenv.o: /usr/local/include/argenv.h /usr/local/include/ptlist.h
	$(CC) $(CFLAGS) -c argenv.c
 
# --- remove binary and executable files
clean:
	rm -f pinf $(OBJECTS)

Linking Error message:
make
gcc -I /usr/local/include -g -c pinf.c hash.c argenv.c path.c
gcc -o pinf pinf.o hash.o path.o argenv.o -L/usr/local/lib/psapi.a
pinf.o: In function 'main':
/cygdrive/c/backup/pinf.c:135 undefined reference to 'EnumProcesses'
pinf.o: In function 'PrintProcessNameAndID':
/cygdrive/c/backup/pinf.c:467: undefined reference to 'EnumProcessModules'
/cygdrive/c/backup/pinf.c:470: undefined reference to 'GetModuleBaseName@16'
/cygdrive/c/backup/pinf.c:472: undefined reference to
'GetModuleFileNameExA@16'
collect2: ld returned 1 exit status
make: *** [pinf] Error 1

Any suggestions,
Darrick


--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2000-08-08  7:13 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-08-08  7:13 Psapi.dll/lib problem Addison, Darrick
  -- strict thread matches above, loose matches on Subject: below --
2000-08-08  6:24 Addison, Darrick
2000-07-27 11:33 Addison, Darrick

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).