1. Error compiling Euphoria with GCC
- Posted by Jesse Adkins <Tassadar29 at lycos.com>
Mar 06, 2007
-
Last edited Mar 07, 2007
As the topic states, i've got a little problem compiling Euphoria with GCC.
I'm getting the same CLK_TCK not defined problem that i've heard being
mentioned here before. However, i'm also gettting this...
main-.c: In function 'main':
main-.c:120: error: 'CLK_TCK' undeclared (first use in this function)
main-.c:120: error: (Each undeclared identifier is reported only once
main-.c:120: error: for each function it appears in.)
make: [main-.o] Error 1 (ignored)
The other files compile fine until after the 'making ecu' statement
where I get...
gcc: main-.o: No such file or directory
make: [ecu] Error 1 (ignored)
I'm using GCC 4.1.1 for this, with subversion revision 33 of Euphoria.
In short, can anybody help me to fix this so I can get it working?
This happens with both the exu and ecu. I can make the library though.
2. Re: Error compiling Euphoria with GCC
Jesse Adkins wrote:
> As the topic states, i've got a little problem compiling Euphoria with GCC.
>
> I'm getting the same CLK_TCK not defined problem that i've heard being
> mentioned here before. However, i'm also gettting this...
>
> main-.c: In function 'main':
> main-.c:120: error: 'CLK_TCK' undeclared (first use in this function)
> main-.c:120: error: (Each undeclared identifier is reported only once
> main-.c:120: error: for each function it appears in.)
> make: [main-.o] Error 1 (ignored)
>
> The other files compile fine until after the 'making ecu' statement
> where I get...
>
> gcc: main-.o: No such file or directory
> make: [ecu] Error 1 (ignored)
>
> I'm using GCC 4.1.1 for this, with subversion revision 33 of Euphoria.
>
> In short, can anybody help me to fix this so I can get it working?
> This happens with both the exu and ecu. I can make the library though.
Matt made a change to global.h that should fix this problem.
He added, near the top:
#ifndef CLK_TCK
#define CLK_TCK CLOCKS_PER_SEC
#endif
Make sure you have the latest global.h.
The change is in revision 33 and some earlier ones.
Unfortunately I can't test this fix, since it has always worked
OK on my Linux system. Maybe you also need to add the above 3 lines
to euphoria/include/euphoria.h
Regards,
Rob Craig
Rapid Deployment Software
http://www.RapidEuphoria.com
3. Re: Error compiling Euphoria with GCC
Robert Craig wrote:
>
>
> #ifndef CLK_TCK
> #define CLK_TCK CLOCKS_PER_SEC
> #endif
>
> Make sure you have the latest global.h.
> The change is in revision 33 and some earlier ones.
I checked the global.h file, and it's already in there.
> Unfortunately I can't test this fix, since it has always worked
> OK on my Linux system. Maybe you also need to add the above 3 lines
> to euphoria/include/euphoria.h
Adding it to euphoria/include/euphoria.h fixed everything for me. It compiles
flawlessly now. Thanks Rob.