skipping incompatible libwine build problem.

Matthew Watchinski mwatchinski at sourcefire.com
Wed Jan 31 09:29:28 CST 2007


Sure, attached.

Thanks
-matt



Robert Shearman wrote:
> Matthew Watchinski wrote:
>> Linux ebx 2.6.17-10-generic #2 SMP Tue Dec 5 21:16:35 UTC 2006 x86_64
>> GNU/Linux
>>
>>   
> ...
>> wineg++ -mwindows -mno-cygwin -municode -mconsole -o simpleapp.exe.so
>> simpleapp.o simpleappList.o      -lodbc32 -lole32 -loleaut32 -lwinspool
>> -luuid
>> /usr/bin/ld: skipping incompatible /usr/local/lib/libwine.so when
>> searching for -lwine
>> /usr/bin/ld: skipping incompatible /usr/local/lib/libwine.so when
>> searching for -lwine
>> /usr/bin/ld: skipping incompatible /usr/local/lib/libwine.so when
>> searching for -lwine
>> /usr/bin/ld: cannot find -lwine
>> collect2: ld returned 1 exit status
>> winegcc: g++ failed.
>> make: *** [simpleapp.exe.so] Error 2
>>
>>   
> ...
>> The only lines I've modified from the original winemaker Makefile are
>> these:
>>
>> CXXFLAGS              = -Wall -Wextra -Wwrite-strings -Wcast-align
>> -Wsign-compare -pedantic -m32
>> #CXXFLAGS              =
>> CEXTRA                = -mno-cygwin -municode -mconsole -Wb,--exe -Wb,-w
>> CXXEXTRA              = -mno-cygwin -municode -mconsole -Wb,--exe -Wb,-w
>> RCEXTRA               =
>> INCLUDE_PATH          =
>>
>> simpleapp_exe_LDFLAGS = -mwindows \
>>                         -mno-cygwin \
>>                         -municode \
>>                         -mconsole
>>
>> I assume I'm missing some magic ld switch, but I'm not sure what.  Can
>> anyone point me in the right direction?
>>   
> 
> The CXXFLAGS you specified aren't getting used. Can you send the entire
> makefile?
> 

-------------- next part --------------
### Generated by Winemaker


SRCDIR                = .
SUBDIRS               =
DLLS                  = simpleapp.exe
EXES                  = simpleapp.exe



### Common settings

CXXFLAGS              = -Wall -Wextra -Wwrite-strings -Wcast-align -Wsign-compare -pedantic -m32
CEXTRA                = -mno-cygwin -municode -mconsole -Wb,--exe -Wb,-w
CXXEXTRA              = -mno-cygwin -municode -mconsole -Wb,--exe -Wb,-w
RCEXTRA               = 
INCLUDE_PATH          =
DLL_PATH              =
LIBRARY_PATH          =
LIBRARIES             =
DEFINES		      = -DCOMMAND_LINE -DWINDOWSNATIVE -DBUILD_CLI


### simpleapp.exe sources and settings

simpleapp_exe_MODULE  = simpleapp.exe
simpleapp_exe_C_SRCS  =
simpleapp_exe_CXX_SRCS= simpleapp.cpp bugList.cpp
simpleapp_exe_RC_SRCS =
simpleapp_exe_LDFLAGS = -mwindows \
			-mno-cygwin \
			-municode \
			-mconsole \
			-Wb,--verbose
simpleapp_exe_DLL_PATH=
simpleapp_exe_DLLS    = odbc32 \
			ole32 \
			oleaut32 \
			winspool
simpleapp_exe_LIBRARY_PATH=
simpleapp_exe_LIBRARIES= uuid

simpleapp_exe_OBJS    = $(simpleapp_exe_C_SRCS:.c=.o) \
			$(simpleapp_exe_CXX_SRCS:.cpp=.o) \
			$(simpleapp_exe_RC_SRCS:.rc=.res)



### Global source lists

C_SRCS                = $(simpleapp_exe_C_SRCS)
CXX_SRCS              = $(simpleapp_exe_CXX_SRCS)
RC_SRCS               = $(simpleapp_exe_RC_SRCS)


### Tools

CC = winegcc
CXX = wineg++
RC = wrc


### Generic targets

all: $(SUBDIRS) $(DLLS:%=%.so) $(EXES:%=%.exe)

test:
	./run-tests.sh

### Build rules

.PHONY: all clean dummy

$(SUBDIRS): dummy
	@cd $@ && $(MAKE)

# Implicit rules

.SUFFIXES: .cpp .rc .res
DEFINCL = $(INCLUDE_PATH) $(DEFINES) $(OPTIONS)

.c.o:
	$(CC) -c $(CFLAGS) $(CEXTRA) $(DEFINCL) -o $@ $<

.cpp.o:
	$(CXX) -c $(CXXFLAGS) $(CXXEXTRA) $(DEFINCL) -o $@ $<

.cxx.o:
	$(CXX) -c $(CXXFLAGS) $(CXXEXTRA) $(DEFINCL) -o $@ $<

.rc.res:
	$(RC) $(RCFLAGS) $(RCEXTRA) $(DEFINCL) -fo$@ $<

# Rules for cleaning

CLEAN_FILES     = y.tab.c y.tab.h lex.yy.c core *.exe *.orig *.rej \
                  \\\#*\\\# *~ *% .\\\#*

clean:: $(SUBDIRS:%=%/__clean__) $(EXTRASUBDIRS:%=%/__clean__)
	$(RM) $(CLEAN_FILES) $(RC_SRCS:.rc=.res) $(C_SRCS:.c=.o) $(CXX_SRCS:.cpp=.o)
	$(RM) $(DLLS:%=%.so) $(EXES:%=%.exe.so) $(EXES:%.exe=%)

$(SUBDIRS:%=%/__clean__): dummy
	cd `dirname $@` && $(MAKE) clean

$(EXTRASUBDIRS:%=%/__clean__): dummy
	-cd `dirname $@` && $(RM) $(CLEAN_FILES)

### Target specific build rules
DEFLIB = $(LIBRARY_PATH) $(LIBRARIES) $(DLL_PATH)

$(simpleapp_exe_MODULE).so: $(simpleapp_exe_OBJS)
	$(CXX) $(simpleapp_exe_LDFLAGS) -o $@ $(simpleapp_exe_OBJS) $(simpleapp_exe_LIBRARY_PATH) $(DEFLIB) $(simpleapp_exe_DLLS:%=-l%) $(simpleapp_exe_LIBRARIES:%=-l%)

$(simpleapp_exe_MODULE).exe: $(simpleapp_exe_OBJS)
	$(CXX) $(simpleapp_exe_LDFLAGS) -o $@ $(simpleapp_exe_OBJS) $(simpleapp_exe_LIBRARY_PATH) $(DEFLIB) $(simpleapp_exe_DLLS:%=-l%) $(simpleapp_exe_LIBRARIES:%=-l%)


More information about the wine-devel mailing list