automake
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Can't use automake-1.10 in Mingw and Cygwin in Windows XP


From: haibin zhang
Subject: Re: Can't use automake-1.10 in Mingw and Cygwin in Windows XP
Date: Sat, 10 Feb 2007 00:07:20 +0800 (CST)

I found the problem:
I define AM_LDFLAGS as the following, it can't find "-L$(CPPUNIT_ROOT_PATH)/lib 
-lcppunit" in automake-1.10, but if I define it as this : "CPPUNIT_LD_INC    = 
-L$(CPPUNIT_ROOT_PATH)/lib -lcppunit" and include it as $(CPPUNIT_LD_INC), it 
can be found.
AM_LDFLAGS       = -L$(ACE_ROOT_PATH)/lib -lACE $(ACE_LDFLAGS_APPEND) \
                 -L$(CPPUNIT_ROOT_PATH)/lib -lcppunit 

The following is my Makefile.am file content :

## Process this file with automake to produce Makefile.in.

if MINGW32
ACE_LDFLAGS_APPEND = -lws2_32 -lmswsock -lwsock32 -lnetapi32
endif

AM_CPPFLAGS        = -Wall @HOST_FLAG@ @WIN_FLAG@
AM_CXXFLAGS        = -I$(ACE_ROOT_PATH)/include -I$(CPPUNIT_ROOT_PATH)/include 
-I$(top_srcdir)/include
AM_LDFLAGS       = -L$(ACE_ROOT_PATH)/lib -lACE $(ACE_LDFLAGS_APPEND) \
                 -L$(CPPUNIT_ROOT_PATH)/lib -lcppunit 

TESTS = dirTest
check_PROGRAMS  = dirTest

bin_PROGRAMS = unitTest
noinst_PROGRAMS = dirTest shm_test shm_test_server shm_test_client

unitTest_LDFLAGS   = -L$(top_builddir)/src -lhbstock2 
unitTest_DEPENDENCIES   = $(top_builddir)/src/libhbstock2.la
unitTest_SOURCES = unitTest.cpp \
    configTest.h configTest.cpp \
    dataTest.h dataTest.cpp \
    technic_test.h technic_test.cpp \
    DllObjectMangerTest.h DllObjectMangerTest.cpp
    
dirTest_SOURCES = dir_test.cpp
#dirTest_LDFLAGS   = -L../src -lhbstock2

shm_test_SOURCES = shm_test.cpp
shm_test_server_SOURCES = shm_test_server.cpp
shm_test_client_SOURCES = shm_test_client.cpp

Regards
zhb

haibin zhang <address@hidden> 写道: Hi All:

I found that automake-1.10 can't be used in Mingw and Cygwin in Windows XP.

I found it will cut many words in generate code if the line is too long.

if I use automake-1.9.6, it 's ok.

I have diffed the line, that I found automake-1.10 have cut some words . In my 
example, it cut "-L/opt/cppunit/lib /opt/cppunit/lib/libcppunit.a".
I don't know why? can you help me?

$ automake --version
automake (GNU automake) 1.9.6
Written by Tom Tromey .

g++ -I/opt/ace/include -I/opt/cppunit/include -I../../../hbstock/include -O2 -o 
.libs/unitTest.exe unitTest.o configTest.o da
taTest.o technic_test.o DllObjectMangerTest.o  -L/opt/ace/lib 
-L/opt/cppunit/lib /opt/cppunit/lib/libcppunit.a -Le:/zhb_svn/m
ingw/build/hbstock_build/src 
e:/zhb_svn/mingw/build/hbstock_build/src/.libs/libhbstock2.dll.a 
/mingw/lib/libintl.dll.a -L/min
gw/lib /mingw/lib/libiconv.dll.a -lACE -lws2_32 -lmswsock -lwsock32 -lnetapi32 
-L/home/hbzhang/hbstock/lib -L/mingw/lib
creating unitTest.exe

$ automake --version
automake (GNU automake) 1.10
Written by Tom Tromey 
       and Alexandre Duret-Lutz .

g++ -I/opt/ace/include -I/opt/cppunit/include -I../../../hbstock/include -O2 -o 
.libs/unitTest.exe unitTest.o configTest.o da
taTest.o technic_test.o DllObjectMangerTest.o  
-L/cygdrive/e/zhb_svn/cygwin/build/hbstock_build/src /cygdrive/e/zhb_svn/cygwi
n/build/hbstock_build/src/.libs/libhbstock2.dll.a /usr/lib/libintl.dll.a 
-L/usr/lib /usr/lib/libiconv.dll.a -L/opt/ace/lib -l
ACE  -L/home/hbzhang/hbstock/lib
unitTest.o:unitTest.cpp:(.text+0x66): undefined reference to 
`CppUnit::TextTestRunner::TextTestRunner(CppUnit::Outputter*)'


Regards


   
---------------------------------
 Mp3疯狂搜-新歌热歌高速下   


                
---------------------------------
 Mp3疯狂搜-新歌热歌高速下   


reply via email to

[Prev in Thread] Current Thread [Next in Thread]