[FIX] cygwin compilation

You discovered a bug in the engine, and you are sure that it is not a problem of your code? Just post it in here. Please read the bug posting guidelines first.
Post Reply
lokiare
Posts: 40
Joined: Wed Feb 04, 2009 5:40 pm

[FIX] cygwin compilation

Post by lokiare »

I've gotten Irrlicht to compile under cygwin by changing

void CGUISpinBox::setValue(f32 val)

in CGUISpinBox.cpp to:

Code: Select all

char str[100];
core::string<char> fs(FormatString.c_str());

snprintf(str, 99, fs.c_str(), val);
core::stringw str2(str);
EditBox->setText(str2.c_str());
verifyValueRange();
I'm not sure how well that will work, but I'd like to know if there is a better option. I'm looking into porting this to the PSP, but I'm new to cygwin and makefiles (was raised on MVSC++). Are there any dependencies other than jpeglib, libpng, and zlib? these have all been successfully ported to PSP.
rogerborg
Admin
Posts: 3590
Joined: Mon Oct 09, 2006 9:36 am
Location: Scotland - gonnae no slag aff mah Engleesh
Contact:

Post by rogerborg »

That looks like it'll work, but what problem were you getting, and why (I wonder) aren't you getting it anywhere else?
Please upload candidate patches to the tracker.
Need help now? IRC to #irrlicht on irc.freenode.net
How To Ask Questions The Smart Way
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Post by hybrid »

Seems like either the swprintf redefinition isn't properly working or you didn't add the proper defines in IrrCompileConfig. Adding a new platform means adding the basic underlying support for it first. So please post your desired platform/API defines and the compiler error message from your failed try.
BTW: I moved the thread here...
lokiare
Posts: 40
Joined: Wed Feb 04, 2009 5:40 pm

Post by lokiare »

I'm attempting to port to the PSP as a "real" port. This way it can keep updated and work with all of the new stuff.
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Post by hybrid »

The thing is that you'll probably get a Windows define due to using cygwin (or something like that). This may lead to undesired defines for the os specific stuff. You will have to take care of the proper defines and probably set some of them manually.
Also, always post full error messages with the full compiler output.
lokiare
Posts: 40
Joined: Wed Feb 04, 2009 5:40 pm

Post by lokiare »

Just to clarify, cygwin doesn't support swprintf. It is only used in one place in the entire engine. This is the solution to get it to compile under cygwin, for windows (not PSP).
Post Reply