[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: how to compile commoncpp2-1.0.13 for win32?
From: |
taraben . a |
Subject: |
Re: how to compile commoncpp2-1.0.13 for win32? |
Date: |
Sat, 20 Dec 2003 23:41:57 +0100 |
User-agent: |
Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.6b) Gecko/20031205 Thunderbird/0.4 |
Hi Wolfgang,
I also have problems to configure commoncpp on mingw/msys.
I have latest mingw/msys.
Try the makefile in the distro.
make -f Makefile.gcc
You need to modify some path settings and you have to shift some files
from one packet to the other because of dependency. Attached the
makefile that is working for me. Tell me if this is not working for you.
Best wishes,
Adib.
Wolfgang wrote:
i tried the last days to compile commonc++ for win32, but without success
with linux, i do not have a problem.
my environment:
commonc++: commoncpp2-1.0.13
linux: debian unstable with gcc/g++ and i586-mingw32msvc-c++ installed.
win32: native windows with dev-cpp (including mingw/gcc/g++) latest version.
on linux, i run ./configure in my own directory "mybins/" trying to use the
VPATH function to create bins/libs for all platforms. i still got the linux
files compiled, and a Makefile in my win32/ subdir. but no win32 files.
then i cd'ed into mybins/ and ran make explicit, but got only "nothing to
do...." the makefile itself did not reference mingw at all.
on windows, i used the import function of dev-cpp on the src tree of commonc++
importing the VC project files, without haveing run configure before (because
i do not know how to run configure within w2k).
in general that worked ok, but some files didn't compile (serial.cpp,
slog.cpp, socket.cpp, digest.cpp, and some more).
i.e sockets.cpp
i guess this warning:
(ost::Socket::writeData(const void*, unsigned int, long unsigned int)':../
src/socket.cpp:286: warning: comparison of unsigned expression < 0 is always
false )
makes sense, but i do not understand the reasons for all the other errors.
(See an example at the end iof this mail)
I believe i do something really wrong, but i haven't used mingw or gcc before
on win32, so can anyone give me a hint of how to get commonc++ compiled for
win32?
(using mingw or gcc )
Thx in advance ;-)
Wolfgang
=====compiler output using Dev-Cpp with mingw on win32====
Compiler: Default compiler
Building Makefile: "D:\APPS\DEVEL\Dev-Cpp\Myprojects\commoncpp2-1.0.13\win32
\Makefile.win"
Führt make... aus
make.exe -f "D:\APPS\DEVEL\Dev-Cpp\Myprojects\commoncpp2-1.0.13\win32
\Makefile.win" ../src/socket.o
g++.exe -c ../src/socket.cpp -o ../src/socket.o -I"D:/APPS/DEVEL/Dev-Cpp/
include/c++" -I"D:/APPS/DEVEL/Dev-Cpp/include/c++/mingw32" -I"D:/APPS/
DEVEL/Dev-Cpp/include/c++/backward" -I"D:/APPS/DEVEL/Dev-Cpp/include"
-I"D:/APPS/DEVEL/Dev-Cpp/include/cc++" -I"../win32" -I"../include"
-D__GNUWIN32__ -W -DWIN32 -DNDEBUG -D_WINDOWS -D_MBCS -D_USRDLL
-DCCGNU2_EXPORTS ../src/socket.cpp: In member function `virtual int
ost::Socket::writeData(const
void*, unsigned int, long unsigned int)':../src/socket.cpp:286: warning:
comparison of unsigned expression < 0 is always
false../src/socket.cpp: In constructor
`ost::TCPStream::TCPStream(ost::TCPSocket&, int, bool, long unsigned
int)':
../src/socket.cpp:1064: no matching function for call to `
std::basic_iostream<char, std::char_traits<char> >::basic_iostream()'D:/APPS/
DEVEL/Dev-Cpp/include/c++/iosfwd:64: candidates are:
std::basic_iostream<char, std::char_traits<char> >::basic_iostream(const
std::basic_iostream<char, std::char_traits<char> >&)D:/APPS/DEVEL/Dev-Cpp/
include/c++/istream:280:
std::basic_iostream<_CharT,
_Traits>::basic_iostream(std::basic_streambuf<_CharT, _Traits>*) [with
_CharT = char, _Traits = std::char_traits<char>]../src/socket.cpp: In
constructor `ost::TCPStream::TCPStream(const
ost::InetHostAddress&, short unsigned int, int, bool, long unsigned int)':
../src/socket.cpp:1095: no matching function for call to `
std::basic_iostream<char, std::char_traits<char> >::basic_iostream()'D:/APPS/
DEVEL/Dev-Cpp/include/c++/iosfwd:64: candidates are:
std::basic_iostream<char, std::char_traits<char> >::basic_iostream(const
std::basic_iostream<char, std::char_traits<char> >&)D:/APPS/DEVEL/Dev-Cpp/
include/c++/istream:280:
std::basic_iostream<_CharT,
_Traits>::basic_iostream(std::basic_streambuf<_CharT, _Traits>*) [with
_CharT = char, _Traits = std::char_traits<char>]../src/socket.cpp: In
constructor `ost::TCPStream::TCPStream(bool)':
../src/socket.cpp:1183: no matching function for call to `
std::basic_iostream<char, std::char_traits<char> >::basic_iostream()'D:/
APPS/DEVEL/Dev-Cpp/include/c++/iosfwd:64: candidates are:
std::basic_iostream<char, std::char_traits<char> >::basic_iostream(const
std::basic_iostream<char, std::char_traits<char> >&)D:/APPS/DEVEL/Dev-Cpp/
include/c++/istream:280:
std::basic_iostream<_CharT,
_Traits>::basic_iostream(std::basic_streambuf<_CharT, _Traits>*) [with
_CharT = char, _Traits = std::char_traits<char>]../src/socket.cpp: In copy
constructor `ost::TCPStream::TCPStream(const
ost::TCPStream&)':
../src/socket.cpp:1197: no matching function for call to `
std::basic_iostream<char, std::char_traits<char> >::basic_iostream()'D:/
APPS/DEVEL/Dev-Cpp/include/c++/iosfwd:64: candidates are:
std::basic_iostream<char, std::char_traits<char> >::basic_iostream(const
std::basic_iostream<char, std::char_traits<char> >&)D:/APPS/DEVEL/Dev-Cpp/
include/c++/istream:280:
std::basic_iostream<_CharT,
_Traits>::basic_iostream(std::basic_streambuf<_CharT, _Traits>*) [with
_CharT = char, _Traits = std::char_traits<char>]make.exe: *** [../src/
socket.o] Error 1Ausführung beendet
_______________________________________________
Bug-commoncpp mailing list
address@hidden
http://mail.gnu.org/mailman/listinfo/bug-commoncpp
# Copyright (C) 2002 Open Source Telecom Corporation.
#
# This file is free software; as a special exception the author gives
# unlimited permission to copy and/or distribute it, with or without
# modifications, as long as this notice is preserved.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY, to the extent permitted by law; without even the
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
# A makefile to do a mingw32 cross compile build of dll's.
HAVE = -I$(prefix)/include
VPATH = ../win32:../src:../demo:../tests
OPATH = ../win32
ARCH =
prefix = c:/usr
CXX = $(ARCH)c++
AS = $(ARCH)as
DLLTOOL = $(ARCH)dlltool
DLLWRAP = $(ARCH)dllwrap
WINDRES = $(ARCH)windres
STRIP = $(ARCH)strip
exeext = .exe
dllext = .dll
CPPFLAGS = -I. -I../include $(HAVE) -DHAVE_CONFIG_H -D_GNU_SOURCE
CXXFLAGS = -include ../win32/cc++/config.h -g -O2 -mthreads
LDFLAGS = -L$(prefix)/dll -lccgnu2 -lccext2 -lws2_32
CCGNU2_LDFLAGS = -L$(prefix)/dll -lws2_32
CCEXT2_LDFLAGS = -L. -L$(prefix)/dll -lccgnu2 -lws2_32 -lwsock32
#LDEXEC = -L$(OPATH) -lccgnu2 $(LDFLAGS)
CCGNU2_DLL_NAME = ccgnu2.dll
CCEXT2_DLL_NAME = ccext2.dll
CCGNU2_DLL_LIB = libccgnu2.a
CCEXT2_DLL_LIB = libccext2.a
CCGNU2_DLL_DEF = ccgnu2.def
CCEXT2_DLL_DEF = ccext2.def
# PROGS = tcp.exe tcpthread.exe tcpservice.exe \
PROGS = urlfetch.exe xmlfetch.exe SampleSocketPort.exe crc32.exe shadigest.exe
# cmdlineopt will not compile on non-posix systems!
#SERIAL_PROG: serial.exe
#serial.exe:
# $(CXX) $(CPPFLAGS) $(CXXFLAGS) serialmain.o serialecho.o -L. -lccgnu2
$(LDFLAGS) -o serialmain.exe
# serial uses "/dev/modem"
TESTS = bug1.exe bug2.exe thread1.exe thread2.exe tcpstr1.exe url1.exe
all: $(CCGNU2_DLL_NAME) $(CCEXT2_DLL_NAME) $(PROGS) $(SERIAL_PROG) $(TESTS)
SHDRS = thread.h socket.h exception.h cmdoptns.h digest.h export.h file.h \
groups.h misc.h numbers.h persist.h slog.h url.h urlstring.h xml.h \
serial.h strchar.h
HDRS = cc++/config.h $(addprefix ../include/cc++/, $(SHDRS))
CCGNU2_OBJS = thread.o mutex.o semaphore.o threadkey.o \
friends.o event.o slog.o dir.o file.o inaddr.o \
peer.o port.o socket.o network.o serial.o \
mempager.o keydata.o dso.o exception.o \
process.o urlstring.o url.o groups.o
CCEXT2_OBJS = buffer.o fifo.o pipe.o numbers.o \
cmdoptns.o xml.o persist.o engine.o digest.o sha.o \
date.o md5.o unix.o ftp.o
CCGNU2_DLLWRAP_FLAGS = --export-all --output-def $(CCGNU2_DLL_DEF) \
--implib $(CCGNU2_DLL_LIB) --driver-name $(CXX)
CCEXT2_DLLWRAP_FLAGS = --export-all --output-def $(CCEXT2_DLL_DEF) \
--implib $(CCEXT2_DLL_LIB) --driver-name $(CXX)
$(CCGNU2_DLL_NAME) $(CCGNU2_DLL_DEF) $(CCGNU2_DLL_LIB): $(addprefix $(OPATH)/,
$(CCGNU2_OBJS)) libgnu2.o
$(DLLWRAP) $(CCGNU2_DLLWRAP_FLAGS) -o $(CCGNU2_DLL_NAME) \
$(CCGNU2_OBJS) libgnu2.o $(CCGNU2_LDFLAGS)
$(CCEXT2_DLL_NAME) $(CCEXT2_DLL_DEF) $(CCEXT2_DLL_LIB): $(addprefix $(OPATH)/,
$(CCEXT2_OBJS)) libgnu2.o
$(DLLWRAP) $(CCEXT2_DLLWRAP_FLAGS) -o $(CCEXT2_DLL_NAME) \
$(CCEXT2_OBJS) libgnu2.o $(CCEXT2_LDFLAGS)
libgnu2.o: CCXX2.rc
$(WINDRES) -o libgnu2.o CCXX2.rc
$(OPATH)/%.o: %.cpp
$(CXX) -c $(CPPFLAGS) $(CXXFLAGS) -o $(OPATH)/$(basename $@).o $<
%.exe: %.cpp
$(CXX) $(CPPFLAGS) $(CXXFLAGS) $< -L. $(LDFLAGS) -o $@
hello.exe: hello.cpp
$(CXX) $(CPPFLAGS) $(CXXFLAGS) $< -L. -lccgnu2 $(LDFLAGS) -o $@
clean:
rm -f $(CCGNU2_OBJS) $(CCEXT2_OBJS) \
$(CCGNU2_DLL_NAME) $(CCEXT2_DLL_NAME) \
$(CCGNU2_DLL_LIB) $(CCEXT2_DLL_LIB) \
$(CCGNU2_DLL_DEF) $(CCEXT2_DLL_DEF) \
$(PROGS)
install:
-mkdir $(prefix)/include/cc++
-mkdir $(prefix)/dll
cp -af $(HDRS) $(prefix)/include/cc++
cp -af $(CCGNU2_DLL_LIB) $(CCGNU2_DLL_NAME) $(CCEXT2_DLL_LIB)
$(CCEXT2_DLL_NAME) $(prefix)/dll
cp -af $(CCGNU2_DLL_LIB) $(prefix)/lib/libccgnu2dll.a
cp -af $(CCEXT2_DLL_LIB) $(prefix)/lib/libccext2dll.a
$(STRIP) $(prefix)/dll/$(CCGNU2_DLL_NAME)
$(prefix)/dll/$(CCEXT2_DLL_NAME)
ar -rs $(prefix)/lib/$(CCGNU2_DLL_LIB) $(CCGNU2_OBJS)
ar -rs $(prefix)/lib/$(CCEXT2_DLL_LIB) $(CCEXT2_OBJS)
- how to compile commoncpp2-1.0.13 for win32?, Wolfgang, 2003/12/20
- Re: how to compile commoncpp2-1.0.13 for win32?,
taraben . a <=
- Re: how to compile commoncpp2-1.0.13 for win32?, Wolfgang, 2003/12/21
- Message not available
- Re: how to compile commoncpp2-1.0.13 for win32?, Wolfgang, 2003/12/21
- Re: how to compile commoncpp2-1.0.13 for win32?, taraben . a, 2003/12/21
- Re: how to compile commoncpp2-1.0.13 for win32?, Wolfgang, 2003/12/22
- Re: how to compile commoncpp2-1.0.13 for win32?, taraben . a, 2003/12/22
- Re: how to compile commoncpp2-1.0.13 for win32?, Wolfgang, 2003/12/22
- Re: how to compile commoncpp2-1.0.13 for win32?, taraben . a, 2003/12/22
- Re: how to compile commoncpp2-1.0.13 for win32?, Wolfgang, 2003/12/23