[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Borland C++ Builder 5, w2k and sockets
From: |
Rami Saarinen |
Subject: |
Borland C++ Builder 5, w2k and sockets |
Date: |
Mon, 27 Oct 2003 12:01:57 +0200 |
User-agent: |
Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.5) Gecko/20031007 |
Hello and sorry to bother you again for those who have read this message
from the sourceforge forums. I have been trying to get the library
compiled for BCB5, but ran into some trouble. The reason why I won't be
using minGW or cygwin is that I am working on some research project at
my school and it uses some BCB5 resources. I'm also a bit green on
Windows so either way I am heading towards trouble.
I have also added all the other files except fifo.cpp and xml.cpp as
they create errors and I think I won't be needing them.
<beg>
Please, please, please give me some enlightment for this matter as I'd
really hate to look out for another cross-platform threading and
networking library and change my project to use it. **sob** I am _so_
desperate!
<\beg>
So the original message was:
I'm currently trying to get the commoncpp compiled with BCB5 (on win2k)
and having some trouble with it. Switching from BCB5 is not an option at
the moment and I'd really like to have the cc++ at hand. To this point I
have been developing in Linux, but I want to make the project to work on
Windows too (hence I chose the ccpp at the first place). All I really
need is the threading and network functionality.
After several feeble attempts I chose to edit (with my limited makefile
writing abilities) the BCC5 makefile as my make version did not have a
clue about the '%' stuff (nor did I). You find the modiefied version at
the end of this message (sorry about the size). I also added "#define
__MT__" to config.h
To my surprise all files compiled nicely (after I have added the winsoc
stuff, as instructed by a friend). There are warnings during (I guess)
the creation of the LIB file:
Borland Implib Version 3.0.22 Copyright (c) 1991, 2000 Inprise Corporation
Warning duplicate symbol: @address@hidden@what$xqv
Warning duplicate symbol: @address@hidden@what$xqv
Warning duplicate symbol: @address@hidden@what$xqv
Warning duplicate symbol: @address@hidden@final$qv
Warning duplicate symbol: @address@hidden@getExtended$qv
Warning duplicate symbol: @address@hidden@getExtended$qv
Warning duplicate symbol: @address@hidden@initial$qv
Warning duplicate symbol: @address@hidden@address@hidden
Warning duplicate symbol: @address@hidden@address@hidden
Ok. As brute force and ignorance usually works in situations like this I
decided to give it a try nonetheless. First I tried to compile the
thread1.cpp test program with:
$ bcc32 -WC -lap -I..\\..\\include -I..\\ ws2_32.lib ccgnu2.lib thread1.cpp
Some warnings of type (there is usually quite a lot of them):
"Warning W8026 ..\..\include\cc++/exception.h 87: Functions with
exception specifications are not expanded inline"
But thread1.exe executes nicely without a problem. Now I tried
tcpstr1.cpp with:
$ bcc32 -WC -lap -Lc:\\progra~1\\borland\\cbuilder5\\lib
-I..\\..\\include -I..\\ ccgnu2.lib ws2_32.lib tcpstr1.
cpp
Again lot of those inline warnings (and about argc and argv not used in
main). And running the tcpstr1.exe causes:
"The instruction at 0x... referenced memory at 0x... The memory could
not be "read""
and so on for 14 times, some of them about memory could not be
"written". I took a look and found that the probles start on line "
tcpstream tcp("127.0.0.1:96000");" inside the ThreadOut class.
I'd be very happy for any kind of feedback and ideas. Pretty please?
Needless to say that I'm not so familiar with developing on windows.
Thanks!
----------------------------------------------------
Here's the Makefile.bcc:
# GNU Makefile to build CommonC++ using Borland CC 5.5.1
prefix = c:\\progra~1\\borland\\cbuilder5
includedir = $(prefix)\\include
bindir = $(prefix)\\bin
libdir = $(prefix)\\lib
BCC = bcc32.exe -w- -tWM -I..\\win32 -I..\\src -I$(includedir) -I..\\include
ILIB = ilink32.exe -L$(libdir) -L$(libdir)\\psdk -c -Tpd ws2_32.lib
wsock32.lib
IMPLIB = implib.exe -c
LIBS = cw32mt import32
OBJS = inaddr.obj socket.obj peer.obj mempager.obj threadkey.obj
keydata.obj mutex.obj exception.obj slog.obj semaphore.obj thread.obj
event.obj peer.obj file.obj friends.obj port.obj
ccgnu2.dll ccgnu2.lib:
$(ILIB) c0d32 $(OBJS), $@, ,$(LIBS)
$(IMPLIB) ccgnu2.lib ccgnu2.dll
all: ccgnu2.dll ccgnu2.lib
ccgnu2.dll: thread.obj threadkey.obj event.obj file.obj friends.obj
exception.obj mutex.obj port.obj inaddr.obj peer.obj socket.obj slog.obj
mempager.obj keydata.obj semaphore.obj
clean:
$(RM) *.dll *.lib *.ilc *.ild *.ilf *.ils *.map *.tds *.obj
inaddr.obj: ..\\src\\inaddr.cpp
$(BCC) -c ..\\src\\inaddr.cpp
socket.obj: ..\\src\\socket.cpp
$(BCC) -c ..\\src\\socket.cpp
peer.obj: ..\\src\\peer.cpp
$(BCC) -c ..\\src\\peer.cpp
event.obj: ..\\src\\event.cpp
$(BCC) -c ..\\src\\event.cpp
file.obj: ..\\src\\file.cpp
$(BCC) -c ..\\src\\file.cpp
friends.obj: ..\\src\\friends.cpp
$(BCC) -c ..\\src\\friends.cpp
port.obj: ..\\src\\port.cpp
$(BCC) -c ..\\src\\port.cpp
mempager.obj: ..\\src\\mempager.cpp
$(BCC) -c ..\\src\\mempager.cpp
thread.obj: ..\\src\\thread.cpp
$(BCC) -c ..\\src\\thread.cpp
threadkey.obj: ..\\src\\threadkey.cpp
$(BCC) -c ..\\src\\threadkey.cpp
keydata.obj: ..\\src\\keydata.cpp
$(BCC) -c ..\\src\\keydata.cpp
mutex.obj: ..\\src\\mutex.cpp
$(BCC) -c ..\\src\\mutex.cpp
exception.obj: ..\\src\\exception.cpp
$(BCC) -c ..\\src\\exception.cpp
slog.obj: ..\\src\\slog.cpp
$(BCC) -c ..\\src\\slog.cpp
semaphore.obj: ..\\src\\semaphore.cpp
$(BCC) -c ..\\src\\semaphore.cpp
--
Rami Saarinen
address@hidden
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Borland C++ Builder 5, w2k and sockets,
Rami Saarinen <=