Does not compile with GCC on windows
GoogleCodeExporter opened this issue · 2 comments
GoogleCodeExporter commented
I am using 32 bit Windows XP and mingw.
Does not compile with the GCC compiler.
1. Create an empty c++ project in the codeblocks ide (or any other tool you
like).
2. Add the files of the WebToolkit to the project.
3. Add the WIN32 symbol to the project settings.
The compiler produces the following :
-------------- Build: Debug in WebToolkit ---------------
Compiling: File.cpp
C:\Storage\Code_blocks_projects\WebCpp\WebToolkit\WebToolkit\File.cpp: In
member function `std::string File::ReadLine()':
C:\Storage\Code_blocks_projects\WebCpp\WebToolkit\WebToolkit\File.cpp:45:
warning: comparison between signed and unsigned integer expressions
C:\Storage\Code_blocks_projects\WebCpp\WebToolkit\WebToolkit\File.cpp:55:
warning: comparison between signed and unsigned integer expressions
C:\Storage\Code_blocks_projects\WebCpp\WebToolkit\WebToolkit\File.cpp: In
member function `void File::Seek(i64)':
C:\Storage\Code_blocks_projects\WebCpp\WebToolkit\WebToolkit\File.cpp:94:
error: `_fseeki64' was not declared in this scope
C:\Storage\Code_blocks_projects\WebCpp\WebToolkit\WebToolkit\File.cpp:94:
warning: unused variable '_fseeki64'
Process terminated with status 1 (0 minutes, 0 seconds)
1 errors, 3 warnings
-----------------------------
The compiler finds neither "_fseeki64", nor "fseeko" function.
Seems like your
#ifdef WIN32
can be replaced with
#ifdef _MSC_VER
or
#if __MSVCRT_VERSION__ >= 0x800 //See <stdio.h>
and actually specifies compiler dependent options instead of the OS
dependent ones.
You could also consider using platform and compiler independent functions
like "fseek" instead of "_fseeki64" and "fseeko".
Original issue reported on code.google.com by dodik...@gmail.com
on 8 Jun 2009 at 3:12
GoogleCodeExporter commented
You may compile it now. I've rewritten win32 code to use WinAPI.
Original comment by madfisht...@gmail.com
on 13 Jun 2009 at 12:09
GoogleCodeExporter commented
Original comment by madfisht...@gmail.com
on 13 Jun 2009 at 9:58
- Changed state: Fixed