PDA

View Full Version : Building ClanLib 1.0



Starclopsofish
10-18-2009, 10:26 PM
On the main Novashell page it says that ClanLib version 1.0 is required. I'm attempting to build this version, but get a cryptic (for a non-coder) error.



canvas_opengl.cpp: In member function ‘virtual CL_GraphicContext* CL_Canvas_OpenGL::get_gc()’:
canvas_opengl.cpp:236: error: ‘stderr’ was not declared in this scope
canvas_opengl.cpp:236: error: ‘fprintf’ was not declared in this scope
canvas_opengl.cpp:244: error: ‘stderr’ was not declared in this scope
canvas_opengl.cpp:244: error: ‘fprintf’ was not declared in this scope
canvas_opengl.cpp:251: error: ‘stderr’ was not declared in this scope
canvas_opengl.cpp:251: error: ‘fprintf’ was not declared in this scope
make[2]: *** [canvas_opengl.lo] Error 1
make[2]: Leaving directory `/home/grant/Source/ClanLib-1.0.0/Sources/GL'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/grant/Source/ClanLib-1.0.0/Sources'
make: *** [all-recursive] Error 1
[grant@Nehalem ClanLib-1.0.0]$


Is this a bug? Is mucking around in ClanLib's source required to get it to compile?

EDIT: So I went in and added


#include <stdio.h>

in canvas_opengl.h.

Did they just forget to include the standard library? This fixed the problem with that file, but now I'm getting a similar "I don't know what printf is" error for another file. Is there one file that the others depend on that I can add <stdio.h> to to get this to work?

Seth
10-20-2009, 03:23 AM
Hmm, strange. Not sure why it would need that on only your system, I'll give a close look next time I build novashell on linux!

sphair
10-20-2009, 08:08 AM
Could be related to http://www.rtsoft.com/forums/showthread.php?t=2642&highlight=stdio

Afaik, this was only applied to ClanLib 2, and therefore might be a problem with ClanLib 1 still. I don't know why some users have this problem, while other don't, though.

Starclopsofish
10-20-2009, 05:54 PM
So will version 2.x.x still work with Novashell? If so, whats the procedure for applying that patch? (I looked at the man page, but I'm not sure which file to apply it to.)

sphair
10-20-2009, 06:08 PM
No, ClanLib 1 and 2 are not compatible. Also, the patch probably won't work with ClanLib 1, since the codebase is very different in many areas.

Basically, I think you should just add stdio.h in every file you find a problem with. Send a patch with your changes, so next guy won't have the same problems.