Horde3D
http://horde3d.org/forums/

Compiling help
http://horde3d.org/forums/viewtopic.php?f=2&t=1332
Page 1 of 2

Author:  Elys [ 01.12.2010, 06:57 ]
Post subject:  Compiling help

Hi guys my brother was trying to compile the svn version of the engine on his computer which is also a linux box Ubuntu 10.10 anyway. He was having an err so here is a part of the code and then the error. Located in the egCamera.cpp
CODE:

if ( _stricmp( itr->second.c_str(), "true" ) == 0 || _stricmp( itr->second.c_str(), "1" ) == 0 )
cameraTpl->orthographic = true;
else
cameraTpl->orthographic = false;
}
itr = attribs.find( "occlusionCulling" );
if( itr != attribs.end() )
{
if ( _stricmp( itr->second.c_str(), "true" ) == 0 || _stricmp( itr->second.c_str(), "1" ) == 0 )
cameraTpl->occlusionCulling = true;
else
cameraTpl->occlusionCulling = false;
}

ERROR:
egCamera.cpp|88|error: ‘strcasecmp’ was not declared in this scope|
egCamera.cpp|96|error: ‘strcasecmp’ was not declared in this scope|

I'm sure it's something simple but my brain won't wrap around it right now. :? Any help would be appreciated thanks.

Author:  phoenix64 [ 01.12.2010, 12:36 ]
Post subject:  Re: Compiling help

Code:
AIndex: trunk/Extensions/Terrain/Source/terrain.cpp
===================================================================
--- trunk/Extensions/Terrain/Source/terrain.cpp   (Revision 298)
+++ trunk/Extensions/Terrain/Source/terrain.cpp   (Arbeitskopie)
@@ -19,6 +19,7 @@
 
 #include "utDebug.h"
 
+#include <cstring>
 
 namespace Horde3DTerrain
 {
Index: trunk/Extensions/Terrain/Sample/Content/terrains/terrain1/terrain1.scene.xml
===================================================================
--- trunk/Extensions/Terrain/Sample/Content/terrains/terrain1/terrain1.scene.xml   (Revision 298)
+++ trunk/Extensions/Terrain/Sample/Content/terrains/terrain1/terrain1.scene.xml   (Arbeitskopie)
@@ -1,2 +1,2 @@
-<Terrain name="Terrain1" sx="1024.0" sy="300.0" sz="1024.0" heightmap="terrains/terrain1/heightmap.tga" material="terrains/terrain1/terrain1.material.xml" />
+<Terrain name="Terrain1" sx="4196.0" sy="300.0" sz="4196.0" heightmap="terrains/terrain1/Terrain.png" material="terrains/terrain1/terrain1.material.xml" />
 
Index: trunk/Extensions/Terrain/Sample/Content/terrains/terrain1/terrain1.material.xml
===================================================================
--- trunk/Extensions/Terrain/Sample/Content/terrains/terrain1/terrain1.material.xml   (Revision 298)
+++ trunk/Extensions/Terrain/Sample/Content/terrains/terrain1/terrain1.material.xml   (Arbeitskopie)
@@ -1,7 +1,7 @@
 <Material>
    <Shader source="shaders/terrain.shader"/>
    
-   <Sampler name="heightNormMap" map="terrains/terrain1/heightmap.tga" allowCompression="false" />
+   <Sampler name="heightNormMap" map="terrains/terrain1/Terrain.png" allowCompression="false" />
    <Sampler name="detailMap" map="terrains/terrain1/detail.jpg" />
    
    <Uniform name="sunDir" a="1.0" b="-1.0" c="0.0" />
Index: trunk/Horde3D/Source/Shared/utXML.h
===================================================================
--- trunk/Horde3D/Source/Shared/utXML.h   (Revision 298)
+++ trunk/Horde3D/Source/Shared/utXML.h   (Arbeitskopie)
@@ -20,6 +20,7 @@
 
 #include <stdio.h>
 #include "rapidxml.h"
+#include <cstring>
 
 
 inline void rapidxml::parse_error_handler( const char *what, void *where )
Index: trunk/Horde3D/Source/Horde3DEngine/egGeometry.cpp
===================================================================
--- trunk/Horde3D/Source/Horde3DEngine/egGeometry.cpp   (Revision 298)
+++ trunk/Horde3D/Source/Horde3DEngine/egGeometry.cpp   (Arbeitskopie)
@@ -19,6 +19,7 @@
 
 #include "utDebug.h"
 
+#include <cstring>
 
 namespace Horde3D {
 
Index: trunk/Horde3D/Source/Horde3DEngine/egMaterial.cpp
===================================================================
--- trunk/Horde3D/Source/Horde3DEngine/egMaterial.cpp   (Revision 298)
+++ trunk/Horde3D/Source/Horde3DEngine/egMaterial.cpp   (Arbeitskopie)
@@ -18,6 +18,7 @@
 
 #include "utDebug.h"
 
+#include <cstring>
 
 namespace Horde3D {
 
Index: trunk/Horde3D/Source/Horde3DEngine/egModel.cpp
===================================================================
--- trunk/Horde3D/Source/Horde3DEngine/egModel.cpp   (Revision 298)
+++ trunk/Horde3D/Source/Horde3DEngine/egModel.cpp   (Arbeitskopie)
@@ -18,7 +18,9 @@
 
 #include "utDebug.h"
 
+#include <cstring>
 
+
 namespace Horde3D {
 
 using namespace std;
Index: trunk/Horde3D/Source/Horde3DEngine/egRenderer.cpp
===================================================================
--- trunk/Horde3D/Source/Horde3DEngine/egRenderer.cpp   (Revision 298)
+++ trunk/Horde3D/Source/Horde3DEngine/egRenderer.cpp   (Arbeitskopie)
@@ -20,6 +20,7 @@
 
 #include "utDebug.h"
 
+#include <cstring>
 
 namespace Horde3D {
 
Index: trunk/Horde3D/Source/Horde3DEngine/egShader.cpp
===================================================================
--- trunk/Horde3D/Source/Horde3DEngine/egShader.cpp   (Revision 298)
+++ trunk/Horde3D/Source/Horde3DEngine/egShader.cpp   (Arbeitskopie)
@@ -18,6 +18,7 @@
 
 #include "utDebug.h"
 
+#include <cstring>
 
 namespace Horde3D {
 
Index: trunk/Horde3D/Source/Horde3DEngine/egCamera.cpp
===================================================================
--- trunk/Horde3D/Source/Horde3DEngine/egCamera.cpp   (Revision 298)
+++ trunk/Horde3D/Source/Horde3DEngine/egCamera.cpp   (Arbeitskopie)
@@ -16,6 +16,7 @@
 
 #include "utDebug.h"
 
+#include <cstring>
 
 namespace Horde3D {
 
Index: trunk/Horde3D/Source/Horde3DEngine/egTexture.cpp
===================================================================
--- trunk/Horde3D/Source/Horde3DEngine/egTexture.cpp   (Revision 298)
+++ trunk/Horde3D/Source/Horde3DEngine/egTexture.cpp   (Arbeitskopie)
@@ -18,6 +18,7 @@
 
 #include "utDebug.h"
 
+#include <cstring>
 
 namespace Horde3D {
 
Index: trunk/Horde3D/Samples/glfw/lib/x11/x11_glext.c
===================================================================
--- trunk/Horde3D/Samples/glfw/lib/x11/x11_glext.c   (Revision 298)
+++ trunk/Horde3D/Samples/glfw/lib/x11/x11_glext.c   (Arbeitskopie)
@@ -38,6 +38,7 @@
 // We support four different ways for getting addresses for GL/GLX
 // extension functions: glXGetProcAddress, glXGetProcAddressARB,
 // glXGetProcAddressEXT, and dlsym
+#define _GLFW_HAS_GLXGETPROCADDRESSARB
 #if   defined( _GLFW_HAS_GLXGETPROCADDRESSARB )
  #define _glfw_glXGetProcAddress(x) glXGetProcAddressARB(x)
 #elif defined( _GLFW_HAS_GLXGETPROCADDRESS )


Attachments:
File comment: Patch to be applied via "patch -p0"
compilefixes.patch [5.14 KiB]
Downloaded 748 times

Author:  Volker [ 01.12.2010, 14:53 ]
Post subject:  Re: Compiling help

Thanks for the patch phoenix!

I guess the terrain patch lines were only posted by accident, weren't they?
I commited the cstring includes for the horde files, but not sure about your changes to glfw. Are they necessary?

Author:  Siavash [ 01.12.2010, 15:41 ]
Post subject:  Re: Compiling help

Volker wrote:
I commited the cstring includes for the horde files
They were hunted weeks ago by me :wink:

Volker wrote:
but not sure about your changes to glfw. Are they necessary?
Yes they are, otherwise GLFW fails to get the OpenGL version string and open a new window in Linux and quits immediately.

Author:  phoenix64 [ 01.12.2010, 17:10 ]
Post subject:  Re: Compiling help

Quote:
but not sure about your changes to glfw. Are they necessary?


Well, they are necessary - but they are an incredibly ugly hack.
The proper solution which would work on platforms where this define should not be used would be to make modifications to the cmake file.

Quote:
I guess the terrain patch lines were only posted by accident, weren't they?

Nope, I am just playing with libnoise and some heightmaps atm :)

Author:  Volker [ 01.12.2010, 17:52 ]
Post subject:  Re: Compiling help

Siavash wrote:
Volker wrote:
I commited the cstring includes for the horde files
They were hunted weeks ago by me :wink:

Sorry, didn't noticed it. So thanks to you as well :-)

Author:  Elys [ 02.12.2010, 16:35 ]
Post subject:  Re: Compiling help

Hey thanks a lot for that. Was just what I needed. :D

Author:  Volker [ 03.12.2010, 16:09 ]
Post subject:  Re: Compiling help

phoenix64 wrote:
Quote:
but not sure about your changes to glfw. Are they necessary?


Well, they are necessary - but they are an incredibly ugly hack.
The proper solution which would work on platforms where this define should not be used would be to make modifications to the cmake file.


I tried changing the CMake file for glfw by adding the following lines to the end:
Code:
if(${CMAKE_SYSTEM_NAME} MATCHES "Linux")
   include(${CMAKE_ROOT}/Modules/CheckFunctionExists.cmake)
   CHECK_FUNCTION_EXISTS(glXGetProcAddressARB USE_GLX_GET_PROC_ADDRESS_ARB)
       IF (USE_GLX_GET_PROC_ADDRESS_ARB)
      set_target_properties(glfw PROPERTIES COMPILE_FLAGS -D_GLFW_HAS_GLXGETPROCADDRESSARB)
      ENDIF (USE_GLX_GET_PROC_ADDRESS_ARB)
endif(${CMAKE_SYSTEM_NAME} MATCHES "Linux")


but CMake tells me that glXGetProcAddressARB couldn't be found. Does anyone know what I'm doing wrong? Do we have to specify the right glx.h somewhere?

Author:  swiftcoder [ 04.12.2010, 02:50 ]
Post subject:  Re: Compiling help

Volker wrote:
but CMake tells me that glXGetProcAddressARB couldn't be found. Does anyone know what I'm doing wrong? Do we have to specify the right glx.h somewhere?
Did you set CMAKE_REQUIRED_INCLUDES and CMAKE_REQUIRED_LIBRARIES to indicate the correct glX headers/libraries? It can't compile the check program unless it knows what to include and link against.

Author:  Volker [ 08.12.2010, 18:51 ]
Post subject:  Re: Compiling help

Thanks swiftcoder, that was the problem. The latest CMakeFiles.txt for glfw should now work on all systems (tested it under Ubuntu 10.04)

Author:  Elys [ 10.12.2010, 20:41 ]
Post subject:  Re: Compiling help

Ok. So I was able to get everything to compile, including the examples. But none of the examples will work. I get an error saying that a library can't be found. However every time I run it the library that can't be found changes. So I compiled again, checking to make sure everything is linked before I compiled it. Same problem. I am using code blocks, Is this a problem common to code blocks? or is there something else going on here?

Author:  Volker [ 11.12.2010, 09:47 ]
Post subject:  Re: Compiling help

I tested it by using cmake for generating standard makefiles and an eclipse project and both were working fine.
Are you trying to start the projects from CodeBlocks or from the command line? Maybe you should first try to use the normal makefiles and then start using codeblocks.

Author:  Elys [ 12.12.2010, 00:32 ]
Post subject:  Re: Compiling help

I'll try that then. I share files with some people on windows, and we all use code blocks. As long as I can get it to work I don't care though. Will let you know if it works. Thanks for the help.

Author:  Elys [ 15.12.2010, 18:52 ]
Post subject:  Re: Compiling help

Well I finally got the Chicago sample to work kind of. I can run the program from codeblocks, however when I run it from the terminal it doesn't want to link the libglfw.so.

Author:  phoenix64 [ 15.12.2010, 19:19 ]
Post subject:  Re: Compiling help

Set LD_LIBRARY_PATH to the path where the libglfw.so is on linux, and copy the dll to the directory on windows. Code Blocks probably does this already.

Alternatively you can add a custom library loader path (via -Wl,--rpath,path-here or sth like that) if you don't always want to use the env variable.

Page 1 of 2 All times are UTC + 1 hour
Powered by phpBB® Forum Software © phpBB Group
https://www.phpbb.com/