Horde3D

Next-Generation Graphics Engine
It is currently 24.05.2024, 18:59

All times are UTC + 1 hour




Post new topic Reply to topic  [ 16 posts ]  Go to page 1, 2  Next
Author Message
 Post subject: Compiling help
PostPosted: 01.12.2010, 06:57 
Offline

Joined: 15.12.2009, 12:28
Posts: 14
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.


Top
 Profile  
Reply with quote  
 Post subject: Re: Compiling help
PostPosted: 01.12.2010, 12:36 
Offline

Joined: 15.06.2008, 11:21
Posts: 166
Location: Germany
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 701 times
Top
 Profile  
Reply with quote  
 Post subject: Re: Compiling help
PostPosted: 01.12.2010, 14:53 
Offline
Tool Developer

Joined: 13.11.2007, 11:07
Posts: 1150
Location: Germany
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?


Top
 Profile  
Reply with quote  
 Post subject: Re: Compiling help
PostPosted: 01.12.2010, 15:41 
Offline

Joined: 21.08.2008, 11:44
Posts: 354
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.


Top
 Profile  
Reply with quote  
 Post subject: Re: Compiling help
PostPosted: 01.12.2010, 17:10 
Offline

Joined: 15.06.2008, 11:21
Posts: 166
Location: Germany
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 :)


Top
 Profile  
Reply with quote  
 Post subject: Re: Compiling help
PostPosted: 01.12.2010, 17:52 
Offline
Tool Developer

Joined: 13.11.2007, 11:07
Posts: 1150
Location: Germany
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 :-)


Top
 Profile  
Reply with quote  
 Post subject: Re: Compiling help
PostPosted: 02.12.2010, 16:35 
Offline

Joined: 15.12.2009, 12:28
Posts: 14
Hey thanks a lot for that. Was just what I needed. :D


Top
 Profile  
Reply with quote  
 Post subject: Re: Compiling help
PostPosted: 03.12.2010, 16:09 
Offline
Tool Developer

Joined: 13.11.2007, 11:07
Posts: 1150
Location: Germany
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?


Top
 Profile  
Reply with quote  
 Post subject: Re: Compiling help
PostPosted: 04.12.2010, 02:50 
Offline

Joined: 22.11.2007, 17:05
Posts: 707
Location: Boston, MA
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.

_________________
Tristam MacDonald - [swiftcoding]


Top
 Profile  
Reply with quote  
 Post subject: Re: Compiling help
PostPosted: 08.12.2010, 18:51 
Offline
Tool Developer

Joined: 13.11.2007, 11:07
Posts: 1150
Location: Germany
Thanks swiftcoder, that was the problem. The latest CMakeFiles.txt for glfw should now work on all systems (tested it under Ubuntu 10.04)


Top
 Profile  
Reply with quote  
 Post subject: Re: Compiling help
PostPosted: 10.12.2010, 20:41 
Offline

Joined: 15.12.2009, 12:28
Posts: 14
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?


Top
 Profile  
Reply with quote  
 Post subject: Re: Compiling help
PostPosted: 11.12.2010, 09:47 
Offline
Tool Developer

Joined: 13.11.2007, 11:07
Posts: 1150
Location: Germany
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.


Top
 Profile  
Reply with quote  
 Post subject: Re: Compiling help
PostPosted: 12.12.2010, 00:32 
Offline

Joined: 15.12.2009, 12:28
Posts: 14
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.


Top
 Profile  
Reply with quote  
 Post subject: Re: Compiling help
PostPosted: 15.12.2010, 18:52 
Offline

Joined: 15.12.2009, 12:28
Posts: 14
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.


Top
 Profile  
Reply with quote  
 Post subject: Re: Compiling help
PostPosted: 15.12.2010, 19:19 
Offline

Joined: 15.06.2008, 11:21
Posts: 166
Location: Germany
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.


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 16 posts ]  Go to page 1, 2  Next

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 5 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group