Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » U++ Library support » U++ Core » glutBitmapCharacter undefined reference.
glutBitmapCharacter undefined reference. [message #39997] Thu, 23 May 2013 17:03 Go to next message
witriol is currently offline  witriol
Messages: 8
Registered: November 2012
Promising Member
Sorry my english is very poor Embarassed

I found a short function:
virtual void GLPaint() 
{
StdView();
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
glMatrixMode (GL_PROJECTION);
..................
void RenderBitmapString(float x, float y, String a)
	{  
  	char c;
  	glColor3f(1.0, 0.0, 0.0);//print in red
  	glRasterPos2f(x, y);
  	int k=0;
  	for (c=a[k]; k<a.GetCount(); k++)
    	glutBitmapCharacter(GLUT_BITMAP_9_BY_15, c);
	}
.........
}

I tried many to many font type but never work. I copied the types from the GL/glu.h or GL/freeglut.h or GL/glut.h.

We a/home/ek/upp/_out/MyApps/ldc/GCC4.Debug.Debug_Full.Gui.Main .Shared.Sse2/main.o: In function `OpenGLExample::RenderBitmapString(float, float, Upp::String)':
/home/ek/MyApps/ldc/main.cpp:82: undefined reference to `glutBitmap9By15'
/home/ek/MyApps/ldc/main.cpp:82: undefined reference to `glutBitmapCharacter'lways get this error message:

What am I doing wrong?
Re: glutBitmapCharacter undefined reference. [message #39999 is a reply to message #39997] Fri, 24 May 2013 21:10 Go to previous messageGo to next message
BioBytes is currently offline  BioBytes
Messages: 307
Registered: October 2008
Location: France
Senior Member
Hi,

Did you add the statement #include <GLCtrl/GLCtrl.h> in your header file ?

Regards

Biobytes
Re: glutBitmapCharacter undefined reference. [message #40000 is a reply to message #39999] Fri, 24 May 2013 22:41 Go to previous message
witriol is currently offline  witriol
Messages: 8
Registered: November 2012
Promising Member
Yes I did.
This are the included headers:
#include "ldc.h"
#include <GLCtrl/GLCtrl.h>
//#include <GL/glut.h>
//#include <GL/glu.h>
#include <GL/freeglut.h>

And I added "-lglut" the debug link options, and the relase link options. I found an interesting thing. If I use Ubuntu linux 12.04 LTS, the compiling does not work. But I use Gentoo linux (the gcc its same) the compiling its work, but it's crashes. The UPP serie is same the last stable 5485.
Previous Topic: the container type UPP::Link
Next Topic: Problem with XML
Goto Forum:
  


Current Time: Fri Mar 29 11:41:36 CET 2024

Total time taken to generate the page: 0.01275 seconds