Volumes Of Fun
http://www.volumesoffun.com/phpBB3/

Windows - Code::Blocks - Problem when trying to build
http://www.volumesoffun.com/phpBB3/viewtopic.php?f=14&t=515
Page 1 of 1

Author:  Grade [ Sun May 19, 2013 6:02 pm ]
Post subject:  Windows - Code::Blocks - Problem when trying to build

(I'm not english so there might be some grammar mistakes)
Hello everyone.
I'm currently trying to make a game using PolyVox (From what I saw, it's awesome!).
I downloaded PolyVox and CMake and tried to follow these steps (http://www.volumesoffun.com/polyvox/doc ... stall.html).
I selected the PolyVox folder and the build subfolder, I clicked configure (and selected CodeBlocks - MinGW Makefiles).
Then after that, I clicked the Generate button. I went to build folder, and saw a PolyVox.cbp (a Code::Blocks project file). I opened it, but when I'm trying to build, i'm getting this error :
Quote:
-------------- Build: all in PolyVox ---------------

Using makefile: Makefile
Execution of 'make.exe -s -f Makefile all' in 'C:\Program Files\CodeBlocks\polyvox\build' failed.
Nothing to be done.


I really don't know what could be the problem, and i can't manage to get it working.
I searched for similar problems, and found some, but none of them where solved.

If someone could help me it would be really nice !

EDIT: I found the problem :
Here's the solution for those who had the same problem: Go to Settings > Compiler and Debugger, Toolchain executables tab, and change make.exe to mingw32-make.exe, and then it should compile.

But still, I don't know where the build is located because i can't run it from Code::Blocks, there is an error: "You can't "run" a commands-only target..."

Author:  David Williams [ Sun May 19, 2013 9:35 pm ]
Post subject:  Re: Windows - Code::Blocks - Problem when trying to build

Grade wrote:
EDIT: I found the problem :
Here's the solution for those who had the same problem: Go to Settings > Compiler and Debugger, Toolchain executables tab, and change make.exe to mingw32-make.exe, and then it should compile.


I'm glad you fixed it, because we can't relly help much as we don't work with Code::Blocks. Hopefully this will help anyone else with the same problem.

Grade wrote:
But still, I don't know where the build is located because i can't run it from Code::Blocks, there is an error: "You can't "run" a commands-only target..."


I gues this depends what you built... PolyVox is a library so you can't 'run' it as such. You need to build an application which links against the library, such as one of the examples which come with PolyVox. Do you know if you built these examples (you'll have needed Qt installed)?

Author:  Grade [ Sun May 19, 2013 10:13 pm ]
Post subject:  Re: Windows - Code::Blocks - Problem when trying to build

Oh thanks !
I was on the wrong road obviousely :lol:.
I thought the C::B project made by CMake was a "pre-configurated" project for THE application we want to create. After reading your message, I went to build/library/PolyVoxCore and PolyVoxUtil and found .a files !
So I guess I have to link these files to my project.

I didn't try, but, what about the headers ? What should I do with them ? I'll certainly get an error if I try to include them.

(Unfortunately I can't try the examples because I don't have Qt, and I don't want to use it for my project).

EDIT: Well, I tried something that I should have tried first :D :
I added the include dir of both PolyVox libs in the Search Directories menu, and then when I build the compiler finds the header but I get these errors:
Quote:
Error: #error This file requires compiler and library support for the ISO C++ 2011 standard. This support is currently experimental, and must be enabled with the -std=c++11 or -std=gnu++11 compiler options. (Located in c++0x_warning.h)
error: 'shared_ptr' in namespace 'std' does not name a type (Located in PolyVoxCore/SurfaceMesh.h)
error: 'shared_ptr' in namespace 'std' does not name a type (Located in PolyVoxCore/SurfaceMesh.inl)

I have really no idea on how to fix this.

REEDIT: After doing some research, I've been able to build, but I don't know if what I did is bad or not, only you can tell me :
I followed what the headers from PolyVox do, and landed on TypeDef.h, in this file there is a condition : #if defined(_MSC_VER) && (_MSC_VER < 1600) to determine what tools to use. I just commented this condition and the else section, and then I've been able to build successfully.

Author:  David Williams [ Mon May 20, 2013 12:16 pm ]
Post subject:  Re: Windows - Code::Blocks - Problem when trying to build

Grade wrote:
REEDIT: After doing some research, I've been able to build, but I don't know if what I did is bad or not, only you can tell me :
I followed what the headers from PolyVox do, and landed on TypeDef.h, in this file there is a condition : #if defined(_MSC_VER) && (_MSC_VER < 1600) to determine what tools to use. I just commented this condition and the else section, and then I've been able to build successfully.


There's probably no harm in doing this but there may be another solution. In the root CMakeLists.txt you can find the following command:

Code:
IF(CMAKE_COMPILER_IS_GNUCXX) #Maybe "OR MINGW"
   ADD_DEFINITIONS(-std=c++0x) #Enable C++0x mode
ENDIF()
if(CMAKE_CXX_COMPILER MATCHES "clang")
   ADD_DEFINITIONS(-std=c++0x) #Enable C++0x mode
endif()


So basically we only add the '-std=c++0x' switch if we detect the GCC or Clang compiler. But on Windows we weren't sure how to detect it so the switch is not being added. You can try modifying these lines of code so that the switch is added automatically.

Page 1 of 1 All times are UTC
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/