Pārlūkot izejas kodu

fixed some linux issues

git-svn-id: https://assimp.svn.sourceforge.net/svnroot/assimp/trunk@186 67173fc5-114c-0410-ac8e-9d2fd5bffc1f
alil 17 gadi atpakaļ
vecāks
revīzija
c0148c090f
4 mainītis faili ar 14 papildinājumiem un 5 dzēšanām
  1. 6 1
      code/ACLoader.cpp
  2. 2 2
      code/Importer.cpp
  3. 5 1
      code/SortByPTypeProcess.cpp
  4. 1 1
      code/aiAssert.cpp

+ 6 - 1
code/ACLoader.cpp

@@ -611,7 +611,12 @@ void AC3DImporter::InternReadFile( const std::string& pFile,
 
 	// print the file format version to the console
 	unsigned int version = HexDigitToDecimal( buffer[4] );
-	char msg[3];::_itoa(version,msg,10);
+	char msg[3];
+  #if defined(_MSC_VER)
+    ::_itoa(version,msg,10);
+  #else
+    snprintf(msg, 3, "%d", version);  //itoa is not available under linux
+  #endif    
 	DefaultLogger::get()->info(std::string("AC3D file format version: ") + msg);
 
 	std::vector<Material> materials;

+ 2 - 2
code/Importer.cpp

@@ -105,10 +105,10 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 #	include "NFFLoader.h"
 #endif
 #ifndef AI_BUILD_NO_RAW_IMPORTER
-#	include "RAWLoader.h"
+#	include "RawLoader.h"
 #endif
 #ifndef AI_BUILD_NO_OFF_IMPORTER
-#	include "OffLoader.h"
+#	include "OFFLoader.h"
 #endif
 #ifndef AI_BUILD_NO_AC_IMPORTER
 #	include "ACLoader.h"

+ 5 - 1
code/SortByPTypeProcess.cpp

@@ -132,7 +132,11 @@ void DeterminePTypeHelperProcess::Execute( aiScene* pScene)
 			if (deg)
 			{
 				char s[64];
-				::_itoa(deg,s,10);
+				#if defined(_MSC_VER)
+          ::_itoa(deg,s,10);
+        #else
+          snprintf(s, 64, "%d", deg);  //itoa is not available under linux
+        #endif        
 				DefaultLogger::get()->warn(std::string("Found ") + s + " degenerated primitives");
 			}
 		}

+ 1 - 1
code/aiAssert.cpp

@@ -1,5 +1,5 @@
 
-#include "assimpPCH.h"
+#include "AssimpPCH.h"
 
 #include "../include/aiAssert.h"
 #ifdef _WIN32