Re: [Mingw-users] PROPER COMPILATION BUILD PROCESS IN WIN32

45 views
Skip to first unread message

Jared Maddox

unread,
Jan 22, 2012, 11:12:14 PM1/22/12
to mingw...@lists.sourceforge.net
> Date: Sun, 22 Jan 2012 14:39:15 +0000
> From: Sonya Blade <sonyabl...@hotmail.com>
> Subject: Re: [Mingw-users] PROPER COMPILATION BUILD PROCESS IN WIN32
> To: <sfha...@hotmail.com>, <mingw...@lists.sourceforge.net>
> Message-ID: <DUB109-W8673F72BE...@phx.gbl>
> Content-Type: text/plain; charset="windows-1254"

> The problem is not, simply to convert the given project, it's a high chance
> that I'll come across on the net that will require the automated compilation
> via MinGw one way or the other. Main goal is to understand the logic of how
> to use it.
>

The usual process is to type these three lines, hitting enter (or your
keyboard's equivalent) after each line:

./configure
make
make install

The *nix build system that make comes from (as well as the GNU build
system, which extends the *nix build system with configure) is
flexible enough that a project can choose to do something different,
and possibly something more complex, but usually those three lines
(and occasionally extra options to them) are all you need.

Most of the complexity is concealed inside configure (which itself
is/requires several different programs and project files to do complex
things; it was created to help programmers recognize and compensate
for differences between various operating systems).

> Isn't there any visual editor for compilation process ?

You could probably find one (or more) but they'd just be issuing text
commands, so you'd benefit more from using a command-line, so that you
can watch the results. A visual editor might make sense for actual
code MODIFICATIONS though, and if you find one that you like with a
text-prompt then it would probably be the best of both worlds.

> Some projects comes with make file, other comes with make+configuration
> files, so that configuration file is not obligatory?

No they aren't, and makefiles aren't obligatory either. The only
things that are genuinely required are the relevant compilers (e.g.
f77) and the programs necessary to turn the output of the compilers
into the end-result that you're looking for (compilers normally
produce 'object files', which are essentially pieces of a program
instead of an actual program; these are then 'linked' with libraries
to create programs and/or more libraries).

> How is created those files (configuration, make etc... ) manually or
> automaticall ?

Yes (meaning: Both). The instructions for creating the files for make
and configure are available online, though I've personally only tried
my hand at make. Note that different versions of make are capable of
different 'extra' things, some things don't work in some versions of
make!

1) configure and make are both command-line tools.

2) configure looks for several files, and uses them and some
information already located on your computer to create a Makefile. If
the project doesn't say to use configure, then that usually means that
a Makefile is already included (note that while there are several
standard names for makefiles, they're all similar to each other, such
as GNUMakefile, Makefile, and makefile).

3) make looks for a makefile (it will automatically look for one with
a preference for particular ones, but you can force it to use a
specific one if you want), and then uses that makefile to issue
commands to more command-line tools. The details of what it does
depend on the instructions inside the makefile, the 'freshness' (date
of the last modification) of files that are listed inside the
makefile, and any 'targets' that you specify on the command line.

4) "make install" runs the instructions specified inside a makefile,
in order to achieve the "install" target. It commonly allows such
things as specifying a folder location to install the resulting
program(s) into.

It's also possible to use a sh file (shell script file) as a
replacement for one or both of these (if I recall correctly, both were
originally replacements for shell scripts).

> If automatic, by which tool (Cmake) ??

I believe that CMake can create makefiles (and projects for MSVC,
etc.), but CMake is completely different from configure or make.

------------------------------------------------------------------------------
Try before you buy = See our experts in action!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-dev2
_______________________________________________
MinGW-users mailing list
MinGW...@lists.sourceforge.net

This list observes the Etiquette found at
http://www.mingw.org/Mailing_Lists.
We ask that you be polite and do the same. Disregard for the list etiquette may cause your account to be moderated.

_______________________________________________
You may change your MinGW Account Options or unsubscribe at:
https://lists.sourceforge.net/lists/listinfo/mingw-users
Also: mailto:mingw-use...@lists.sourceforge.net?subject=unsubscribe

Sonya Blade

unread,
Jan 23, 2012, 4:29:28 PM1/23/12
to mingw...@lists.sourceforge.net
> Tried that w/o success, same issue couldn't find the headers again.

> ./src/common/typdefs.h :6:28 error CGAL/Exact_predicates_inexact_constructions_kernel.h :No such file or directory
>Show the command issued by Make which triggered this error message,
>and maybe someone will have a clue.

To me everything seems normal, just a couple macros defined
in my idea weak havoc is those code lines in makefile :
......
CGAL_INCLUDE = -I C:/Program Files/CGAL-3.9/include
.......
OBJ = vertex2.o halfedge2.o edge2.o face2.o boundary2.o bbox2.o complex2.o \
      dualgraph.o regiongraph.o sptree.o edgekey.o polygon2.o tri2.o quad2.o \
      iomesh2.o mesh2.o compquad.o gencontrol.o cqm.o
 
cqm: $(OBJ)
 $(CC) $(LDFLAGS) $(OBJ) -o cqm $(LIB_FLAGS) $(LIBS);
# mv cqm ./bin/cqm
 
vertex2.o: $(INC1)/typedefs.h $(INC2)/vertex2attrib.h \
           $(INC2)/vertex2.h $(INC2)/vertex2.cc
 $(CC) $(CFLAGS) $(INC2)/vertex2.cc $(INC_FLAGS) $(CGAL_INCLUDE)
 
halfedge2.o: $(INC2)/vertex2.h \
             $(INC2)/halfedge2.h $(INC2)/halfedge2.cc
 $(CC) $(CFLAGS) $(INC2)/halfedge2.cc $(INC_FLAGS) $(CGAL_INCLUDE)

Emanuel Falkenauer

unread,
Jan 23, 2012, 7:58:39 PM1/23/12
to MinGW Users List

Hi Sonya,

 

>CGAL_INCLUDE = -I C:/Program Files/CGAL-3.9/include

IMHO you should move your installation from "C:/Program Files" to a directory with NO SPACES, say "C:/Programs" created for that purpose. I've seen very strange behavior in my MinGW as long as my directories contained spaces - it looks like somewhere in the parameter-passing among the various tools, spaces are interpreted as "end-of-param", which would in your case result in the include directory being just "C:/Program", which obviously does not exist nor contain your headers.

 

You may also wish to first put quotes around your space-containing directory, i.e.

 

CGAL_INCLUDE = -I "C:/Program Files/CGAL-3.9/include"

 

but honestly even that didn't always work for me.

 

 

Good luck (I do agree it's not simple)!

 

Emanuel

 

Eli Zaretskii

unread,
Jan 23, 2012, 10:52:36 PM1/23/12
to MinGW Users List
> From: Sonya Blade <sonyabl...@hotmail.com>
> Date: Mon, 23 Jan 2012 21:29:28 +0000

>
> > Tried that w/o success, same issue couldn't find the headers again.
> >
> > ./src/common/typdefs.h :6:28 error CGAL/Exact_predicates_inexact_constructions_kernel.h :No such file or directory
> >Show the command issued by Make which triggered this error message,
> >and maybe someone will have a clue.
>
> To me everything seems normal, just a couple macros defined
> in my idea weak havoc is those code lines in makefile :
> ......
> CGAL_INCLUDE = -I C:/Program Files/CGAL-3.9/include

This will never work unless you quote the file name with embedded
whitespace.

> OBJ = vertex2.o halfedge2.o edge2.o face2.o boundary2.o bbox2.o complex2.o \
> dualgraph.o regiongraph.o sptree.o edgekey.o polygon2.o tri2.o quad2.o \
> iomesh2.o mesh2.o compquad.o gencontrol.o cqm.o
>
> cqm: $(OBJ)
> $(CC) $(LDFLAGS) $(OBJ) -o cqm $(LIB_FLAGS) $(LIBS);
> # mv cqm ./bin/cqm
>
> vertex2.o: $(INC1)/typedefs.h $(INC2)/vertex2attrib.h \
> $(INC2)/vertex2.h $(INC2)/vertex2.cc
> $(CC) $(CFLAGS) $(INC2)/vertex2.cc $(INC_FLAGS) $(CGAL_INCLUDE)
>
> halfedge2.o: $(INC2)/vertex2.h \
> $(INC2)/halfedge2.h $(INC2)/halfedge2.cc
> $(CC) $(CFLAGS) $(INC2)/halfedge2.cc $(INC_FLAGS) $(CGAL_INCLUDE)

That's not the command, these are the macros used to construct the
command. I meant show the actual GCC compilation command that caused
the error messages.

------------------------------------------------------------------------------
Keep Your Developer Skills Current with LearnDevNow!


The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!

http://p.sf.net/sfu/learndevnow-d2d

Sonya Blade

unread,
Jan 24, 2012, 2:04:04 AM1/24/12
to mingw...@lists.sourceforge.net
> > > Tried that w/o success, same issue couldn't find the headers again.
> > >
> > > ./src/common/typdefs.h :6:28 error CGAL/Exact_predicates_inexact_constructions_kernel.h :No such file or directory
> > >Show the command issued by Make which triggered this error message,
> > >and maybe someone will have a clue.
> >
> > To me everything seems normal, just a couple macros defined
> > in my idea weak havoc is those code lines in makefile :
> > ......
> > CGAL_INCLUDE = -I C:/Program Files/CGAL-3.9/include
>
> This will never work unless you quote the file name with embedded
> whitespace.

Removing the spaces and istalling the CGAL to directory which doesn't include spaces, eliminates the problem of recognition of
inlcude files.
Thanks, I wouldn't spot that myself. Albeit I recall there was instruction at the very begining of documentation for that in MinGW,
possibly I have underestimated it.
 
> > OBJ = vertex2.o halfedge2.o edge2.o face2.o boundary2.o bbox2.o complex2.o \
> > dualgraph.o regiongraph.o sptree.o edgekey.o polygon2.o tri2.o quad2.o \
> > iomesh2.o mesh2.o compquad.o gencontrol.o cqm.o
> >
> > cqm: $(OBJ)
> > $(CC) $(LDFLAGS) $(OBJ) -o cqm $(LIB_FLAGS) $(LIBS);
> > # mv cqm ./bin/cqm
> >
> > vertex2.o: $(INC1)/typedefs.h $(INC2)/vertex2attrib.h \
> > $(INC2)/vertex2.h $(INC2)/vertex2.cc
> > $(CC) $(CFLAGS) $(INC2)/vertex2.cc $(INC_FLAGS) $(CGAL_INCLUDE)
> >
> > halfedge2.o: $(INC2)/vertex2.h \
> > $(INC2)/halfedge2.h $(INC2)/halfedge2.cc
> > $(CC) $(CFLAGS) $(INC2)/halfedge2.cc $(INC_FLAGS) $(CGAL_INCLUDE)
>
> That's not the command, these are the macros used to construct the
> command. I meant show the actual GCC compilation command that caused
> the error messages.
GCC compilation, is just going into folder where the project resides via MSYS and type "make".
I don't call for ./configure cause there is no file associated with configuration.  Simply makefile.
 
Interesting thing is, If I run the make this time it produces a lot of errors related with CGAL(mostly syntax errors), this shouldn't supposed to be since CGAL is widely used library and have a stable release.
Some of Errors :
"::boost has not been declared"
"::value has not been decalred"
"expected primary expression before '>' token"
...
..
 
And the one of code portion that causes this erros (There are plenty of code snippets which produces
similar syntax errors like that in CGAL directory)
 
template < class NT1, class NT2 >
        void operator()(
                const NT1& x,
                const NT2& y,
                Type& q,
                Type& r ) const {
            typedef Coercion_traits< NT1, NT2 > CT;
            typedef typename CT::Type Type;
            BOOST_STATIC_ASSERT((
              ::boost::is_same<Type , Type >::value));
           
            typename Coercion_traits< NT1, NT2 >::Cast cast;
            operator()( cast(x), cast(y), q, r );         
        }

 

Emanuel Falkenauer

unread,
Jan 24, 2012, 9:29:39 AM1/24/12
to MinGW Users List

Hi,

 
Interesting thing is, If I run the make this time it produces a lot of errors related with CGAL(mostly syntax errors), this shouldn't supposed to be since CGAL is widely used library and have a stable release.
Some of Errors :
"::boost has not been declared"
"::value has not been decalred"
"expected primary expression before '>' token"
...
..

Just a cheap shot: could it be that you're compiling in pure C, rather than C++?

 

Sonya Blade

unread,
Jan 24, 2012, 10:52:13 PM1/24/12
to mingw...@lists.sourceforge.net

I've also tried that, both with gcc and g++ compilers  w/o success.

 

Emanuel Falkenauer

unread,
Jan 24, 2012, 11:10:36 PM1/24/12
to MinGW Users List

Hi Sonya,

 

>Some of Errors :
>"::boost has not been declared"
>"::value has not been decalred"
>"expected primary expression before '>' token"
>...
>..
>Just a cheap shot: could it be that you're compiling in pure C, rather than C++?

 

I've also tried that, both with gcc and g++ compilers  w/o success.

 

Oh I'm sure you did (you're clearly a smart girl ;-) )… but I've found myself that "explaining things" to all these tools is often trickier than it seems (in particular, g++ CAN compile in pure C, if I'm not mistaken) - can you give the actual compile command that's sent to the compiler (gcc or g++) to compile your error-strewn source?

 

Cheers,

 

Emanuel

 

Sonya Blade

unread,
Jan 24, 2012, 11:36:51 PM1/24/12
to mingw...@lists.sourceforge.net
I think that message is been processed to the compiler
cqm : $(OBJ) gcc -g -o -L/usr/local/lib
 
where OBJ is:

OBJ = vertex2.o halfedge2.o edge2.o face2.o boundary2.o bbox2.o complex2.o \
      dualgraph.o regiongraph.o sptree.o edgekey.o polygon2.o tri2.o quad2.o \
      iomesh2.o mesh2.o compquad.o gencontrol.o cqm.o

I recently noticed that command calling is kind of weird, is that OBJ macro can be called before
gcc compiler command ? Anyway compiler doesn't complain about that.
 
 

>Hi Sonya,

>Some of Errors :
>"::boost has not been declared"
>"::value has not been decalred"
>"expected primary expression before '>' token"
>...
>..
>Just a cheap shot: could it be that you're compiling in pure C, rather than C++?

 

>I've also tried that, both with gcc and g++ compilers  w/o success.

>Oh I'm sure you did (you're clearly a smart girl ;-) )� but I've found myself that "explaining >things" to all these tools is often trickier than it seems (in particular, g++ CAN compile in pure >C, if I'm not mistaken) - can you give the actual compile command that's sent to the compiler >(gcc or g++) to compile your error-strewn source?

>Cheers,

 

Emanuel

 


KHMan

unread,
Jan 24, 2012, 11:58:21 PM1/24/12
to MinGW Users List
On 1/25/2012 12:36 PM, Sonya Blade wrote:
> I think that message is been processed to the compiler
> cqm : $(OBJ) gcc -g -o -L/usr/local/lib
>
> where OBJ is:
> OBJ = vertex2.o halfedge2.o edge2.o face2.o boundary2.o bbox2.o
> complex2.o \
> dualgraph.o regiongraph.o sptree.o edgekey.o polygon2.o tri2.o
> quad2.o \
> iomesh2.o mesh2.o compquad.o gencontrol.o cqm.o
>
> I recently noticed that command calling is kind of weird, is that
> OBJ macro can be called before
> gcc compiler command ? Anyway compiler doesn't complain about that.

It's pretty much impossible to diagnose anything if we see only
bits and snippets. That's why we're asking for "the actual compile
command".

This would mean the actual command line generated by the make, and
also the resulting messages. Copy and paste the whole thing from
your shell window, trim a bit if it's too long.

Here is an example of the kind of thing we need:

$ make mingw
cd src && make mingw
make[1]: Entering directory `/home/khman/lua/lua-5.2.0/src'
make "LUA_A=lua52.dll" "LUA_T=lua.exe" \
"AR=gcc -shared -o" "RANLIB=strip --strip-unneeded" \
"SYSCFLAGS=-DLUA_BUILD_AS_DLL" "SYSLIBS=" "SYSLDFLAGS=-s"
lua.exe
make[2]: Entering directory `/home/khman/lua/lua-5.2.0/src'
gcc -O2 -Wall -DLUA_COMPAT_ALL -DLUA_BUILD_AS_DLL -c -o llex.o
llex.c
gcc -shared -o lua52.dll llex.o
llex.o:llex.c:(.text+0x1f): undefined reference to `luaS_new'
...


--
Cheers,
Kein-Hong Man (esq.)
Kuala Lumpur, Malaysia

Emanuel Falkenauer

unread,
Jan 25, 2012, 12:06:30 AM1/25/12
to MinGW Users List
Very well put, Kein-Hong!

-----Message d'origine-----
De : KHMan [mailto:kein...@gmail.com]
Envoyé : Wednesday, 25 January, 2012 05:58
À : MinGW Users List
Objet : Re: [Mingw-users] PROPER COMPILATION BUILD PROCESS IN WIN32

Sonya Blade

unread,
Jan 25, 2012, 12:16:37 AM1/25/12
to mingw...@lists.sourceforge.net
Sorry,
 
HERE IS THE COMPILER COMMAND PRODUCED BY MAKE
$ make
gcc -g -c -Wall -frounding-math ./src/hedge/vertex2.cc -I./src/common -I./src/he
dge -I./src/bmesh -I./src/interface -I./src/quad -I/usr/local/include -I C:/CGAL
-3.9/include

HERE IS THE RESULTING ERROR OF THE COMPILER (It was too long I coppied the last snippets of it )
 
C:/CGAL-3.9/include/CGAL/Interval_nt.h:1351: error: there are no arguments to 'B
OOST_USING_STD_MAX' that depend on a template parameter, so a declaration of 'BO
OST_USING_STD_MAX' must be available
C:/CGAL-3.9/include/CGAL/Interval_nt.h:1352: error: there are no arguments to 'B
OOST_USING_STD_MIN' that depend on a template parameter, so a declaration of 'BO
OST_USING_STD_MIN' must be available
C:/CGAL-3.9/include/CGAL/Interval_nt.h:1356: error: no matching function for cal
l to 'make_pair(<unresolved overloaded function type>, <unresolved overloaded fu
nction type>)'
C:/CGAL-3.9/include/CGAL/Interval_nt.h:1353: error: expected primary-expression
before '(' token
C:/CGAL-3.9/include/CGAL/Interval_nt.h:1355: error: expected ')' before 'BOOST_P
REVENT_MACRO_SUBSTITUTION'
C:/CGAL-3.9/include/CGAL/Interval_nt.h:1356: error: expected ')' before 'BOOST_P
REVENT_MACRO_SUBSTITUTION'
C:/CGAL-3.9/include/CGAL/Interval_nt.h:1356: error: no matching function for cal
l to 'make_pair(<unresolved overloaded function type>, <unresolved overloaded fu
nction type>)'
C:/CGAL-3.9/include/CGAL/Interval_nt.h: In member function 'CGAL::Interval_nt<Pr
otected> CGAL::Interval_traits<CGAL::Interval_nt<Protected> >::Intersection::ope
rator()(const CGAL::Interval_nt<Protected>&, const CGAL::Interval_nt<Protected>&
) const':
C:/CGAL-3.9/include/CGAL/Interval_nt.h:1365: error: there are no arguments to 'B
OOST_USING_STD_MAX' that depend on a template parameter, so a declaration of 'BO
OST_USING_STD_MAX' must be available
C:/CGAL-3.9/include/CGAL/Interval_nt.h:1366: error: there are no arguments to 'B
OOST_USING_STD_MIN' that depend on a template parameter, so a declaration of 'BO
OST_USING_STD_MIN' must be available
C:/CGAL-3.9/include/CGAL/Interval_nt.h:1367: error: expected ')' before 'BOOST_P
REVENT_MACRO_SUBSTITUTION'
C:/CGAL-3.9/include/CGAL/Interval_nt.h:1368: error: expected ')' before 'BOOST_P
REVENT_MACRO_SUBSTITUTION'
In file included from C:/CGAL-3.9/include/CGAL/Residue.h:31,
                 from C:/CGAL-3.9/include/CGAL/Modular_traits.h:24,
                 from C:/CGAL-3.9/include/CGAL/int.h:29,
                 from C:/CGAL-3.9/include/CGAL/number_type_basic.h:81,
                 from C:/CGAL-3.9/include/CGAL/basic.h:35,
                 from C:/CGAL-3.9/include/CGAL/Cartesian/Cartesian_base.h:27,
                 from C:/CGAL-3.9/include/CGAL/Simple_cartesian.h:27,
                 from C:/CGAL-3.9/include/CGAL/Exact_predicates_inexact_construc
tions_kernel.h:27,
                 from ./src/common/typedefs.h:35,
                 from ./src/hedge/vertex2.h:34,
                 from ./src/hedge/vertex2.cc:31:
C:/CGAL-3.9/include/CGAL/Modular_arithmetic/Residue_type.h: At global scope:
C:/CGAL-3.9/include/CGAL/Modular_arithmetic/Residue_type.h:55: error: 'boost' ha
s not been declared
C:/CGAL-3.9/include/CGAL/Modular_arithmetic/Residue_type.h:55: error: expected '
{' before 'ordered_field_operators1'
C:/CGAL-3.9/include/CGAL/Modular_arithmetic/Residue_type.h:55: error: expected i
nitializer before '<' token
./src/hedge/vertex2.cc:63: error: expected '}' at end of input
make: *** [vertex2.o] Error 1

KHMan

unread,
Jan 25, 2012, 12:44:53 AM1/25/12
to MinGW Users List
On 1/25/2012 1:16 PM, Sonya Blade wrote:
> Sorry,
>
> *HERE IS THE COMPILER COMMAND PRODUCED BY MAKE *

> $ make
> gcc -g -c -Wall -frounding-math ./src/hedge/vertex2.cc
> -I./src/common -I./src/he
> dge -I./src/bmesh -I./src/interface -I./src/quad
> -I/usr/local/include -I C:/CGAL
> -3.9/include
>
> *HERE IS THE RESULTING ERROR OF THE COMPILER (It was too long I
> coppied the last snippets of it ) *

>
> C:/CGAL-3.9/include/CGAL/Interval_nt.h:1351: error: there are no
> arguments to 'B
> OOST_USING_STD_MAX' that depend on a template parameter, so a
> declaration of 'BO
> OST_USING_STD_MAX' must be available

The front 10-20 error lines are also often useful -- they show
what initially blew up. Since you seem to lack experience
troubleshooting this kind of thing, please be patient and make
sure you know [1], specifically the things that could help you
(and us) on your compile problem. Lack of experience is not a bad
thing, we all started with a lack of experience too.

From what I can see on the CGAL site, I presume cmake ran
successfully. Not sure if the cmake script explicitly checks for
Boost. I don't have much experience with Boost on C++, so I'll
leave this to others.

My wild guess would be that Boost is missing or not configured to
CGAL's liking. Hard to say for sure, but as we try to zero in on
the problem, we'd probably need more information, e.g. how did you
configure CGAL, what libraries are installed for CGAL, what is in
the Makefile, does your g++ work for other apps, etc. I jumped in
on this thread late so sorry if I've missed things said previously.

[1] http://catb.org/esr/faqs/smart-questions.html

--
Cheers,
Kein-Hong Man (esq.)
Kuala Lumpur, Malaysia

------------------------------------------------------------------------------

Sonya Blade

unread,
Jan 25, 2012, 4:09:02 AM1/25/12
to mingw...@lists.sourceforge.net
>
> The front 10-20 error lines are also often useful -- they show
> what initially blew up. Since you seem to lack experience
> troubleshooting this kind of thing, please be patient and make
> sure you know [1], specifically the things that could help you
> (and us) on your compile problem. Lack of experience is not a bad
> thing, we all started with a lack of experience too.
>
> From what I can see on the CGAL site, I presume cmake ran
> successfully. Not sure if the cmake script explicitly checks for
> Boost. I don't have much experience with Boost on C++, so I'll
> leave this to others.
>
> [1] http://catb.org/esr/faqs/smart-questions.html
>
> --
> Cheers,
> Kein-Hong Man (esq.)
> Kuala Lumpur, Malaysia
 
First of all I'm not an expert in that area, nor do I pretend so, when I it comes to building application from command like compilers. I just have a
moderate level of programming languages (mainly pascal) and moderate level of OOP perception.
But what puts me so eager to solve that problem is (nothing speciall about CQmesh) ,I 've come across with such a source codes in the past tremendously. I've also tried to solve/compile/build that in the past but easily tired and give up. But this time I really want to learn how it's been compiled, of course if there are people out there to help me , as it's been said, this time I play it to the bone.

To summarize the issue for Kein-Hong, I just tried to compile the legacy code obtained from net written by scholar in that URL, http://www.dimap.ufrn.br/~mfsiqueira/Marcelo_Siqueiras_Web_Spot/cqmesh.html 
The software was originally developed for Unix based systems in C++, but the originator also hints that with little effort (dubious here) software
can be ported to Win based systems. But nowhere mentioned that it can/should be done with MInGW, not a clue also on C++ compiler standart.
originator noted that software requires CGAL and GMP library.
 
My starting point was, since MinGW includes gcc and g++ compilers what prevents me to compile the given code. If it's been intended for Unix/Linux
then native compiler set should be used something like CygWin or MinGW.
 
> My wild guess would be that Boost is missing or not configured to
> CGAL's liking. Hard to say for sure, but as we try to zero in on
> the problem, we'd probably need more information, e.g. how did you
> configure CGAL, what libraries are installed for CGAL, what is in
> the Makefile, does your g++ work for other apps, etc. I jumped in
> on this thread late so sorry if I've missed things said previously.
>
  • For CGAL installation/configuration I did nothing special, I  installed the exe file from web site and just pointed out to Env. Path to CGAL directory(If thats not been already handled automatically by CGAL installer).
  • I 've uploaded the make file in the previous posts, if you wish I can do it again , but didn't show up as an attachement but gets into the mail content.
  • I'm sure that I've working copy of GCC suite cause it produces consistent results and files for simple projects.
 
I re-post the first lines of reulting errors :
$ make
gcc -g -c -Wall -frounding-math ./src/hedge/vertex2.cc -I./src/common -I./src/hedge -I./src/bmesh -I./src/interface -I./
src/quad -I/usr/local/include -I C:/CGAL-3.9/include
In file included from C:/CGAL-3.9/include/CGAL/basic.h:28,

                 from C:/CGAL-3.9/include/CGAL/Cartesian/Cartesian_base.h:27,
                 from C:/CGAL-3.9/include/CGAL/Simple_cartesian.h:27,
                 from C:/CGAL-3.9/include/CGAL/Exact_predicates_inexact_constructions_kernel.h:27,

                 from ./src/common/typedefs.h:35,
                 from ./src/hedge/vertex2.h:34,
                 from ./src/hedge/vertex2.cc:31:
C:/CGAL-3.9/include/CGAL/config.h:37:28: error: boost/config.hpp: No such file or directory
C:/CGAL-3.9/include/CGAL/config.h:45:34: error: CGAL/compiler_config.h: No such file or directory
In file included from C:/CGAL-3.9/include/CGAL/basic.h:35,

                 from C:/CGAL-3.9/include/CGAL/Cartesian/Cartesian_base.h:27,
                 from C:/CGAL-3.9/include/CGAL/Simple_cartesian.h:27,
                 from C:/CGAL-3.9/include/CGAL/Exact_predicates_inexact_constructions_kernel.h:27,

                 from ./src/common/typedefs.h:35,
                 from ./src/hedge/vertex2.h:34,
                 from ./src/hedge/vertex2.cc:31:
C:/CGAL-3.9/include/CGAL/number_type_basic.h:50:41: error: boost/type_traits/is_same.hpp: No such file or directory
In file included from C:/CGAL-3.9/include/CGAL/number_type_basic.h:59,

                 from C:/CGAL-3.9/include/CGAL/basic.h:35,
                 from C:/CGAL-3.9/include/CGAL/Cartesian/Cartesian_base.h:27,
                 from C:/CGAL-3.9/include/CGAL/Simple_cartesian.h:27,
                 from C:/CGAL-3.9/include/CGAL/Exact_predicates_inexact_constructions_kernel.h:27,

                 from ./src/common/typedefs.h:35,
                 from ./src/hedge/vertex2.h:34,
                 from ./src/hedge/vertex2.cc:31:
C:/CGAL-3.9/include/CGAL/Coercion_traits.h:37:49: error: boost/iterator/transform_iterator.hpp: No such file or director
y
In file included from C:/CGAL-3.9/include/CGAL/Algebraic_structure_traits.h:28,
                 from C:/CGAL-3.9/include/CGAL/number_type_basic.h:60,

                 from C:/CGAL-3.9/include/CGAL/basic.h:35,
                 from C:/CGAL-3.9/include/CGAL/Cartesian/Cartesian_base.h:27,
                 from C:/CGAL-3.9/include/CGAL/Simple_cartesian.h:27,
                 from C:/CGAL-3.9/include/CGAL/Exact_predicates_inexact_constructions_kernel.h:27,

                 from ./src/common/typedefs.h:35,
                 from ./src/hedge/vertex2.h:34,
                 from ./src/hedge/vertex2.cc:31:
C:/CGAL-3.9/include/CGAL/type_traits.h:24:53: error: boost/type_traits/is_base_and_derived.hpp: No such file or director
y
 
 

 

KHMan

unread,
Jan 25, 2012, 5:05:55 AM1/25/12
to MinGW Users List
On 1/25/2012 5:09 PM, Sonya Blade wrote:
> [snip snip snip]

> But what puts me so eager to solve that problem is (nothing
> speciall about CQmesh) ,I 've come across with such a source codes
> in the past tremendously. I've also tried to solve/compile/build
> that in the past but easily tired and give up. But this time I
> really want to learn how it's been compiled, of course if there
> are people out there to help me , as it's been said, this time I
> play it to the bone.
>
> To summarize the issue for Kein-Hong, I just tried to compile the
> legacy code obtained from net written by scholar in that URL,
> http://www.dimap.ufrn.br/~mfsiqueira/Marcelo_Siqueiras_Web_Spot/cqmesh.html
>
> The software was originally developed for Unix based systems in
> C++, but the originator also hints that with little effort
> (dubious here) software
> can be ported to Win based systems. But nowhere mentioned that it
> can/should be done with MInGW, not a clue also on C++ compiler
> standart.
> originator noted that software requires CGAL and GMP library.
>
> My starting point was, since MinGW includes gcc and g++ compilers
> what prevents me to compile the given code. If it's been intended
> for Unix/Linux
> then native compiler set should be used something like CygWin or
> MinGW.

It's hard to troubleshoot remotely -- it only works well (or
quickly) when we can spot something obviously wrong or stuff like
that in the info provided. You are still the best person to spot
issues and solve them. Troubleshooting is an extremely valuable skill.

Here is one item:

C:/CGAL-3.9/include/CGAL/config.h:37:28: error: boost/config.hpp:
> No such file or directory
C:/CGAL-3.9/include/CGAL/config.h:45:34: error:
> CGAL/compiler_config.h: No such file or directory

See the missing files? Either missing libraries or incomplete
configuration. You need to solve it bit by bit. Install,
configure, so that the files are there and the paths allow g++ to
find them.

boost/config.hpp is from boost. You need to check the
prerequisites for CGAL. Compiling libraries like CGAL from source
might be better than installing an executable.

CGAL/compiler_config.h may be a file generated by the cmake run in
CGAL. If it is expected to be there, then something is wrong with
your installation.

You should learn to spot easy stuff like missing files in the
compiler error output and try to sort out what needs to be set up
and configured for CQMesh.

If CQMesh uses standard C library calls, then it "should" compile
on MinGW/g++. The author's hint should not be taken as "little
effort", unless you are comfortable with properly setting up
prerequisites -- those multiple libraries -- for the compiler.

--
Cheers,
Kein-Hong Man (esq.)
Kuala Lumpur, Malaysia

------------------------------------------------------------------------------

Greg Chicares

unread,
Jan 25, 2012, 5:21:00 AM1/25/12
to mingw...@lists.sourceforge.net
On 2012-01-25 09:09Z, Sonya Blade wrote:
[...]

> $ make
> gcc -g -c -Wall -frounding-math ./src/hedge/vertex2.cc -I./src/common -I./src/hedge -I./src/bmesh -I./src/interface -I./
> src/quad -I/usr/local/include -I C:/CGAL-3.9/include

'gcc' is the C compiler. This is C++, so 'g++' should be used instead.


You indicated earlier that the makefile says:

vertex2.o: $(INC1)/typedefs.h $(INC2)/vertex2attrib.h \
$(INC2)/vertex2.h $(INC2)/vertex2.cc
$(CC) $(CFLAGS) $(INC2)/vertex2.cc $(INC_FLAGS) $(CGAL_INCLUDE)

so there's an anomaly in the makefile: by convention, $(CC) is
the C compiler, and $(CXX) is the C++ compiler.

> In file included from C:/CGAL-3.9/include/CGAL/basic.h:28,
> from C:/CGAL-3.9/include/CGAL/Cartesian/Cartesian_base.h:27,
> from C:/CGAL-3.9/include/CGAL/Simple_cartesian.h:27,
> from C:/CGAL-3.9/include/CGAL/Exact_predicates_inexact_constructions_kernel.h:27,
> from ./src/common/typedefs.h:35,
> from ./src/hedge/vertex2.h:34,
> from ./src/hedge/vertex2.cc:31:
> C:/CGAL-3.9/include/CGAL/config.h:37:28: error: boost/config.hpp: No such file or directory

'boost' is a third-party library. Usually its headers would be made
available by an '-I' option, but there doesn't seem to be anything
like '-I /your/path/to/boost' above.

> C:/CGAL-3.9/include/CGAL/config.h:45:34: error: CGAL/compiler_config.h: No such file or directory

I would guess from its name that 'CGAL/compiler_config.h' is supposed
to be generated by running './configure'. Do you find that file in
the CGAL/ directory, or in any other directory?

Earnie Boyd

unread,
Jan 25, 2012, 7:59:03 AM1/25/12
to MinGW Users List
On Wed, Jan 25, 2012 at 5:21 AM, Greg Chicares <gchi...@sbcglobal.net> wrote:
> On 2012-01-25 09:09Z, Sonya Blade wrote:
> [...]
>> $ make
>> gcc -g -c -Wall -frounding-math ./src/hedge/vertex2.cc -I./src/common -I./src/hedge -I./src/bmesh -I./src/interface -I./
>> src/quad -I/usr/local/include -I C:/CGAL-3.9/include
>
> 'gcc' is the C compiler. This is C++, so 'g++' should be used instead.
> You indicated earlier that the makefile says:
>
> vertex2.o: $(INC1)/typedefs.h $(INC2)/vertex2attrib.h \
>           $(INC2)/vertex2.h $(INC2)/vertex2.cc
>  $(CC) $(CFLAGS) $(INC2)/vertex2.cc $(INC_FLAGS) $(CGAL_INCLUDE)
>
> so there's an anomaly in the makefile: by convention, $(CC) is
> the C compiler, and $(CXX) is the C++ compiler.
>

Greg, while I agree this should be practiced, it needs to be stated
that the compilation using GCC of a file ending in .cc, .C and others
will use the language syntax for C++. It matters in the link step
because of the required libraries. The command that Sonya gave isn't
doing any linking so it shouldn't matter if she uses GCC or G++. I
have noticed that using G++ on .c extension will give differing
warnings and error messages but both front ends will _compile_ the
source with the correct syntax.

--
Earnie
-- https://sites.google.com/site/earnieboyd

Sonya Blade

unread,
Jan 25, 2012, 9:33:14 AM1/25/12
to mingw...@lists.sourceforge.net
> >> $ make
> >> gcc -g -c -Wall -frounding-math ./src/hedge/vertex2.cc -I./src/common -I./src/hedge -I./src/bmesh -I./src/interface -I./
> >> src/quad -I/usr/local/include -I C:/CGAL-3.9/include
> >
> > 'gcc' is the C compiler. This is C++, so 'g++' should be used instead.
> > You indicated earlier that the makefile says:
> >
> > vertex2.o: $(INC1)/typedefs.h $(INC2)/vertex2attrib.h \
> >           $(INC2)/vertex2.h $(INC2)/vertex2.cc
> >  $(CC) $(CFLAGS) $(INC2)/vertex2.cc $(INC_FLAGS) $(CGAL_INCLUDE)
> >
> > so there's an anomaly in the makefile: by convention, $(CC) is
> > the C compiler, and $(CXX) is the C++ compiler.
> >
>
> Greg, while I agree this should be practiced, it needs to be stated
> that the compilation using GCC of a file ending in .cc, .C and others
> will use the language syntax for C++. It matters in the link step
> because of the required libraries. The command that Sonya gave isn't
> doing any linking so it shouldn't matter if she uses GCC or G++. I
> have noticed that using G++ on .c extension will give differing
> warnings and error messages but both front ends will _compile_ the
> source with the correct syntax.
>
> --
> Earnie

Originator has made mistake here as well, I noticed that after Earnie's suggestion.Remedied in the makefile.
But AFAIU those makefile is not been intended to create a executable since it doesn't include any linking.
Can I simply do it by replacing "-c" with "-o" command after compilation? 
 
Ok, big portion of errors can be eliminated with getting and correctly including the headers for missing library(e.g. boost , etc....).
I wonder what do you deduce from the following errors(if we disregard all errors related with boost) at a glance?
Is it simply related with missing library directly or indirectly?
 
C:/CGAL-3.9/include/CGAL/Algebraic_structure_traits.h: In member function 'bool CGAL::Algebraic_structure_traits_base<Ty
pe_, CGAL::Unique_factorization_domain_tag>::Divides::operator()(const CT_Type_1&, const CT_Type_2&) const':
C:/CGAL-3.9/include/CGAL/Algebraic_structure_traits.h:237: error: '::boost' has not been declared
C:/CGAL-3.9/include/CGAL/Algebraic_structure_traits.h:237: error: expected '(' before ',' token
C:/CGAL-3.9/include/CGAL/Algebraic_structure_traits.h:237: error: expected primary-expression before '>' token
C:/CGAL-3.9/include/CGAL/Algebraic_structure_traits.h:237: error: '::value' has not been declared
C:/CGAL-3.9/include/CGAL/Algebraic_structure_traits.h:237: error: there are no arguments to 'BOOST_STATIC_ASSERT' that d
epend on a template parameter, so a declaration of 'BOOST_STATIC_ASSERT' must be available
C:/CGAL-3.9/include/CGAL/Algebraic_structure_traits.h:237: note: (if you use '-fpermissive', G++ will accept your code,
but allowing the use of an undeclared name is deprecated)
C:/CGAL-3.9/include/CGAL/Algebraic_structure_traits.h: In member function 'Type_ CGAL::Algebraic_structure_traits_base<T
ype_, CGAL::Euclidean_ring_tag>::Integral_division::operator()(const CT_Type_1&, const CT_Type_2&) const':
C:/CGAL-3.9/include/CGAL/Algebraic_structure_traits.h:271: error: '::boost' has not been declared
C:/CGAL-3.9/include/CGAL/Algebraic_structure_traits.h:271: error: expected '(' before ',' token
C:/CGAL-3.9/include/CGAL/Algebraic_structure_traits.h:271: error: expected primary-expression before '>' token
C:/CGAL-3.9/include/CGAL/Algebraic_structure_traits.h:271: error: '::value' has not been declared
C:/CGAL-3.9/include/CGAL/Algebraic_structure_traits.h:271: error: there are no arguments to 'BOOST_STATIC_ASSERT' that d
epend on a template parameter, so a declaration of 'BOOST_STATIC_ASSERT' must be available
C:/CGAL-3.9/include/CGAL/Algebraic_structure_traits.h: In member function 'Type_ CGAL::Algebraic_structure_traits_base<T
ype_, CGAL::Euclidean_ring_tag>::Gcd::operator()(const CT_Type_1&, const CT_Type_2&) const':
C:/CGAL-3.9/include/CGAL/Algebraic_structure_traits.h:328: error: '::boost' has not been declared
C:/CGAL-3.9/include/CGAL/Algebraic_structure_traits.h:328: error: expected '(' before ',' token
C:/CGAL-3.9/include/CGAL/Algebraic_structure_traits.h:328: error: expected primary-expression before '>' token
C:/CGAL-3.9/include/CGAL/Algebraic_structure_traits.h:328: error: '::value' has not been declared
C:/CGAL-3.9/include/CGAL/Algebraic_structure_traits.h:328: error: there are no arguments to 'BOOST_STATIC_ASSERT' that d
epend on a template parameter, so a declaration of 'BOOST_STATIC_ASSERT' must be available
 
 

Sergio NNX

unread,
Jan 25, 2012, 6:13:59 PM1/25/12
to mingw...@lists.sourceforge.net
I haven't had any problems building cqmesh at all (I'm neither experienced nor an expert). I can see that we have all been contributing here but ..... perhaps it's lack of experience, language barrier or both ...

Find attached a working makefile. I can also attach the application itself, in case someone is interested in. I'm using GCC/G++ 4.5.2

Have fun.


From: sfha...@hotmail.com
To: sonyabl...@hotmail.com
Subject: RE: [Mingw-users] PROPER COMPILATION BUILD PROCESS IN WIN32
Date: Wed, 25 Jan 2012 17:09:21 +0000

Are you ok there?


From: sonyabl...@hotmail.com
To: mingw...@lists.sourceforge.net
Date: Wed, 25 Jan 2012 14:33:14 +0000
Subject: Re: [Mingw-users] PROPER COMPILATION BUILD PROCESS IN WIN32
makefile
Reply all
Reply to author
Forward
0 new messages