VGUI v 1.21 problem

Mumit Khan khan@xraylith.wisc.EDU
Fri Apr 30 18:32:00 GMT 1999


"Vincent P. LaBella" <vlabella@comp.uark.edu> writes:
> Hello,
> 	I'm trying to compile the V C++ GUI library version 1.21. I
> dowloaded both the full package v-1.21.tar.gz and the latest fix
> v121bfix.zip.
>> They compile fine but I get the error:
>> /home/noer/src/b20/comp-tools/devo/winsup/libcmain.cc:38: undefined
> reference to
> `WinMain@16'
> collect2: ld returned 1 exit status
>> when It tries to build the executable. I emailed the V people and they
> said this should be fixed. I tried deleteing and reinstalling everything,
> but I still get the same problem. Anyone else have this problem and know
> a workaround? 

Yes, Bruce had sent me a bug report. The problem is that V is putting
WinMain in a library, and the linker is not picking it up since there
is no references to it yet (if it were "main" however, ld would pick it
up). The problem will be trivially solved if we add a new entry point
for windows subsystem, ie., when -mwindows is used.
Until we fix it in the dev tools, here's the trivial fix (there is also
a bug in the CfgCyg.mk or whatever it's called):
Replace the LIBS in the following section:
 #---------------------------------------------------------------------
 # Architecture independent
 #---------------------------------------------------------------------
 INCDIR = -I$(HOMEV)/includew -I$(HOMEV)/gnuwin32/include
 LIBDIR = -L$(LibDir)
 LIBNAME = libV
 V1NAME = v1
 LIBS = -lV -lcomctl32 -mwindows
With
 LIBS = -Wl,-u,_WinMain@16 -lV -lcomctl32 -mwindows
And, also add -DWIN32 to compiler flags, which is needed by the OpenGL
headers (or fix the OpenGL headers to use the correct macro -- _WIN32):
from
 #---------------------------------------------------------------------
 # C/C++ compile options
 #---------------------------------------------------------------------
 CFLAGS += $(INCDIR)
 ifeq ($(DEBUG),no)
 CFLAGS += -O2 -D_WIN32
 endif
 ifeq ($(DEBUG),yes) 
 CFLAGS += -g -D_WIN32
 endif
 ifeq ($(DEVEL),yes)
 CFLAGS += -DDEVEL
 endif
To,
 #---------------------------------------------------------------------
 # C/C++ compile options
 #---------------------------------------------------------------------
 CFLAGS += $(INCDIR)
 ifeq ($(DEBUG),no)
 CFLAGS += -O2 -D_WIN32 -DWIN32
 endif
 ifeq ($(DEBUG),yes) 
 CFLAGS += -g -D_WIN32 -DWIN32
 endif
 ifeq ($(DEVEL),yes)
 CFLAGS += -DDEVEL
 endif
Regards,
Mumit
--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com


More information about the Cygwin mailing list

AltStyle によって変換されたページ (->オリジナル) /