[Nauty] installing Nauty on a PC
Brendan McKay
bdm at cs.anu.edu.au
Sun Nov 17 01:25:01 EST 2002
* Sterten at aol.com <Sterten at aol.com> [021116 20:15]:
> >ALSO: I wonder if anyone got version 2.2 running on a PC.
> >If so please be in touch.
>
> I tried, but after some time I gave up.
> I have a working version of 2.0, (which took me quite some
> time to install) , so it's not very important
> for me to get 2.2 installed.
>
> I use GCC203, DJGPP, under plain DOS.
>
> here is an excert of errors which I encountered:
Hi, thanks for your reply. It seems to me that all the problems
you encountered are compiler errors. However, it may be possible
to work around them.
> naututil.c:67: redefinition of `long int seed'
> naututil.h:154: `long int seed' previously declared here
This situation is where two declarations appear:
long seed; /* in naututil.h */
long seed = 1; /* in naututil.c */
This is legal and the current C standard has an identical example.
The likely work-around is to add "extern" to the first declaration.
I'll do that but check it doesn't break anything before releasing it.
> D:\GCC203>gpp nautil.c
>
> nautil.c: In function `void doref(graph *, int *, int *, int, int *, int *,
> perm
> utation *, set *, int *, void (*)(), void (*)(), int, int, int, int, int,
> int)':
>
> nautil.c:473: too many arguments to function
The situation here is that the function parameter indicated by
"void (*)()" in the parameter list is being invoked with a list
of parameters. This is legal because a declaration without a
parameter list specified (like "()") is compatible with any
actual parameter list. This is an important rule in C because
otherwise it is impossible to declare functions with a parameter
whose type is a function that has a function parameter of the
same type. However, it might be possible to add the parameter
types of the function parameters in this case; I'll check.
> D:\GCC203>gpp nauty.c
>
> nauty.c: In function `int firstpathnode0(int *, int *, int, int, tcnode *)':
>
> nauty.c:549: ANSI C++ prohibits conversion from `(graph *, int *, int *, int,
> in
> t *, permutation *, set *, int *, int, int)' to `(...)'
This is the same problem and may have the same workaround.
> D:\GCC203>gpp nautaux.c
>
> d:/gcc203/lib/crt0.o(.data+0xc2):crt0.s: undefined reference to `main'
> d:/gcc203/tmp\cc1lRLci.o(.text+0x75):nautaux.c: undefined reference to
> `alloc_error'
These are link-type errors but you should not be linking this
file by itself.
Cheers, Brendan.
More information about the Nauty
mailing list