n9jlo / bwta

Automatically exported from code.google.com/p/bwta
GNU Lesser General Public License v3.0
0 stars 0 forks source link

SVN source fails to compile with boost 1.40 and CGAL 3.5.1 #6

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Download, compile and and install boost 1.40 (with cmake)
2. Download, compile and install CGAL 3.5.1 (with cmake)
3. Setup the VC++ 9.0 include and library directories.
3. Use BWTA svn source (r132) and try to compile using VC++ 9.0

What is the expected output? What do you see instead?
Compilation fails because of #define DEBUG_DRAW 1 in functions.h (since I
don't have the Qt stuff)

After uncommenting this line compilation fails in get_voroni_edges.cpp at
line 16:  SDG2::Construct_sdg_bisector_segment_2
get_edge=sdg.construct_sdg_bisector_segment_2_object(); with "cannot access
protected typedef declared in class 'CGAL::Segment_Delaunay_graph_2<Gt>'"

What version of the product are you using? On what operating system?
VC++ 9.0
CGAL 3.5.1
Boost 1.40
Windows 7 Ultimate

Original issue reported on code.google.com by tren...@gmail.com on 26 Feb 2010 at 7:24

GoogleCodeExporter commented 9 years ago
I get this error too.
And I tried a strange solution... simply opened CGAL\Segment_Delaunay_graph_2.h 
and
added 'public:' on line 1253, so these needed stuffs are now public.
It compiles OK, but my AI module looks for version 1.41 of boost lib, but there 
is
1.38, Maybe because i compiled BWTA with 1.41. Now I'll try with 1.38. (it will 
be
best, if i find how to create lib file from that source)

Original comment by Nuclear...@gmail.com on 26 Feb 2010 at 11:27

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
Finally it works (with boost 1.38). Maybe I forgot to copy the new BWAPI header 
files
in BWTA's include dir.
With my AI module it analyzes the map, but crashes, when I tell him to draw all
things on the map. But with the initial AI module it draws everything OK, so the
problem is (maybe) in my code.

Original comment by Nuclear...@gmail.com on 27 Feb 2010 at 1:14

GoogleCodeExporter commented 9 years ago
This is really unfortunate. Changing the CGAL source like this is not really a 
valid
option but a hack.

Original comment by tren...@gmail.com on 27 Feb 2010 at 12:05

GoogleCodeExporter commented 9 years ago
I know, but I don't think that it's so bad, when I do this for fun (writing C++ 
code,
creating a Starcraft bot). When a solution comes, I'll recompile it.

Original comment by Nuclear...@gmail.com on 27 Feb 2010 at 4:50

GoogleCodeExporter commented 9 years ago
Yeah its a bit of a hack but BWAPI is a huge hack in itself. Also I couldn't 
find any
easier way of accessing the protected functions.

Original comment by lowerlo...@gmail.com on 4 Mar 2010 at 9:43

GoogleCodeExporter commented 9 years ago
I've attached a patch that allows one to access the protected members without 
having
to change the CGAL source code. It's actually only a few lines of code :)

The patch also contains files that allow one to use cmake to build bwta. 
Some improvements with that are:
* automatically finds and links boost libs automatically (uses static boost 
libraries
per default)
* automatically finds and links to the installed CGAL library.
* allows one to change to change the DEBUG_DRAW variable from cmake-gui. This 
allows
one to switch of the dependency to Qt without hacking in the code. (No cmake 
support
for Qt added since I don't have it installed)
* since a normal CGAL installation would require cmake anyways using it does 
not cost
anything. Still, the normal  VC++ solution is retained.

I hope it gets added to svn :)

Original comment by tren...@gmail.com on 25 Mar 2010 at 5:29

Attachments:

GoogleCodeExporter commented 9 years ago

Original comment by lowerlo...@gmail.com on 11 Apr 2010 at 8:09

GoogleCodeExporter commented 9 years ago
Still not in svn?

Original comment by tren...@gmail.com on 17 Apr 2010 at 12:32

GoogleCodeExporter commented 9 years ago
The attached patch should now work for r141. It adds cmake support and makes 
bwta 
compilable with CGAL 3.5.1 without changing CGAL source.

Original comment by tren...@gmail.com on 18 Apr 2010 at 6:49

Attachments:

GoogleCodeExporter commented 9 years ago
This attached patch fixes the above problem and additionally fixes the warnings 
about 
unsigned / signed mismatch. This way bwta should compile without any warning or 
error 
messages.

Original comment by tren...@gmail.com on 20 Apr 2010 at 5:27

Attachments:

GoogleCodeExporter commented 9 years ago
Thanks. Applied patch in r144.

Original comment by lowerlo...@gmail.com on 20 May 2010 at 11:15