error message during make process (Ubuntu 9.04)

Having trouble installing or compiling FreeCAD? Get help here.
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
Post Reply
DoNotGood

error message during make process (Ubuntu 9.04)

Post by DoNotGood »

Hi,

I get the following error message within the make process of FreeCAD v0.9 r2521.

Code: Select all

...
In file included from /opt/freecad/src/Base/TimeInfo.cpp:29:
/opt/freecad/src/Base/TimeInfo.h:48: Fehler: »uint64_t« wurde nicht deklariert
/opt/freecad/src/Base/TimeInfo.cpp:65: Fehler: Variable oder Feld »setTime_t« als »void« deklariert
/opt/freecad/src/Base/TimeInfo.cpp:65: Fehler: »uint64_t« wurde in diesem Gültigkeitsbereich nicht definiert
make[2]: *** [src/Base/CMakeFiles/FreeCADBase.dir/TimeInfo.cpp.o] Fehler 1
make[1]: *** [src/Base/CMakeFiles/FreeCADBase.dir/all] Fehler 2
make: *** [all] Fehler 2
I used the build script (Compiling on Unix) for Ubuntu 9.04. Is there a mistake in TimeInfo.cpp or TimeInfo.h (function: void setTime_t (uint64_t seconds))?
User avatar
yorik
Founder
Posts: 13640
Joined: Tue Feb 17, 2009 9:16 pm
Location: Brussels
Contact:

Re: error message during make process (Ubuntu 9.04)

Post by yorik »

Quick fix from Luke Benstead:
add this line in TimeInfo.h underneath the #include <time.h> line

Code: Select all

typedef unsigned long long int uint64_t;
wmayer
Founder
Posts: 20241
Joined: Thu Feb 19, 2009 10:32 am
Contact:

Re: error message during make process (Ubuntu 9.04)

Post by wmayer »

It's better to include the file stdint.h because there the types are defined properly. The above typedef could collide with compilers on other platforms.

The fix is checked in.
User avatar
yorik
Founder
Posts: 13640
Joined: Tue Feb 17, 2009 9:16 pm
Location: Brussels
Contact:

Re: error message during make process (Ubuntu 9.04)

Post by yorik »

Yes, I thought you or Jürgen would come with a more proper solution soon, this was just a small hack to get it working...
User avatar
jriegel
Founder
Posts: 3369
Joined: Sun Feb 15, 2009 5:29 pm
Location: Ulm, Germany
Contact:

Re: error message during make process (Ubuntu 9.04)

Post by jriegel »

Seldom,
I compiled on 9.4 a week ago and do not get the Error...
Do you use automake? I used cMake, may be some different default headers from the build system.

On windows stdint.h is not available, so I disabled it for Windows builds.
Stop whining - start coding!
wmayer
Founder
Posts: 20241
Joined: Thu Feb 19, 2009 10:32 am
Contact:

Re: error message during make process (Ubuntu 9.04)

Post by wmayer »

Do you use automake? I used cMake, may be some different default headers from the build system.
No, I have added a method setTime_t to set the time info from outside. This was needed becuase in FileInfo there are to methods to get time of last modification and access of a file for which I didn't want to return a time_t instance but our wrapper TimeInfo. The TimeInfo then is needed for a backup mechanism to replace always the oldest file.

I just didn't realized at that moment that stdint.h is not available for Windows.
Post Reply