nav111 / heekscnc

Automatically exported from code.google.com/p/heekscnc
Other
0 stars 0 forks source link

HeeksCNC r1117 fails to build, due to error in Geom.cpp #252

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Steps to reproduce
1. Compile HeeksCNC r1117 by running `make clean` and `make` in its source 
directory
2. The compiler produces an error:

/home/aaron/HeeksCAD/src/Geom.cpp: In function ‘bool intersect(const gp_Lin&, 
const gp_Lin&, gp_Pnt&)’:
/home/aaron/HeeksCAD/src/Geom.cpp:48: error: ‘heeksCAD’ was not declared in 
this scope
/home/aaron/HeeksCAD/src/Geom.cpp: In function ‘bool intersect(const gp_Pln&, 
const gp_Pln&, gp_Lin&)’:
/home/aaron/HeeksCAD/src/Geom.cpp:79: error: ‘heeksCAD’ was not declared in 
this scope

and then goes on to find the same problem in several other functions in Geom.cpp

Looking in Geom.cpp and searching for "heeksCAD" points me to lines 9-13

#ifdef HEEKSCAD
#define GEOM_TOL wxGetApp().m_geom_tol
#else
#define GEOM_TOL heeksCAD->GetTolerance()
#endif

which seem to say that if HEEKSCAD *is* defined, use the wxwidgets tolerance, 
and if it *isn't* defined to use the heeksCAD tolerance.

I changed line 9 to "#ifndef HEEKSCAD" and it now compiles. 

I am using Ubuntu Karmic 9.10 64-bit.

I have attached the modified Geom.cpp file below.

Original issue reported on code.google.com by decke...@gmail.com on 6 Sep 2010 at 4:31

Attachments:

GoogleCodeExporter commented 8 years ago
I have repeated this.

Original comment by danhe...@gmail.com on 6 Sep 2010 at 8:48

GoogleCodeExporter commented 8 years ago
The original #ifdef was correct, but #include "stdafx.h" was including the 
HeeksCAD one, but it needs to include the HeeksCNC one when built in HeeksCNC, 
so I changed it to #include <stdafx.h> and it compiles OK now.

Original comment by danhe...@gmail.com on 6 Sep 2010 at 10:36