By chance, could anyone running Code::Blocks under WinXP be able to compile my CB project file? I'm hoping an old hand at Code::Blocks will be able to see what's amiss instantaneously. A link is here:
http://www.insightdigital.org/fltk/mosiac.zipQuick summary: The above FLTK-based code compiles fine under GCC / Linux, but try as I might I can't manage to compile the same code on the PC using Code::Blocks & MinGW.
My configuration: Code::Blocks 1rc2, compiler: GNU GCC, FLTK 1.1.7 DevPack from devpaks.org
What I'm asking for: A revised Code::Blocks project file that will allow me to compile the above code on a WinXP machine, from the Code::Blocks IDE. Or, alternatively, some indication of what environment settings I need to set to get the code to compile correctly. I also have the Windows Studio 2003 compiler set up with Code::Blocks, so a project that compiles with that option would be fine as well.
Thanks!
-Kevin
More detailed notes & a build log follow below:
I've been using Code::Blocks with Visual Studio 2003 for the past year. It's been a stable platform to build all sorts of nice things, including Irrlicht, OpenGL, OGRE etc. as well as cleanly importing scads of project files from MVC++ 6.0. I'm a real Code::Blocks fan...but I've had a lot of trouble with FLTK and Code::Blocks. I built FLTK 1.7 from source in MVC++ 6.0, but couldn't build Code::Blocks / Visual Studio 2003 projects using the resulting libraries.
Various postings suggest using MinGW / GNU compiler with Code::Blocks, which seems reasonable since that's the 'native' choice for CB. So, I installed MinGW, reinstalled Code::Blocks, which found the MinGW compiler and configured things appropriately. I'm able to successfully compile simple programs with CB & MinGW--no problems there, although I haven't touched the clean install defaults in terms of compiler settings.
Next, I used the existing Dev++ DevPack for FLTK 1.7, and was able to get a hello world program to compile successfully. However, trying to compile slightly more complex programs (for instance, the /test C++ files) won't work. And while the code listed at the top of this message in the link (
http://www.insightdigital.org/fltk/mosiac.zip) compiles correctly under Linux, Code::Blocks reports the following when I attempt to compile it under WinXP.
Build Log dump:
Project : FLTK Application
Compiler : GNU GCC Compiler (called directly)
Directory : V:\Programming\CodeBlocks\FLTK\mosiac\
--------------------------------------------------------------------------------
Switching to target: default
Compiling: misc.cpp
In file included from misc.hpp:9,
from misc.cpp:13:
C:/Program Files/CodeBlocks/bin/../lib/gcc/mingw32/3.4.4/../../../../include/c++/3.4.4/cmath:99: error: `::acos' has not been declared
C:/Program Files/CodeBlocks/bin/../lib/gcc/mingw32/3.4.4/../../../../include/c++/3.4.4/cmath:116: error: `::asin' has not been declared
C:/Program Files/CodeBlocks/bin/../lib/gcc/mingw32/3.4.4/../../../../include/c++/3.4.4/cmath:131: error: `::atan' has not been declared
C:/Program Files/CodeBlocks/bin/../lib/gcc/mingw32/3.4.4/../../../../include/c++/3.4.4/cmath:146: error: `::atan2' has not been declared
C:/Program Files/CodeBlocks/bin/../lib/gcc/mingw32/3.4.4/../../../../include/c++/3.4.4/cmath:162: error: `::ceil' has not been declared
C:/Program Files/CodeBlocks/bin/../lib/gcc/mingw32/3.4.4/../../../../include/c++/3.4.4/cmath:177: error: `::cos' has not been declared
C:/Program Files/CodeBlocks/bin/../lib/gcc/mingw32/3.4.4/../../../../include/c++/3.4.4/cmath:192: error: `::cosh' has not been declared
C:/Program Files/CodeBlocks/bin/../lib/gcc/mingw32/3.4.4/../../../../include/c++/3.4.4/cmath:207: error: `::exp' has not been declared
C:/Program Files/CodeBlocks/bin/../lib/gcc/mingw32/3.4.4/../../../../include/c++/3.4.4/cmath:222: error: `::fabs' has not been declared
C:/Program Files/CodeBlocks/bin/../lib/gcc/mingw32/3.4.4/../../../../include/c++/3.4.4/cmath:237: error: `::floor' has not been declared
C:/Program Files/CodeBlocks/bin/../lib/gcc/mingw32/3.4.4/../../../../include/c++/3.4.4/cmath:252: error: `::fmod' has not been declared
C:/Program Files/CodeBlocks/bin/../lib/gcc/mingw32/3.4.4/../../../../include/c++/3.4.4/cmath:262: error: `::frexp' has not been declared
C:/Program Files/CodeBlocks/bin/../lib/gcc/mingw32/3.4.4/../../../../include/c++/3.4.4/cmath:277: error: `::ldexp' has not been declared
C:/Program Files/CodeBlocks/bin/../lib/gcc/mingw32/3.4.4/../../../../include/c++/3.4.4/cmath:292: error: `::log' has not been declared
C:/Program Files/CodeBlocks/bin/../lib/gcc/mingw32/3.4.4/../../../../include/c++/3.4.4/cmath:307: error: `::log10' has not been declared
C:/Program Files/CodeBlocks/bin/../lib/gcc/mingw32/3.4.4/../../../../include/c++/3.4.4/cmath:322: error: `::modf' has not been declared
C:/Program Files/CodeBlocks/bin/../lib/gcc/mingw32/3.4.4/../../../../include/c++/3.4.4/cmath:341: error: `::pow' has not been declared
C:/Program Files/CodeBlocks/bin/../lib/gcc/mingw32/3.4.4/../../../../include/c++/3.4.4/cmath:363: error: `::sin' has not been declared
C:/Program Files/CodeBlocks/bin/../lib/gcc/mingw32/3.4.4/../../../../include/c++/3.4.4/cmath:378: error: `::sinh' has not been declared
C:/Program Files/CodeBlocks/bin/../lib/gcc/mingw32/3.4.4/../../../../include/c++/3.4.4/cmath:393: error: `::sqrt' has not been declared
C:/Program Files/CodeBlocks/bin/../lib/gcc/mingw32/3.4.4/../../../../include/c++/3.4.4/cmath:408: error: `::tan' has not been declared
C:/Program Files/CodeBlocks/bin/../lib/gcc/mingw32/3.4.4/../../../../include/c++/3.4.4/cmath:423: error: `::tanh' has not been declared
misc.cpp: In function `std::vector<std::string, std::allocator<std::string> > get_files(std::string, std::vector<std::string, std::allocator<std::string> >)':
misc.cpp:69: error: `DIR' undeclared (first use this function)
misc.cpp:69: error: (Each undeclared identifier is reported only once for each function it appears in.)
misc.cpp:69: error: `pdir' undeclared (first use this function)
misc.cpp:71: error: `opendir' undeclared (first use this function)
misc.cpp:78: error: `readdir' undeclared (first use this function)
misc.cpp:87: error: `closedir' undeclared (first use this function)
Process terminated with status 1 (0 minutes, 1 seconds)
---
Thanks again for taking a look!