RE: [Boost-Users] Linking Problem with GCC
Hi Jeff,
o Platform : Win32 (WinXP/2000)
o GCC -- mingw port.
o Command lines for the compiler and linker, with path names removed for
clarity. (Compiling a DLL)
Compiling files :
C:\gcc -c -DBUILDING_DLL=1 -I. "maindll.cpp" -s -mwindows
-ftemplate-depth-30 -IC:\Include\ -IC:\LIBSTD~1 -LC:\Lib\ -BC:\Bin\
-Ic:\BOOST_~1
Linking files :
C:\dllwrap --export-all --output-def C:\dll.def --implib
"C:\libHminet~1.a" -o c:\Hminet~1.dll "c:\maindll.o"
Note that when compiling an exe, the command line uses g++ for both the
compile and link steps.
I've attached the source for the edge connectivity example in Chapter
8.2 of the text book.
The only compiler that doesn't bite it on the attached code (that I've
tried) is GCC compiling as an EXE, so I'm sure my problem with compiling
a DLL is environment related.
Kind Regards,
Wayne.
-----Original Message-----
From: Jeff Garland [mailto:jeff@crystalclearsoftware.com]
Sent: Tuesday, April 16, 2002 4:30 PM
To: Boost-Users@yahoogroups.com
Subject: RE: [Boost-Users] Linking Problem with GCC
> I agree that latest problem is possibly an STL/environment
problem
> specifically related to linking a DLL. An exe compiles and
links fine.
> I'm only new to GCC and am using v2.95. I tried updating to
the 3.0.4
> libraries but that didn't seem to help any.
Which platform/environment are you using GCC under cygwin,
linux, dos? In any case, the cout and
endl symbols shoud be in the library. Also, it would be nice to
know the exact line you are using
to invoke both the compile and link step.
> Anyway, I only got into this bind because VC7 and VC6 both run
into
> Internal Compiler Errors when trying to compile (only a select
part) of
> the BGL. I got a work around from Microsoft for one compiler
bug, made a
> fix to the BGL code to get past another, then hit yet another
internal
> compiler error. Where does all this happen? Specifically with
examples
> from the BGL text book including the edge connectivity example
in
> section 8.2.
That's not helping because I don't have the BGL book yet.
> Thank you for your kind response.
Sure.
Jeff
Yahoo! Groups Sponsor
ADVERTISEMENT
Click Here!
<http://rd.yahoo.com/M=194081.1994012.3473453.1261774/D=egroupweb/S=1705
006788:HM/A=1036972/R=0/*http://www.ediets.com/start.cfm?code=3466>
<http://us.adserver.yahoo.com/l?M=194081.1994012.3473453.1261774/D=egrou
pmail/S=1705006788:HM/A=1036972/rand=613311184>
Info: http://www.boost.org
Wiki: <
http://www.crystalclearsoftware.com/cgi-bin/boost_wiki/wiki.pl>
Unsubscribe: mailto:boost-users-unsubscribe@yahoogroups.com
Your use of Yahoo! Groups is subject to the Yahoo! Terms of
Service http://docs.yahoo.com/info/terms/ .
----------
#include <algorithm>
#include <utility>
#include
Here are some general suggestions you might try. 1) You might consider downloading cygwin. It includes a pre-built and newer version of the gcc compiler than MingW. 2) I always use g++ on the command line. g++ builds in the locations of the standard library paths for both inclusion and linking so you shouldn't need to explicitly include them. 3) I haven't used dllwrap and I'm not sure why it is needed here. I would expect something like: g++ -c -o main.o main.cpp g++ -o main.exe main.o I would use 'hello world' to get the command line working with gcc and then move up to BGL. 4) On the developer mailing list another person has run into what seems to be the same issues with VC compiler. He upgraded to the latest version although there is some indication that it is not yet 100% problem free. See http://lists.boost.org/MailArchives/boost/msg28430.php for details. Jeff
participants (2)
-
Jeff Garland
-
Wayne Hartell