Author Topic: [SOLVED] Fail Using CMake on Windows  (Read 11405 times)

ChupaReaper

  • Guest
[SOLVED] Fail Using CMake on Windows
« on: 4 February 2011, 00:40:54 »
I decided to try and compile GAE for once after reading something about bump maps in GAE which I wanted to see (and some of my models in my project already have bump maps lying about my hard drive).

I managed to get git going and downloaded everything following the windows guide. (I'm using win7 64bit).
Opened CMake, added the GAE_WINDEPS entry, then configured, I keep getting this problem with both Visual Studio 9 and 10:
Code: [Select]
Check for working CXX compiler using: Visual Studio 9 2008
Check for working CXX compiler using: Visual Studio 9 2008 -- works
Detecting CXX compiler ABI info
Detecting CXX compiler ABI info - done
Check for working C compiler using: Visual Studio 9 2008
Check for working C compiler using: Visual Studio 9 2008 -- works
Detecting C compiler ABI info
Detecting C compiler ABI info - done
Looking for glob.h
Looking for glob.h - not found
Looking for sys/ioctl.h
Looking for sys/ioctl.h - not found
Looking for sys/filio.h
Looking for sys/filio.h - not found
Looking for sys/time.h
Looking for sys/time.h - not found
Looking for byteswap.h
Looking for byteswap.h - not found
setting windeps: C:/GAE/deps
Found Lua51: C:/GAE/deps/lib/lua5.1.lib (Required is at least version "5.1")
Found VORBIS: C:/GAE/deps/include
Found ZLIB: C:/GAE/deps/include (found version "1.2.3")
Found CPPUNIT: C:/GAE/deps/include
Could NOT find LibXml2 (missing:  LIBXML2_LIBRARIES LIBXML2_INCLUDE_DIR)
Found wxWidgets: TRUE
Found Freetype: C:/GAE/deps/lib/freetype.lib
Could NOT find ZLIB (missing:  ZLIB_INCLUDE_DIR ZLIB_LIBRARY) (found version "1.2.3")
Found PNG: C:/GAE/deps/lib/libpng.lib
Found PhysFS: C:/GAE/deps/lib/physfs.lib
Could NOT find Doxygen (missing:  DOXYGEN_EXECUTABLE)
disabled doc
disabled glexemel
CMake Error: The following variables are used in this project, but they are set to NOTFOUND.
Please set them or make sure they are set and tested correctly in the CMake files:
GLEW_INCLUDE_DIR
   used as include directory in directory C:/GAE/trunk
   used as include directory in directory C:/GAE/trunk/source
   used as include directory in directory C:/GAE/trunk/source/shared_lib
   used as include directory in directory C:/GAE/trunk/source/game
   used as include directory in directory C:/GAE/trunk/source/blendnorm
   used as include directory in directory C:/GAE/trunk/source/map_editor
   used as include directory in directory C:/GAE/trunk/source/g3d_viewer
   used as include directory in directory C:/GAE/trunk/source/configurator
   used as include directory in directory C:/GAE/trunk/source/test
GLEW_LIBRARY
    linked by target "shared_lib" in directory C:/GAE/trunk/source/shared_lib

Configuring incomplete, errors occurred!

I downloaded all the dependencies (only downloaded base at first and it didn't work then I thought maybe the widgets were needed from the tools dependencies due to the new GUI using widgets?) Eventually I ended up downloading all the dependencies and still no luck.

Edit: I think I've found a solution, I've downloaded Doxygen and that "NOT found" problem has gone, I'm getting the latest libxml2 now using git and gonna try whacking that in and see if it compiles then...
« Last Edit: 4 February 2011, 01:27:50 by ChupaReaper »

hailstone

  • Local Moderator
  • Battle Machine
  • ********
  • Posts: 1,568
    • View Profile
Re: Fail Using CMake on Windows
« Reply #1 on: 4 February 2011, 00:54:50 »
Glew is a new dependency for the shaders. The deps on sourceforge must not have been updated yet.

Download from https://sourceforge.net/projects/glew/files/glew/1.5.8/glew-1.5.8-win32.zip/download
Extract to the windeps folder.
In CMAKE open GLEW section and point GLEW_LIBRARY to %Your deps location%/glew-1.5.8/lib/glew32.lib
Point GLEW_INCLUDE_DIR to %Your deps location%/glew-1.5.8/include
Copy the dll in glew-1.5.8/bin to your game folder
Press configure again and then generate

It should work now.
Glest Advanced Engine - Admin/Programmer
https://sourceforge.net/projects/glestae/

ChupaReaper

  • Guest
Re: Fail Using CMake on Windows
« Reply #2 on: 4 February 2011, 01:16:08 »
Configuring done! Thanks a lot! :D
Still missing LibXml2 though but seems ok: "Could NOT find LibXml2 (missing:  LIBXML2_LIBRARIES LIBXML2_INCLUDE_DIR)"

Opened in Visual 10 and building now, looks like it's going to work, thanks for the help.
« Last Edit: 4 February 2011, 01:27:26 by ChupaReaper »

ultifd

  • Airship
  • ********
  • Posts: 4,443
  • The Glest Video Guy :) The one and only. :P
    • View Profile
    • My Youtube Channel
Re: Fail Using CMake on Windows
« Reply #3 on: 4 February 2011, 01:31:17 »
Still missing LibXml2 though but seems ok: "Could NOT find LibXml2 (missing:  LIBXML2_LIBRARIES LIBXML2_INCLUDE_DIR)"
Yeah, that's normal/OK :)

silnarm

  • Local Moderator
  • Behemoth
  • ********
  • Posts: 1,373
    • View Profile
Re: Fail Using CMake on Windows
« Reply #4 on: 4 February 2011, 01:48:07 »
Still missing LibXml2 though but seems ok: "Could NOT find LibXml2 (missing:  LIBXML2_LIBRARIES LIBXML2_INCLUDE_DIR)"
Yeah, that's normal/OK :)

Yeah, that's only needed for the xml<->g3d utilities.
Glest Advanced Engine - Code Monkey

Timeline | Downloads

ChupaReaper

  • Guest
Re: [SOLVED] Fail Using CMake on Windows
« Reply #5 on: 4 February 2011, 01:58:28 »
Ok, glad I don't need to worry about that, but, with it all built, it crashes on startup with this:
Code: [Select]
Crash
Version: Advanced Engine git-master
Time: Fri Feb 04 01:54:09 2011
Description: Access violation (Reading address: 0xCF126285)

Call Stack:
  Frame       Code address
  0x00C5BC48  0x011BBD85 std::ios_base::_Ios_base_dtor+0x15 at ios.cpp(41)
  0x00C5BC58  0x00CC6549 std::basic_ios<char,std::char_traits<char> >::~basic_ios<char,std::char_traits<char> >+0x29 at ios(38)
  0x00C5C884  0x011DFF47 _NLG_Return at lowhelpr.asm(73)
  0x00C5C944  0x0113559E Shared::PhysFS::FSFactory::getIStream+0xde at fsfactory.cpp(152)
  0x00C5EBE0  0x01129818 Shared::Util::Properties::load+0xc8 at properties.cpp(45)
  0x00C5F2A0  0x00DE5CDA Glest::Global::Lang::setLocale+0x14a at lang.cpp(40)
  0x00C5F3FC  0x00E6D9D3 Glest::Main::Program::Program+0x273 at program.cpp(132)
  0x00C5FEC0  0x00E6BF03 Glest::Main::glestMain+0x533 at main.cpp(181)
  0x00C5FED0  0x00E6CCF0 main+0x10 at main.cpp(225)
  0x00C5FF1C  0x011D17C9 __tmainCRTStartup+0x129 at crt0.c(278)
  0x00C5FF24  0x011D168F mainCRTStartup+0xf at crt0.c(189)
  0x00C5FF30  0x77473677 BaseThreadInitThunk+0x12
  0x00C5FF70  0x77EA9D42 RtlInitializeExceptionChain+0x63
  0x00C5FF88  0x77EA9D15 RtlInitializeExceptionChain+0x36

=======================

I've copied the extra png graphics for the menu, not sure if there's anything else I'm missing though.

silnarm

  • Local Moderator
  • Behemoth
  • ********
  • Posts: 1,373
    • View Profile
Re: [SOLVED] Fail Using CMake on Windows
« Reply #6 on: 4 February 2011, 02:15:20 »
What are GAE_DATA_DIR and GAE_CONFIG_DIR set to in CMake ??

Glest Advanced Engine - Code Monkey

Timeline | Downloads

ChupaReaper

  • Guest
Re: [SOLVED] Fail Using CMake on Windows
« Reply #7 on: 4 February 2011, 02:17:24 »
What are GAE_DATA_DIR and GAE_CONFIG_DIR set to in CMake ??


Ahhh crap! I forgot to change then after clearing the cache when I was trying to get it all to work! I'll have to redo it all in the morning, am going to sleep now lol tis 02am here!

ChupaReaper

  • Guest
Re: [SOLVED] Fail Using CMake on Windows
« Reply #8 on: 4 February 2011, 11:17:31 »
Success, all working, only I'm going to now see if it can get the data and config paths to be relative of the .exe rather than a root location.

silnarm

  • Local Moderator
  • Behemoth
  • ********
  • Posts: 1,373
    • View Profile
Re: [SOLVED] Fail Using CMake on Windows
« Reply #9 on: 4 February 2011, 11:53:23 »
Success, all working, only I'm going to now see if it can get the data and config paths to be relative of the .exe rather than a root location.

This is fine, you can even leave GAE_CONFIG_DIR empty if you like, and it will use the 'default' location (in your user dir).

Only thing you might trip up on is if you are launching the executable from within visual studio, you will need to set the 'working directory' first, this is mentioned at the end of the compile guide.
Glest Advanced Engine - Code Monkey

Timeline | Downloads

ChupaReaper

  • Guest
Re: [SOLVED] Fail Using CMake on Windows
« Reply #10 on: 4 February 2011, 12:58:37 »
Yea I have the working directory set up all fine. I set the data directory to "..\share\glestae" and it works fine, shortcuts working fine also.
I have some mega lag straight away in game at 128 now, so I'm going to have a clean up, I think my mod is just a big memory eater lol.

silnarm

  • Local Moderator
  • Behemoth
  • ********
  • Posts: 1,373
    • View Profile
Re: [SOLVED] Fail Using CMake on Windows
« Reply #11 on: 7 February 2011, 22:41:10 »
I have some mega lag straight away in game at 128 now, so I'm going to have a clean up, I think my mod is just a big memory eater lol.

Well, yes... I think your mod is a horrible devourer of system resources :P  But in this case, it's probably just that the default 'build config' is set to debug, if you haven't changed this you will get a very slow executable.



Change this to 'Release' to strip out debug symbols & assertions, and optimise the generated code.

Edit: Oh, and you will need to set the working directory again (this is kept per build config).
Glest Advanced Engine - Code Monkey

Timeline | Downloads

ChupaReaper

  • Guest
Re: [SOLVED] Fail Using CMake on Windows
« Reply #12 on: 8 February 2011, 21:42:51 »
Ahh, that'll explain it lol, well that's a relief! It is a memory hungry mod but good for err... stress testing the engine. :P

 

anything