How do I fix "error: '__off64_t' does not name a type"?

Do you have a typical platform dependent issue you're battling with ? Ask it here. Make sure you mention your platform, compiler, and wxWidgets version.
Post Reply
User avatar
ColleenKobe
Earned some good credits
Earned some good credits
Posts: 109
Joined: Mon Aug 31, 2015 3:47 pm

How do I fix "error: '__off64_t' does not name a type"?

Post by ColleenKobe »

Below is a build log of the build of my MinGW/wxWidgets/CodeLite workspace. As you can see, I have two projects that compile into a DLL, and they build fine. One DLL is plain C, and the other is a small C++ wrapper without any GUI. The main program is the one that bombs. It is a GUI in C++.

Code: Select all

C:\Windows\system32\cmd.exe /C C:/MinGW/bin/mingw32-make.exe -j4 SHELL=cmd.exe -e -f  "Behind_the_Scenes.mk"  MakeIntermediateDirs && C:/MinGW/bin/mingw32-make.exe -j4 SHELL=cmd.exe -e -f  "Behind_the_Scenes.mk"  all
----------Building project:[ Behind_the_Scenes - Debug ]----------
C:/MinGW/bin/gcc.exe -c  "F:/Prototypes_wxw/SBIR_Phase_II/Behind_the_Scenes/P06.c" -g -O0 -Wall   -o ./Debug/P06.c.o -IC:/MinGW/lib/gcc/mingw32/6.3.0/include/c++ -IC:/MinGW/lib/gcc/mingw32/6.3.0/include/c++/mingw32 -IC:/wxWidgets/include -IF:/Prototypes_wxw/SBIR_Phase_II/Behind_the_Scenes -IF:/Prototypes_wxw/SBIR_Phase_II/Main -IF:/Prototypes_wxw/SBIR_Phase_II/Run_Here -IF:/Prototypes_wxw/SBIR_Phase_II/Wrapper_Code
C:/MinGW/bin/gcc.exe -c  "F:/Prototypes_wxw/SBIR_Phase_II/Behind_the_Scenes/H0F.c" -g -O0 -Wall   -o ./Debug/H0F.c.o -IC:/MinGW/lib/gcc/mingw32/6.3.0/include/c++ -IC:/MinGW/lib/gcc/mingw32/6.3.0/include/c++/mingw32 -IC:/wxWidgets/include -IF:/Prototypes_wxw/SBIR_Phase_II/Behind_the_Scenes -IF:/Prototypes_wxw/SBIR_Phase_II/Main -IF:/Prototypes_wxw/SBIR_Phase_II/Run_Here -IF:/Prototypes_wxw/SBIR_Phase_II/Wrapper_Code
C:/MinGW/bin/gcc.exe -c  "F:/Prototypes_wxw/SBIR_Phase_II/Behind_the_Scenes/gd_bts.c" -g -O0 -Wall   -o ./Debug/gd_bts.c.o -IC:/MinGW/lib/gcc/mingw32/6.3.0/include/c++ -IC:/MinGW/lib/gcc/mingw32/6.3.0/include/c++/mingw32 -IC:/wxWidgets/include -IF:/Prototypes_wxw/SBIR_Phase_II/Behind_the_Scenes -IF:/Prototypes_wxw/SBIR_Phase_II/Main -IF:/Prototypes_wxw/SBIR_Phase_II/Run_Here -IF:/Prototypes_wxw/SBIR_Phase_II/Wrapper_Code
C:/MinGW/bin/gcc.exe -c  "F:/Prototypes_wxw/SBIR_Phase_II/Behind_the_Scenes/P05.c" -g -O0 -Wall   -o ./Debug/P05.c.o -IC:/MinGW/lib/gcc/mingw32/6.3.0/include/c++ -IC:/MinGW/lib/gcc/mingw32/6.3.0/include/c++/mingw32 -IC:/wxWidgets/include -IF:/Prototypes_wxw/SBIR_Phase_II/Behind_the_Scenes -IF:/Prototypes_wxw/SBIR_Phase_II/Main -IF:/Prototypes_wxw/SBIR_Phase_II/Run_Here -IF:/Prototypes_wxw/SBIR_Phase_II/Wrapper_Code
C:/MinGW/bin/gcc.exe -c  "F:/Prototypes_wxw/SBIR_Phase_II/Behind_the_Scenes/H30.c" -g -O0 -Wall   -o ./Debug/H30.c.o -IC:/MinGW/lib/gcc/mingw32/6.3.0/include/c++ -IC:/MinGW/lib/gcc/mingw32/6.3.0/include/c++/mingw32 -IC:/wxWidgets/include -IF:/Prototypes_wxw/SBIR_Phase_II/Behind_the_Scenes -IF:/Prototypes_wxw/SBIR_Phase_II/Main -IF:/Prototypes_wxw/SBIR_Phase_II/Run_Here -IF:/Prototypes_wxw/SBIR_Phase_II/Wrapper_Code
C:/MinGW/bin/gcc.exe -c  "F:/Prototypes_wxw/SBIR_Phase_II/Behind_the_Scenes/P04.c" -g -O0 -Wall   -o ./Debug/P04.c.o -IC:/MinGW/lib/gcc/mingw32/6.3.0/include/c++ -IC:/MinGW/lib/gcc/mingw32/6.3.0/include/c++/mingw32 -IC:/wxWidgets/include -IF:/Prototypes_wxw/SBIR_Phase_II/Behind_the_Scenes -IF:/Prototypes_wxw/SBIR_Phase_II/Main -IF:/Prototypes_wxw/SBIR_Phase_II/Run_Here -IF:/Prototypes_wxw/SBIR_Phase_II/Wrapper_Code
C:/MinGW/bin/gcc.exe -c  "F:/Prototypes_wxw/SBIR_Phase_II/Behind_the_Scenes/H03.c" -g -O0 -Wall   -o ./Debug/H03.c.o -IC:/MinGW/lib/gcc/mingw32/6.3.0/include/c++ -IC:/MinGW/lib/gcc/mingw32/6.3.0/include/c++/mingw32 -IC:/wxWidgets/include -IF:/Prototypes_wxw/SBIR_Phase_II/Behind_the_Scenes -IF:/Prototypes_wxw/SBIR_Phase_II/Main -IF:/Prototypes_wxw/SBIR_Phase_II/Run_Here -IF:/Prototypes_wxw/SBIR_Phase_II/Wrapper_Code
C:/MinGW/bin/gcc.exe -c  "F:/Prototypes_wxw/SBIR_Phase_II/Behind_the_Scenes/H0C.c" -g -O0 -Wall   -o ./Debug/H0C.c.o -IC:/MinGW/lib/gcc/mingw32/6.3.0/include/c++ -IC:/MinGW/lib/gcc/mingw32/6.3.0/include/c++/mingw32 -IC:/wxWidgets/include -IF:/Prototypes_wxw/SBIR_Phase_II/Behind_the_Scenes -IF:/Prototypes_wxw/SBIR_Phase_II/Main -IF:/Prototypes_wxw/SBIR_Phase_II/Run_Here -IF:/Prototypes_wxw/SBIR_Phase_II/Wrapper_Code
C:/MinGW/bin/gcc.exe -c  "F:/Prototypes_wxw/SBIR_Phase_II/Behind_the_Scenes/ut_bts.c" -g -O0 -Wall   -o ./Debug/ut_bts.c.o -IC:/MinGW/lib/gcc/mingw32/6.3.0/include/c++ -IC:/MinGW/lib/gcc/mingw32/6.3.0/include/c++/mingw32 -IC:/wxWidgets/include -IF:/Prototypes_wxw/SBIR_Phase_II/Behind_the_Scenes -IF:/Prototypes_wxw/SBIR_Phase_II/Main -IF:/Prototypes_wxw/SBIR_Phase_II/Run_Here -IF:/Prototypes_wxw/SBIR_Phase_II/Wrapper_Code
C:/MinGW/bin/gcc.exe -c  "F:/Prototypes_wxw/SBIR_Phase_II/Behind_the_Scenes/hw_int_usb_3_0.c" -g -O0 -Wall   -o ./Debug/hw_int_usb_3_0.c.o -IC:/MinGW/lib/gcc/mingw32/6.3.0/include/c++ -IC:/MinGW/lib/gcc/mingw32/6.3.0/include/c++/mingw32 -IC:/wxWidgets/include -IF:/Prototypes_wxw/SBIR_Phase_II/Behind_the_Scenes -IF:/Prototypes_wxw/SBIR_Phase_II/Main -IF:/Prototypes_wxw/SBIR_Phase_II/Run_Here -IF:/Prototypes_wxw/SBIR_Phase_II/Wrapper_Code
C:/MinGW/bin/gcc.exe -c  "F:/Prototypes_wxw/SBIR_Phase_II/Behind_the_Scenes/P08.c" -g -O0 -Wall   -o ./Debug/P08.c.o -IC:/MinGW/lib/gcc/mingw32/6.3.0/include/c++ -IC:/MinGW/lib/gcc/mingw32/6.3.0/include/c++/mingw32 -IC:/wxWidgets/include -IF:/Prototypes_wxw/SBIR_Phase_II/Behind_the_Scenes -IF:/Prototypes_wxw/SBIR_Phase_II/Main -IF:/Prototypes_wxw/SBIR_Phase_II/Run_Here -IF:/Prototypes_wxw/SBIR_Phase_II/Wrapper_Code
C:/MinGW/bin/gcc.exe -c  "F:/Prototypes_wxw/SBIR_Phase_II/Behind_the_Scenes/P07.c" -g -O0 -Wall   -o ./Debug/P07.c.o -IC:/MinGW/lib/gcc/mingw32/6.3.0/include/c++ -IC:/MinGW/lib/gcc/mingw32/6.3.0/include/c++/mingw32 -IC:/wxWidgets/include -IF:/Prototypes_wxw/SBIR_Phase_II/Behind_the_Scenes -IF:/Prototypes_wxw/SBIR_Phase_II/Main -IF:/Prototypes_wxw/SBIR_Phase_II/Run_Here -IF:/Prototypes_wxw/SBIR_Phase_II/Wrapper_Code
C:/MinGW/bin/gcc.exe -c  "F:/Prototypes_wxw/SBIR_Phase_II/Behind_the_Scenes/P040n.c" -g -O0 -Wall   -o ./Debug/P040n.c.o -IC:/MinGW/lib/gcc/mingw32/6.3.0/include/c++ -IC:/MinGW/lib/gcc/mingw32/6.3.0/include/c++/mingw32 -IC:/wxWidgets/include -IF:/Prototypes_wxw/SBIR_Phase_II/Behind_the_Scenes -IF:/Prototypes_wxw/SBIR_Phase_II/Main -IF:/Prototypes_wxw/SBIR_Phase_II/Run_Here -IF:/Prototypes_wxw/SBIR_Phase_II/Wrapper_Code
C:/MinGW/bin/gcc.exe -c  "F:/Prototypes_wxw/SBIR_Phase_II/Behind_the_Scenes/threads.c" -g -O0 -Wall   -o ./Debug/threads.c.o -IC:/MinGW/lib/gcc/mingw32/6.3.0/include/c++ -IC:/MinGW/lib/gcc/mingw32/6.3.0/include/c++/mingw32 -IC:/wxWidgets/include -IF:/Prototypes_wxw/SBIR_Phase_II/Behind_the_Scenes -IF:/Prototypes_wxw/SBIR_Phase_II/Main -IF:/Prototypes_wxw/SBIR_Phase_II/Run_Here -IF:/Prototypes_wxw/SBIR_Phase_II/Wrapper_Code
C:/MinGW/bin/gcc.exe -c  "F:/Prototypes_wxw/SBIR_Phase_II/Behind_the_Scenes/HC0.c" -g -O0 -Wall   -o ./Debug/HC0.c.o -IC:/MinGW/lib/gcc/mingw32/6.3.0/include/c++ -IC:/MinGW/lib/gcc/mingw32/6.3.0/include/c++/mingw32 -IC:/wxWidgets/include -IF:/Prototypes_wxw/SBIR_Phase_II/Behind_the_Scenes -IF:/Prototypes_wxw/SBIR_Phase_II/Main -IF:/Prototypes_wxw/SBIR_Phase_II/Run_Here -IF:/Prototypes_wxw/SBIR_Phase_II/Wrapper_Code
C:/MinGW/bin/gcc.exe -c  "F:/Prototypes_wxw/SBIR_Phase_II/Behind_the_Scenes/PP.c" -g -O0 -Wall   -o ./Debug/PP.c.o -IC:/MinGW/lib/gcc/mingw32/6.3.0/include/c++ -IC:/MinGW/lib/gcc/mingw32/6.3.0/include/c++/mingw32 -IC:/wxWidgets/include -IF:/Prototypes_wxw/SBIR_Phase_II/Behind_the_Scenes -IF:/Prototypes_wxw/SBIR_Phase_II/Main -IF:/Prototypes_wxw/SBIR_Phase_II/Run_Here -IF:/Prototypes_wxw/SBIR_Phase_II/Wrapper_Code
C:/MinGW/bin/g++.exe -shared -fPIC -o ../Run_Here/irt_bts.dll @"Behind_the_Scenes.txt" -LF:/Prototypes_wxw/SBIR_Phase_II/Resources -LF:/Prototypes_wxw/SBIR_Phase_II/Run_Here  -lFTD3XX
====0 errors, 0 warnings====
C:\Windows\system32\cmd.exe /C C:/MinGW/bin/mingw32-make.exe -j4 SHELL=cmd.exe -e -f  "Wrapper_Code.mk"  MakeIntermediateDirs && C:/MinGW/bin/mingw32-make.exe -j4 SHELL=cmd.exe -e -f  "Wrapper_Code.mk"  all
----------Building project:[ Wrapper_Code - Debug ]----------
C:/MinGW/bin/g++.exe  -c  "F:/Prototypes_wxw/SBIR_Phase_II/Wrapper_Code/Wrapper.cpp" -g -O0 -Wall   -o ./Debug/Wrapper.cpp.o -IC:/MinGW/lib/gcc/mingw32/6.3.0/include/c++ -IC:/MinGW/lib/gcc/mingw32/6.3.0/include/c++/mingw32 -IC:/wxWidgets/include -IF:/Prototypes_wxw/SBIR_Phase_II/Behind_the_Scenes -IF:/Prototypes_wxw/SBIR_Phase_II/Main -IF:/Prototypes_wxw/SBIR_Phase_II/Run_Here -IF:/Prototypes_wxw/SBIR_Phase_II/Wrapper_Code
C:/MinGW/bin/g++.exe -shared -fPIC -o ../Run_Here/irt_wrap.dll @"Wrapper_Code.txt" -LF:/Prototypes_wxw/SBIR_Phase_II/Resources -LF:/Prototypes_wxw/SBIR_Phase_II/Run_Here  -lirt_bts
====0 errors, 0 warnings====
C:\Windows\system32\cmd.exe /C C:/MinGW/bin/mingw32-make.exe -j4 SHELL=cmd.exe -e -f  "Main.mk"  MakeIntermediateDirs && C:/MinGW/bin/mingw32-make.exe -j4 SHELL=cmd.exe -e -f  "Main.mk"  all
----------Building project:[ Main - Debug ]----------
C:/MinGW/bin/windres.exe -i "F:/Prototypes_wxw/SBIR_Phase_II/Main/win_resources.rc" --use-temp-file --define __WXMSW__ --define __WXDEBUG__ --define _UNICODE --include-dir C:/wxWidgets/lib/gcc_dll/mswud --include-dir C:/wxWidgets/include --define WXUSINGDLL    -o ./Debug/win_resources.rc.o
C:/MinGW/bin/windres.exe: warning: 24: 1: 1033: duplicate value
C:/MinGW/bin/g++.exe  -c  "F:/Prototypes_wxw/SBIR_Phase_II/Main/INI_File_Class.cpp" -g -O0 -Wall -mthreads -DHAVE_W32API_H -D__WXMSW__ -D__WXDEBUG__ -D_UNICODE -IC:/wxWidgets/lib/gcc_dll/mswud -IC:/wxWidgets/include -DWXUSINGDLL -Wno-ctor-dtor-privacy -pipe -fmessage-length=0  -fno-keep-inline-dllexport -std=c++11    -o ./Debug/INI_File_Class.cpp.o -I. -IC:/wxWidgets/include -IF:/Prototypes_wxw/SBIR_Phase_II/Behind_the_Scenes -IF:/Prototypes_wxw/SBIR_Phase_II/Main -IF:/Prototypes_wxw/SBIR_Phase_II/Wrapper_Code
C:/MinGW/bin/g++.exe  -c  "F:/Prototypes_wxw/SBIR_Phase_II/Main/Eq_Linear_Class.cpp" -g -O0 -Wall -mthreads -DHAVE_W32API_H -D__WXMSW__ -D__WXDEBUG__ -D_UNICODE -IC:/wxWidgets/lib/gcc_dll/mswud -IC:/wxWidgets/include -DWXUSINGDLL -Wno-ctor-dtor-privacy -pipe -fmessage-length=0  -fno-keep-inline-dllexport -std=c++11    -o ./Debug/Eq_Linear_Class.cpp.o -I. -IC:/wxWidgets/include -IF:/Prototypes_wxw/SBIR_Phase_II/Behind_the_Scenes -IF:/Prototypes_wxw/SBIR_Phase_II/Main -IF:/Prototypes_wxw/SBIR_Phase_II/Wrapper_Code
C:/MinGW/bin/g++.exe  -c  "F:/Prototypes_wxw/SBIR_Phase_II/Main/MainFrame_Class.cpp" -g -O0 -Wall -mthreads -DHAVE_W32API_H -D__WXMSW__ -D__WXDEBUG__ -D_UNICODE -IC:/wxWidgets/lib/gcc_dll/mswud -IC:/wxWidgets/include -DWXUSINGDLL -Wno-ctor-dtor-privacy -pipe -fmessage-length=0  -fno-keep-inline-dllexport -std=c++11    -o ./Debug/MainFrame_Class.cpp.o -I. -IC:/wxWidgets/include -IF:/Prototypes_wxw/SBIR_Phase_II/Behind_the_Scenes -IF:/Prototypes_wxw/SBIR_Phase_II/Main -IF:/Prototypes_wxw/SBIR_Phase_II/Wrapper_Code
C:/MinGW/bin/g++.exe  -c  "F:/Prototypes_wxw/SBIR_Phase_II/Main/Settings_Class.cpp" -g -O0 -Wall -mthreads -DHAVE_W32API_H -D__WXMSW__ -D__WXDEBUG__ -D_UNICODE -IC:/wxWidgets/lib/gcc_dll/mswud -IC:/wxWidgets/include -DWXUSINGDLL -Wno-ctor-dtor-privacy -pipe -fmessage-length=0  -fno-keep-inline-dllexport -std=c++11    -o ./Debug/Settings_Class.cpp.o -I. -IC:/wxWidgets/include -IF:/Prototypes_wxw/SBIR_Phase_II/Behind_the_Scenes -IF:/Prototypes_wxw/SBIR_Phase_II/Main -IF:/Prototypes_wxw/SBIR_Phase_II/Wrapper_Code
In file included from C:/wxWidgets/include/wx/wxcrtbase.h:41:0,
                 from C:/wxWidgets/include/wx/string.h:36,
                 from C:/wxWidgets/include/wx/memory.h:15,
                 from C:/wxWidgets/include/wx/object.h:19,
                 from C:/wxWidgets/include/wx/gdiobj.h:14,
                 from C:/wxWidgets/include/wx/colour.h:15,
                 from C:/wxWidgets/include/wx/settings.h:14,
                 from F:/Prototypes_wxw/SBIR_Phase_II/Main/wxcrafter.h:10,
                 from F:/Prototypes_wxw/SBIR_Phase_II/Main/Eq_Digital_Count_Class.h:26,
                 from F:/Prototypes_wxw/SBIR_Phase_II/Main/Settings_Class.h:22,
                 from F:/Prototypes_wxw/SBIR_Phase_II/Main/ut_gui.h:30,
                 from F:/Prototypes_wxw/SBIR_Phase_II/Main/Eq_Linear_Class.h:24,
                 from F:/Prototypes_wxw/SBIR_Phase_II/Main/Eq_Linear_Class.cpp:20:
c:\mingw\include\io.h:503:14: error: '__off64_t' does not name a type
 __CRT_INLINE __off64_t lseek64 (int, __off64_t, int);
              ^~~~~~~~~
c:\mingw\include\io.h:505:1: error: '__off64_t' does not name a type
 __off64_t lseek64 (int fd, __off64_t offset, int whence)
 ^~~~~~~~~
In file included from C:/wxWidgets/include/wx/wxcrtbase.h:41:0,
                 from C:/wxWidgets/include/wx/string.h:36,
                 from C:/wxWidgets/include/wx/memory.h:15,
                 from C:/wxWidgets/include/wx/object.h:19,
                 from C:/wxWidgets/include/wx/gdiobj.h:14,
                 from C:/wxWidgets/include/wx/colour.h:15,
                 from C:/wxWidgets/include/wx/settings.h:14,
                 from F:/Prototypes_wxw/SBIR_Phase_II/Main/wxcrafter.h:10,
                 from F:/Prototypes_wxw/SBIR_Phase_II/Main/Eq_Linear_Class.h:27,
                 from F:/Prototypes_wxw/SBIR_Phase_II/Main/Settings_Class.h:24,
                 from F:/Prototypes_wxw/SBIR_Phase_II/Main/ut_gui.h:30,
                 from F:/Prototypes_wxw/SBIR_Phase_II/Main/Eq_Digital_Count_Class.h:23,
                 from F:/Prototypes_wxw/SBIR_Phase_II/Main/INI_File_Class.h:23,
                 from F:/Prototypes_wxw/SBIR_Phase_II/Main/INI_File_Class.cpp:25:
c:\mingw\include\io.h:503:14: error: '__off64_t' does not name a type
 __CRT_INLINE __off64_t lseek64 (int, __off64_t, int);
              ^~~~~~~~~
c:\mingw\include\io.h:505:1: error: '__off64_t' does not name a type
 __off64_t lseek64 (int fd, __off64_t offset, int whence)
 ^~~~~~~~~
In file included from C:/wxWidgets/include/wx/wxcrtbase.h:41:0,
                 from C:/wxWidgets/include/wx/string.h:36,
                 from C:/wxWidgets/include/wx/memory.h:15,
                 from C:/wxWidgets/include/wx/object.h:19,
                 from C:/wxWidgets/include/wx/gdiobj.h:14,
                 from C:/wxWidgets/include/wx/colour.h:15,
                 from C:/wxWidgets/include/wx/settings.h:14,
                 from F:/Prototypes_wxw/SBIR_Phase_II/Main/wxcrafter.h:10,
                 from F:/Prototypes_wxw/SBIR_Phase_II/Main/Eq_Digital_Count_Class.h:26,
                 from F:/Prototypes_wxw/SBIR_Phase_II/Main/Settings_Class.h:22,
                 from F:/Prototypes_wxw/SBIR_Phase_II/Main/ut_gui.h:30,
                 from F:/Prototypes_wxw/SBIR_Phase_II/Main/fio.h:27,
                 from F:/Prototypes_wxw/SBIR_Phase_II/Main/MainFrame_Class.cpp:34:
c:\mingw\include\io.h:503:14: error: '__off64_t' does not name a type
 __CRT_INLINE __off64_t lseek64 (int, __off64_t, int);
              ^~~~~~~~~
c:\mingw\include\io.h:505:1: error: '__off64_t' does not name a type
 __off64_t lseek64 (int fd, __off64_t offset, int whence)
 ^~~~~~~~~
In file included from C:/wxWidgets/include/wx/wxcrtbase.h:41:0,
                 from C:/wxWidgets/include/wx/string.h:36,
                 from C:/wxWidgets/include/wx/memory.h:15,
                 from C:/wxWidgets/include/wx/object.h:19,
                 from C:/wxWidgets/include/wx/gdiobj.h:14,
                 from C:/wxWidgets/include/wx/colour.h:15,
                 from C:/wxWidgets/include/wx/settings.h:14,
                 from F:/Prototypes_wxw/SBIR_Phase_II/Main/wxcrafter.h:10,
                 from F:/Prototypes_wxw/SBIR_Phase_II/Main/Eq_Digital_Count_Class.h:26,
                 from F:/Prototypes_wxw/SBIR_Phase_II/Main/Settings_Class.h:22,
                 from F:/Prototypes_wxw/SBIR_Phase_II/Main/ut_gui.h:30,
                 from F:/Prototypes_wxw/SBIR_Phase_II/Main/Settings_Class.cpp:21:
c:\mingw\include\io.h:503:14: error: '__off64_t' does not name a type
 __CRT_INLINE __off64_t lseek64 (int, __off64_t, int);
              ^~~~~~~~~
c:\mingw\include\io.h:505:1: error: '__off64_t' does not name a type
 __off64_t lseek64 (int fd, __off64_t offset, int whence)
 ^~~~~~~~~
In file included from C:/wxWidgets/include/wx/filefn.h:20:0,
                 from C:/wxWidgets/include/wx/stream.h:21,
                 from C:/wxWidgets/include/wx/filesys.h:24,
                 from C:/wxWidgets/include/wx/xrc/xmlres.h:23,
                 from F:/Prototypes_wxw/SBIR_Phase_II/Main/wxcrafter.h:11,
                 from F:/Prototypes_wxw/SBIR_Phase_II/Main/Eq_Digital_Count_Class.h:26,
                 from F:/Prototypes_wxw/SBIR_Phase_II/Main/Settings_Class.h:22,
                 from F:/Prototypes_wxw/SBIR_Phase_II/Main/ut_gui.h:30,
                 from F:/Prototypes_wxw/SBIR_Phase_II/Main/Eq_Linear_Class.h:24,
                 from F:/Prototypes_wxw/SBIR_Phase_II/Main/Eq_Linear_Class.cpp:20:
c:\mingw\include\sys\stat.h:188:17: error: '__off64_t' does not name a type
 struct _stati64 __struct_stat_defined( __off64_t, time_t );
                 ^
c:\mingw\include\sys\stat.h:195:17: error: '__off64_t' does not name a type
 struct __stat64 __struct_stat_defined( __off64_t, __time64_t );
                 ^
In file included from C:/wxWidgets/include/wx/filefn.h:20:0,
                 from C:/wxWidgets/include/wx/stream.h:21,
                 from C:/wxWidgets/include/wx/filesys.h:24,
                 from C:/wxWidgets/include/wx/xrc/xmlres.h:23,
                 from F:/Prototypes_wxw/SBIR_Phase_II/Main/wxcrafter.h:11,
                 from F:/Prototypes_wxw/SBIR_Phase_II/Main/Eq_Linear_Class.h:27,
                 from F:/Prototypes_wxw/SBIR_Phase_II/Main/Settings_Class.h:24,
                 from F:/Prototypes_wxw/SBIR_Phase_II/Main/ut_gui.h:30,
                 from F:/Prototypes_wxw/SBIR_Phase_II/Main/Eq_Digital_Count_Class.h:23,
                 from F:/Prototypes_wxw/SBIR_Phase_II/Main/INI_File_Class.h:23,
                 from F:/Prototypes_wxw/SBIR_Phase_II/Main/INI_File_Class.cpp:25:
c:\mingw\include\sys\stat.h:188:17: error: '__off64_t' does not name a type
 struct _stati64 __struct_stat_defined( __off64_t, time_t );
                 ^
c:\mingw\include\sys\stat.h:195:17: error: '__off64_t' does not name a type
 struct __stat64 __struct_stat_defined( __off64_t, __time64_t );
                 ^
In file included from C:/wxWidgets/include/wx/filefn.h:20:0,
                 from C:/wxWidgets/include/wx/stream.h:21,
                 from C:/wxWidgets/include/wx/filesys.h:24,
                 from C:/wxWidgets/include/wx/xrc/xmlres.h:23,
                 from F:/Prototypes_wxw/SBIR_Phase_II/Main/wxcrafter.h:11,
                 from F:/Prototypes_wxw/SBIR_Phase_II/Main/Eq_Digital_Count_Class.h:26,
                 from F:/Prototypes_wxw/SBIR_Phase_II/Main/Settings_Class.h:22,
                 from F:/Prototypes_wxw/SBIR_Phase_II/Main/ut_gui.h:30,
                 from F:/Prototypes_wxw/SBIR_Phase_II/Main/fio.h:27,
                 from F:/Prototypes_wxw/SBIR_Phase_II/Main/MainFrame_Class.cpp:34:
c:\mingw\include\sys\stat.h:188:17: error: '__off64_t' does not name a type
 struct _stati64 __struct_stat_defined( __off64_t, time_t );
                 ^
c:\mingw\include\sys\stat.h:195:17: error: '__off64_t' does not name a type
 struct __stat64 __struct_stat_defined( __off64_t, __time64_t );
                 ^
In file included from C:/wxWidgets/include/wx/filefn.h:20:0,
                 from C:/wxWidgets/include/wx/stream.h:21,
                 from C:/wxWidgets/include/wx/filesys.h:24,
                 from C:/wxWidgets/include/wx/xrc/xmlres.h:23,
                 from F:/Prototypes_wxw/SBIR_Phase_II/Main/wxcrafter.h:11,
                 from F:/Prototypes_wxw/SBIR_Phase_II/Main/Eq_Digital_Count_Class.h:26,
                 from F:/Prototypes_wxw/SBIR_Phase_II/Main/Settings_Class.h:22,
                 from F:/Prototypes_wxw/SBIR_Phase_II/Main/ut_gui.h:30,
                 from F:/Prototypes_wxw/SBIR_Phase_II/Main/Settings_Class.cpp:21:
c:\mingw\include\sys\stat.h:188:17: error: '__off64_t' does not name a type
 struct _stati64 __struct_stat_defined( __off64_t, time_t );
                 ^
c:\mingw\include\sys\stat.h:195:17: error: '__off64_t' does not name a type
 struct __stat64 __struct_stat_defined( __off64_t, __time64_t );
                 ^
mingw32-make.exe: *** [Debug/Eq_Linear_Class.cpp.o] Error 1
mingw32-make.exe: *** Waiting for unfinished jobs....
mingw32-make.exe: *** [Debug/INI_File_Class.cpp.o] Error 1
Main.mk:109: recipe for target 'Debug/Eq_Linear_Class.cpp.o' failed
Main.mk:101: recipe for target 'Debug/INI_File_Class.cpp.o' failed
mingw32-make.exe: *** [Debug/MainFrame_Class.cpp.o] Error 1
Main.mk:119: recipe for target 'Debug/MainFrame_Class.cpp.o' failed
mingw32-make.exe: *** [Debug/Settings_Class.cpp.o] Error 1
Main.mk:127: recipe for target 'Debug/Settings_Class.cpp.o' failed
====0 errors, 8 warnings====
How do I placate the compiler and tell it where '__off64_t' is defined?

I am running Windows 10. My computer is a 64-bit machine, but I'm compiling for 32-bit. For now.
wxWidgets version 3.1.1
MinGW 32-bit
CodeLite 12.0.3

To give you an idea of my code: here are Eq_Linear_Class.h and Eq_Linear_Class.cpp. Eq_Linear_Class.cpp is one of the files that threw the error.

Code: Select all

// *****************************************************************************
// *                     E q _ L i n e a r _ C l a s s . h                     *
// *                                                                           *
// *  Programmer:   Colleen Kobe                                               *
// *  Project:      TBD                                                        *
// *  Date:         February 14, 2018                                          *
// *    Revised:    tbd                                                        *
// *  Description:  This C DLL header file contains public declarations for the*
// *                xxx.c public constants, types, variables, and              *
// *                functions.                                                 *
// *                                                                           *
// *  Copyright:    (c) 2018 Infrared Technologies                             *
// *****************************************************************************

#ifndef EQ_LINEAR_CLASS_H
#define EQ_LINEAR_CLASS_H

// =============================================================================
//                       External Header Files to Include
// =============================================================================
#include <stdio.h>                      //  1 a
#include "datatypes.h"                  //  2
class     ut_gui_Class;                 //  2j-1
#include "ut_gui.h"                     //  2j-2
class     Settings_Class;               //  5j-1
#include "Settings_Class.h"             //  5j-2
#include "wxcrafter.h"                  //  5x

//  2018-06-12:  I am not sure if INI_File_Class will be needed here.  At the
//  end of this project, make a decision:  either delete the INI code, or
//  uncomment them and let them back in.

// class     INI_File_Class;               //  5h-1
// #include "INI_File_Class.h"             //  5h-2

// =============================================================================
//                              Class Declarations
// =============================================================================
class Eq_Linear_Class : public Eq_Linear_Base_Class
{

public:
    Eq_Linear_Class(wxWindow* parent);
    virtual ~Eq_Linear_Class();

// =============================================================================
//                      Procedure and Function Declarations
// =============================================================================

    // -------------------------------------------------------------------------
    //  Get and set the values in the m_Eq_b and m_Eq_m controls on the screen.
    // -------------------------------------------------------------------------
    virtual float   eql_Get_m_Eq_b (void);
    virtual void    eql_Set_m_Eq_b (float  New_Value);

    virtual float   eql_Get_m_Eq_m (void);
    virtual void    eql_Set_m_Eq_m (float  New_Value);

    // -------------------------------------------------------------------------
    //  Set pointer values.
    // -------------------------------------------------------------------------
    virtual void    eql_Set_eqLi_Ptr    (Eq_Linear_Class  * Main_eqLi_Ptr);
    virtual void    eql_Set_SC_Ptr      (Settings_Class   * Main_SC_Ptr);
    virtual void    eql_Set_ut_gui_Ptr  (ut_gui_Class     * Main_ut_gui_Ptr);
//     virtual void    eql_Set_INI_Ptr     (INI_File_Class   * Main_INI_Ptr);

    // -------------------------------------------------------------------------
    //  Other procedures.
    // -------------------------------------------------------------------------
    virtual void    eql_Show_eqLi_Page  (bool               Off_or_On);
    virtual void    eql_Create_Cal_Arg_List_for_eqLi
                                       (float  eqLi_m,
                                        float  eqLi_b,
                                        char   rc_st    [gd_bts_CAL_ARGS_ST_LENGTH]);

protected:
    virtual void    OnCancel_Clicked    (wxCommandEvent& event);
    virtual void    OnEq_b_Kill_Focus   (wxFocusEvent& event);
    virtual void    OnEq_m_Kill_Focus   (wxFocusEvent& event);
    virtual void    OnSave_Clicked      (wxCommandEvent& event);

};
#endif // EQ_LINEAR_CLASS_H
I'm attaching Eq_Linear_Class.cpp because it's longer.
Eq_Linear_Class.cpp
(21.19 KiB) Downloaded 124 times
To solve this problem, I have googled '__off64_t' and come across quite a few listings. I started out trying each suggestion, but it quickly became apparent that even if the advice worked once, the answers were so old (from three years ago and older) that the suggestions didn't work any more.

I am open to suggestions. :-)
Thanks!
Colleen
User avatar
doublemax
Moderator
Moderator
Posts: 19159
Joined: Fri Apr 21, 2006 8:03 pm
Location: $FCE2

Re: How do I fix "error: '__off64_t' does not name a type"?

Post by doublemax »

1) Please try to strip this down as much as possible. As the error occurs in a header file, your code is probably irrelevant. Ideally you should be able to strip it down so much, that someone else can try to compile it.

2) Write what you already tried. E.g. when i google for this error, i find the suggestion to include <cstddef>, which sounds reasonable. Have you tried that?

Also, try to include wx/wx.h before any other wxWidgets header.
Use the source, Luke!
Post Reply