## Registration code : 12 ##
It is currently Mon Nov 20, 2017 10:50 pm

All times are UTC + 1 hour [ DST ]





Post new topic Reply to topic  [ 1 post ] 
Author Message
 Post subject: Linux port
PostPosted: Fri Nov 21, 2008 1:04 am 
Offline
Site Admin
User avatar
 WWW  Profile

Joined: Mon Jan 28, 2008 9:44 pm
Posts: 200
Location: France
I'm proud to announce that Frost Engine is now officially supported on Linux (tested with Ubuntu (8.10)) !

I had only three problems while doing this port :
  • itoa :
    This function doesn't exists on Linux. I've taken the one found here.

  • std::string::find() :
    Strangely, this function doesn't return the same thing in Linux or in Windows.
    Here is what I used to do on Windows :
    Code:
    string sValue = "hello !";
    uint uiResult = sValue.find("lo", 0);
    if (uiResult != sValue.npos)
        // Return the position of the pattern
    else
        // Return NaN

    For some reason, this doesn't work on Linux.
    I had to use an int instead of an uint, and check if this int was superior or equal to zero :
    Code:
    string sValue = "hello !"
    int iResult = sValue.find("lo", 0);
    if (iResult >= 0)
        // Return the position of the pattern
    else
        // Return NaN

  • sizeof(long) :
    I discovered it while loading a binary model file.
    On Linux, sizeof(long) equals 8 but on Windows, it is 4 (same as int).
    This little difference was killing my loading code : it was using long and ulong, expecting them to have a size of 4 (I didn't actually write that code : it was inspired from WoWModelViewer). I just changed these to int and uint, and everything went fine.
    Edit : Actually, this may come from the fact that my Ubuntu is built with 64bit support ;) (whereas WinXP is a 32bit OS)

_________________
- Kal.


Top
 

Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 1 post ] 

All times are UTC + 1 hour [ DST ]



Who is online

Users browsing this forum: No registered users and 1 guest


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

Search for:
Jump to:  
cron
SourceForge.net Logo
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group  
Design By Poker Bandits