Skip to main content
gamedev.net
🔒 Locked

alternative for 'windows.h' when using Linux??

Started by DarkKiller Mar 6, 2004 at 1:09 PM 24 replies 19.8k views
Original Post
DarkKiller
DarkKiller
Hi there, I tried to write a 3dengine unsing SDL. I used DEV-C++ with MS-Windows to write the main code. I allways tried to keep the code clear from Windows specific code but itseems like that I forgot something. I need an alternative include file for 'windows.h' because many basic things can not be compiled with my KDevelop 3.2 and my Debian Linux running a 2.4.22 Kernel SDL, FreeType6 and OpenGL devs installed. Here is the compiler output. I'm sure its easier to understand what I want when I print this here instead of my (bad) explanation here we go:
quote:
cd "/home/mcnugget/src/MF-Engine/mfengine/debug/src" && WANT_AUTOCONF_2_5="1" WANT_AUTOMAKE_1_6="1" make -k *if g++ -DHAVE_CONFIG_H -I. -I/home/mcnugget/src/MF-Engine/mfengine/src -I.. -O0 -g3 -MT mfengine-enginetest.o -MD -MP -MF ".deps/mfengine-enginetest.Tpo" -c -o mfengine-enginetest.o test -f 'enginetest.cpp' || echo '/home/mcnugget/src/MF-Engine/mfengine/src/'enginetest.cpp; then mv -f ".deps/mfengine-enginetest.Tpo" ".deps/mfengine-enginetest.Po"; else rm -f ".deps/mfengine-enginetest.Tpo"; exit 1; fi *In file included from /home/mcnugget/src/MF-Engine/mfengine/src/enginetest.h:5, *from /home/mcnugget/src/MF-Engine/mfengine/src/enginetest.cpp:1: */home/mcnugget/src/MF-Engine/mfengine/src/MFTexture.h:9: error: ' BITMAPFILEHEADER' is used as a type, but is not defined as a type. */home/mcnugget/src/MF-Engine/mfengine/src/MFTexture.h:10: error: ' BITMAPINFOHEADER' is used as a type, but is not defined as a type. *In file included from /home/mcnugget/src/MF-Engine/mfengine/src/enginetest.h:9, *from /home/mcnugget/src/MF-Engine/mfengine/src/enginetest.cpp:1: */home/mcnugget/src/MF-Engine/mfengine/src/MFTimer.h:12: error: '__int64' is used as a type, but is not defined as a type. */home/mcnugget/src/MF-Engine/mfengine/src/MFTimer.h:14: error: Fehler beim Parsen before `,' token */home/mcnugget/src/MF-Engine/mfengine/src/MFTimer.h:18: error: 'DWORD' is used as a type, but is not defined as a type. */home/mcnugget/src/MF-Engine/mfengine/src/MFTimer.h:19: error: 'DWORD' is used as a type, but is not defined as a type. */home/mcnugget/src/MF-Engine/mfengine/src/MFTimer.h:22: error: 'DWORD' is used as a type, but is not defined as a type. *make: *** [mfengine-enginetest.o] Fehler 1 *if g++ -DHAVE_CONFIG_H -I. -I/home/mcnugget/src/MF-Engine/mfengine/src -I.. -O0 -g3 -MT mfengine-MFEngine.o -MD -MP -MF ".deps/mfengine-MFEngine.Tpo" -c -o mfengine-MFEngine.o test -f 'MFEngine.cpp' || echo '/home/mcnugget/src/MF-Engine/mfengine/src/'MFEngine.cpp; then mv -f ".deps/mfengine-MFEngine.Tpo" ".deps/mfengine-MFEngine.Po"; else rm -f ".deps/mfengine-MFEngine.Tpo"; exit 1; fi *In file included from /home/mcnugget/src/MF-Engine/mfengine/src/MFEngine.cpp:3: */home/mcnugget/src/MF-Engine/mfengine/src/MFTexture.h:9: error: ' BITMAPFILEHEADER' is used as a type, but is not defined as a type. */home/mcnugget/src/MF-Engine/mfengine/src/MFTexture.h:10: error: ' BITMAPINFOHEADER' is used as a type, but is not defined as a type. *if g++ -DHAVE_CONFIG_H -I. -I/home/mcnugget/src/MF-Engine/mfengine/src -I.. -O0 -g3 -MT mfengine-MFText.o -MD -MP -MF ".deps/mfengine-MFText.Tpo" -c -o mfengine-MFText.o test -f 'MFText.cpp' || echo '/home/mcnugget/src/MF-Engine/mfengine/src/'MFText.cpp; then mv -f ".deps/mfengine-MFText.Tpo" ".deps/mfengine-MFText.Po"; else rm -f ".deps/mfengine-MFText.Tpo"; exit 1; fi *make: *** [mfengine-MFEngine.o] Fehler 1 */home/mcnugget/src/MF-Engine/mfengine/src/MFText.cpp: In member function `int *MFText::LoadFont(const char*, unsigned int, const char*)': */home/mcnugget/src/MF-Engine/mfengine/src/MFText.cpp:202: error: `_stricmp' undeclared (first use this function) */home/mcnugget/src/MF-Engine/mfengine/src/MFText.cpp:202: error: (Each undeclared identifier is reported only once for each function it appears in.) */home/mcnugget/src/MF-Engine/mfengine/src/MFText.cpp: In member function `void *MFText::UnloadFont(const char*)': */home/mcnugget/src/MF-Engine/mfengine/src/MFText.cpp:263: error: `_stricmp' undeclared (first use this function) */home/mcnugget/src/MF-Engine/mfengine/src/MFText.cpp: In member function `int *MFText:rint(const char*, float, float, const char*, ...)': */home/mcnugget/src/MF-Engine/mfengine/src/MFText.cpp:274: error: `_stricmp' undeclared (first use this function) *make: *** [mfengine-MFText.o] Fehler 1 *if g++ -DHAVE_CONFIG_H -I. -I/home/mcnugget/src/MF-Engine/mfengine/src -I.. -O0 -g3 -MT mfengine-MFTexture.o -MD -MP -MF ".deps/mfengine-MFTexture.Tpo" -c -o mfengine-MFTexture.o test -f 'MFTexture.cpp' || echo '/home/mcnugget/src/MF-Engine/mfengine/src/'MFTexture.cpp; then mv -f ".deps/mfengine-MFTexture.Tpo" ".deps/mfengine-MFTexture.Po"; else rm -f ".deps/mfengine-MFTexture.Tpo"; exit 1; fi *In file included from /home/mcnugget/src/MF-Engine/mfengine/src/MFTexture.cpp:1: */home/mcnugget/src/MF-Engine/mfengine/src/MFTexture.h:9: error: ' BITMAPFILEHEADER' is used as a type, but is not defined as a type. */home/mcnugget/src/MF-Engine/mfengine/src/MFTexture.h:10: error: ' BITMAPINFOHEADER' is used as a type, but is not defined as a type. */home/mcnugget/src/MF-Engine/mfengine/src/MFTexture.cpp: In member function ` *uint MFTexture::LoadTexture(const char*)': */home/mcnugget/src/MF-Engine/mfengine/src/MFTexture.cpp:85: error: `_stricmp' undeclared (first use this function) */home/mcnugget/src/MF-Engine/mfengine/src/MFTexture.cpp:85: error: (Each undeclared identifier is reported only once for each function it appears in.) */home/mcnugget/src/MF-Engine/mfengine/src/MFTexture.cpp: In member function ` *uint MFTexture::FindTexture(const char*)': */home/mcnugget/src/MF-Engine/mfengine/src/MFTexture.cpp:105: error: `_stricmp' undeclared (first use this function) */home/mcnugget/src/MF-Engine/mfengine/src/MFTexture.cpp: In member function ` *void MFTexture::UnloadTexture(const char*)': */home/mcnugget/src/MF-Engine/mfengine/src/MFTexture.cpp:115: error: `_stricmp' undeclared (first use this function) */home/mcnugget/src/MF-Engine/mfengine/src/MFTexture.cpp: In member function ` *uint MFTexture::LoadBMP(const char*)': */home/mcnugget/src/MF-Engine/mfengine/src/MFTexture.cpp:162: error: 'struct BITMAP_IMAGE' has no member named 'bmfHeader' */home/mcnugget/src/MF-Engine/mfengine/src/MFTexture.cpp:165: error: 'struct BITMAP_IMAGE' has no member named 'bmiHeader' */ho *if g++ -DHAVE_CONFIG_H -I. -I/home/mcnugget/src/MF-Engine/mfengine/src -I.. -O0 -g3 -MT mfengine-MFTimer.o -MD -MP -MF ".deps/mfengine-MFTimer.Tpo" -c -o mfengine-MFTimer.o test -f 'MFTimer.cpp' || echo '/home/mcnugget/src/MF-Engine/mfengine/src/'MFTimer.cpp; then mv -f ".deps/mfengine-MFTimer.Tpo" ".deps/mfengine-MFTimer.Po"; else rm -f ".deps/mfengine-MFTimer.Tpo"; exit 1; fi *me/mcnugget/src/MF-Engine/mfengine/src/MFTexture.cpp:168: error: 'struct BITMAP_IMAGE' has no member named 'bmiHeader' */home/mcnugget/src/MF-Engine/mfengine/src/MFTexture.cpp:170: error: 'struct BITMAP_IMAGE' has no member named 'bmiHeader' */home/mcnugget/src/MF-Engine/mfengine/src/MFTexture.cpp:171: error: 'struct BITMAP_IMAGE' has no member named 'bmiHeader' */home/mcnugget/src/MF-Engine/mfengine/src/MFTexture.cpp:171: error: 'struct BITMAP_IMAGE' has no member named 'bmiHeader' */home/mcnugget/src/MF-Engine/mfengine/src/MFTexture.cpp:173: error: 'struct BITMAP_IMAGE' has no member named 'bmiHeader' */home/mcnugget/src/MF-Engine/mfengine/src/MFTexture.cpp:186: error: 'struct BITMAP_IMAGE' has no member named 'bmiHeader' */home/mcnugget/src/MF-Engine/mfengine/src/MFTexture.cpp:186: error: 'struct BITMAP_IMAGE' has no member named 'bmiHeader' *make: *** [mfengine-MFTexture.o] Fehler 1 *if g++ -DHAVE_CONFIG_H -I. -I/home/mcnugget/src/MF-Engine/mfengine/src -I.. -O0 -g3 -MT mfengine-MFVector2D.o -MD -MP -MF ".deps/mfengine-MFVector2D.Tpo" -c -o mfengine-MFVector2D.o test -f 'MFVector2D.cpp' || echo '/home/mcnugget/src/MF-Engine/mfengine/src/'MFVector2D.cpp; then mv -f ".deps/mfengine-MFVector2D.Tpo" ".deps/mfengine-MFVector2D.Po"; else rm -f ".deps/mfengine-MFVector2D.Tpo"; exit 1; fi *In file included from /home/mcnugget/src/MF-Engine/mfengine/src/MFTimer.cpp:1: */home/mcnugget/src/MF-Engine/mfengine/src/MFTimer.h:12: error: '__int64' is used as a type, but is not defined as a type. */home/mcnugget/src/MF-Engine/mfengine/src/MFTimer.h:14: error: Fehler beim Parsen before `,' token */home/mcnugget/src/MF-Engine/mfengine/src/MFTimer.h:18: error: 'DWORD' is used as a type, but is not defined as a type. */home/mcnugget/src/MF-Engine/mfengine/src/MFTimer.h:19: error: 'DWORD' is used as a type, but is not defined as a type. */home/mcnugget/src/MF-Engine/mfengine/src/MFTimer.h:22: error: 'DWORD' is used as a type, but is not defined as a type. */home/mcnugget/src/MF-Engine/mfengine/src/MFTimer.cpp: In constructor ` *MFTimer::MFTimer()': */home/mcnugget/src/MF-Engine/mfengine/src/MFTimer.cpp:5: error: `LARGE_INTEGER' undeclared (first use this function) */home/mcnugget/src/MF-Engine/mfengine/src/MFTimer.cpp:5: error: (Each undeclared identifier is reported only once for each *if g++ -DHAVE_CONFIG_H -I. -I/home/mcnugget/src/MF-Engine/mfengine/src -I.. -O0 -g3 -MT mfengine-MFVector3D.o -MD -MP -MF ".deps/mfengine-MFVector3D.Tpo" -c -o mfengine-MFVector3D.o test -f 'MFVector3D.cpp' || echo '/home/mcnugget/src/MF-Engine/mfengine/src/'MFVector3D.cpp; then mv -f ".deps/mfengine-MFVector3D.Tpo" ".deps/mfengine-MFVector3D.Po"; else rm -f ".deps/mfengine-MFVector3D.Tpo"; exit 1; fi *function it appears *in.) */home/mcnugget/src/MF-Engine/mfengine/src/MFTimer.cpp:5: error: Fehler beim Parsen before `)' token */home/mcnugget/src/MF-Engine/mfengine/src/MFTimer.cpp:5: error: `pf' undeclared (first use this function) */home/mcnugget/src/MF-Engine/mfengine/src/MFTimer.cpp:5: error: ` QueryPerformanceFrequency' undeclared (first use this function) */home/mcnugget/src/MF-Engine/mfengine/src/MFTimer.cpp:7: error: `tickold' undeclared (first use this function) */home/mcnugget/src/MF-Engine/mfengine/src/MFTimer.cpp: In member function `void *MFTimer::_Val2Proc()': */home/mcnugget/src/MF-Engine/mfengine/src/MFTimer.cpp:18: error: Fehler beim Parsen before `)' token */home/mcnugget/src/MF-Engine/mfengine/src/MFTimer.cpp:18: error: `pc2' undeclared (first use this function) */home/mcnugget/src/MF-Engine/mfengine/src/MFTimer.cpp:18: error: ` QueryPerformanceCounter' undeclared (first use this function) */home/mcnugget/src/MF-Engine/mfengine/src/MFTimer.cpp:19: error: `pc1' undeclared (first use this function) */home/mcnugget/src/MF-Engine/mfengine/src/MFTimer.cpp:20: error: Fehler beim Parsen before `)' token */home/mcnugget/src/MF-Engine/mfengine/src/MFTimer.cpp: In member function `int *MFTimer::_GetFps()': */home/mcnugget/src/MF-Engine/mfengine/src/MFTimer.cpp:27: error: `tick' undeclared (first use this function) */home/mcnugget/src/MF-Engine/mfengine/src/MFTimer.cpp:28: error: `tickdiff' undeclared (first use this function) *make: *** [mfengine-MFTimer.o] Fehler 1 */home/mcnugget/src/MF-Engine/mfengine/src/MFVector2D.cpp: In member function ` *double MFVector2D::Angle(MFVector2D)': */home/mcnugget/src/MF-Engine/mfengine/src/MFVector2D.cpp:117: error: `_isnan' undeclared (first use this function) */home/mcnugget/src/MF-Engine/mfengine/src/MFVector2D.cpp:117: error: (Each undeclared identifier is reported only once for each function it appears in.) *make: *** [mfengine-MFVector2D.o] Fehler 1 */home/mcnugget/src/MF-Engine/mfengine/src/MFVector3D.cpp: In member function ` *double MFVector3D::Angle(MFVector3D)': */home/mcnugget/src/MF-Engine/mfengine/src/MFVector3D.cpp:185: error: `_isnan' undeclared (first use this function) */home/mcnugget/src/MF-Engine/mfengine/src/MFVector3D.cpp:185: error: (Each undeclared identifier is reported only once for each function it appears in.) *make: *** [mfengine-MFVector3D.o] Fehler 1 *make: Das Target »all« wurde wegen Fehlern nicht aktualisiert. **** Exited with status: 2 ***
With best regards DarkKiller [edited by - DarkKiller on March 6, 2004 2:14:46 PM]
DarkMcNugget next time... ;)
DarkKiller
DarkKiller
I'm very sorry about the style of my post!

Tell me what tag I need

like
 and   
(I don't think that the forum will show my examples...) to clean it up!

Sorry!




ok, I found it! 'quote' was good enough

[edited by - DarkKiller on March 6, 2004 2:15:41 PM]
DarkMcNugget next time... ;)
jdhardy
jdhardy
You have to rewrite your code so that it doesn''t use windows.h. There is no such alternative on *nix systems.

Stuff like DWORD and the BITMAP stuff is easy: just copy the defines from windows.h, or, better, get rid of it altogether.

Anything that starts with an underscore (like _stricmp) is MSVCRT-specific, but should have a glibc equivalent (strcasecmp in this case, I think).

QueryPerformanceCounter I''m not entirely sure how to get rid of, but I''m pretty sure SDL has it''s own timer library, although it''s precision isn''t very good. There was topic in this forum on Unix timers not long ago.
robinei
robinei
You could perhaps use Winelib if you have to.

Since you''re using SDL, why don''t you use the facitities it provides?

You have SDL_GetTicks and SDL_LoadBMP, for example.

And I''m sure _stricmp could be replaced with something in the standard C library.

DWORD and such can easily be typedefed.
Bulma
Bulma
"*/home/mcnugget/src/MF-Engine/mfengine/src/MFTimer.cpp:18: error: Fehler beim Parsen before `)'' token "

German compiler?
Bulma
DarkKiller
DarkKiller
Thankx for this ''super-fast'' answer!

Well, I searched the SDL-Manual... I''ll that do again, but I think the only thing a found was an equivalent to GetTickCount(). This works well!

But thank you for the other things you said like ''strcasecmp'' I''ll try that!

I''ll drop a line here when its working!

regards

DarkKiller
DarkMcNugget next time... ;)
George2
George2
Your code is full with windows specific code.

Some solutions :

- DWORD is probably a typedef for unsigned long, so dump that in a header file or just replace it with unsigned long

- QueryPerformanceTimer can be replaced by gettimeofday (linux specific) or even better with SDL_GetTicks(), which is cross platform.

- The whole BITMAP stuff : use SDL''s bitmap loading functionality (SDL_LoadBMP)

- _stricmp : there''s strcasecmp which ignores the case and compares two strings (not exactly the same, but you can allways write it yourself).

- _isnan : why use something WIN32 specific when there is isnan in the standard C library ?

In general avoid functions in Windows which start with an underscore, they are not cross platform.


"THE INFORMATION CONTAINED IN THIS REPORT IS CLASSIFIED; DO NOT GO TO FOX NEWS TO READ OR OBTAIN A COPY." , the pentagon
DarkKiller
DarkKiller
Ho Bulma !

My German compiler speaks Germish (or Denglish)

@Robinei: I use PNG for the Textures. The file is much smaller and I can use things like transparency with the alpha-value (0-255) included within this file definition!

Winelib seems to be interesting! The SDL_GetTicks() is allready in use!

QueryPerformanceCounter() is used to get the time one single frame needs to be rendered! The SDL_GetTicks() and GetTickCount() is not able to give such a precision! So its absolutly necessary have somthing like that! It returns the time in micro seconds!
DarkMcNugget next time... ;)
DarkKiller
DarkKiller
ok, many things can compile correct now!

Great help after such a short time!!

But I''m still searching for


__int64
and LARGE_INTEGER

And I''m still searching for the defs for the BitMap..
DarkMcNugget next time... ;)
DarkKiller
DarkKiller
It looks like this now:

quote:

cd "/home/mcnugget/src/MF-Engine/mfengine/debug/src" && WANT_AUTOCONF_2_5="1" WANT_AUTOMAKE_1_6="1" make -k
*if g++ -DHAVE_CONFIG_H -I. -I/home/mcnugget/src/MF-Engine/mfengine/src -I.. -O0 -g3 -MT mfengine-ciSDL.o -MD -MP -MF ".deps/mfengine-ciSDL.Tpo" -c -o mfengine-ciSDL.o test -f ''ciSDL.cpp'' || echo ''/home/mcnugget/src/MF-Engine/mfengine/src/''ciSDL.cpp; then mv -f ".deps/mfengine-ciSDL.Tpo" ".deps/mfengine-ciSDL.Po"; else rm -f ".deps/mfengine-ciSDL.Tpo"; exit 1; fi
*if g++ -DHAVE_CONFIG_H -I. -I/home/mcnugget/src/MF-Engine/mfengine/src -I.. -O0 -g3 -MT mfengine-enginetest.o -MD -MP -MF ".deps/mfengine-enginetest.Tpo" -c -o mfengine-enginetest.o test -f ''enginetest.cpp'' || echo ''/home/mcnugget/src/MF-Engine/mfengine/src/''enginetest.cpp; then mv -f ".deps/mfengine-enginetest.Tpo" ".deps/mfengine-enginetest.Po"; else rm -f ".deps/mfengine-enginetest.Tpo"; exit 1; fi
*In file included from /home/mcnugget/src/MF-Engine/mfengine/src/enginetest.h:5,
*from /home/mcnugget/src/MF-Engine/mfengine/src/enginetest.cpp:1:
*/home/mcnugget/src/MF-Engine/mfengine/src/MFTexture.h:9: error: '' BITMAPFILEHEADER'' is used as a type, but is not defined as a type.
*/home/mcnugget/src/MF-Engine/mfengine/src/MFTexture.h:10: error: '' BITMAPINFOHEADER'' is used as a type, but is not defined as a type.
*In file included from /home/mcnugget/src/MF-Engine/mfengine/src/enginetest.h:9,
*from /home/mcnugget/src/MF-Engine/mfengine/src/enginetest.cpp:1:
*/home/mcnugget/src/MF-Engine/mfengine/src/MFTimer.h:12: error: ''__int64'' is used as a type, but is not defined as a type.
*/home/mcnugget/src/MF-Engine/mfengine/src/MFTimer.h:14: error: Fehler beim Parsen before ,'' token
*make: *** [mfengine-enginetest.o] Fehler 1
*if g++ -DHAVE_CONFIG_H -I. -I/home/mcnugget/src/MF-Engine/mfengine/src -I.. -O0 -g3 -MT mfengine-globals.o -MD -MP -MF ".deps/mfengine-globals.Tpo" -c -o mfengine-globals.o
test -f ''globals.cpp'' || echo ''/home/mcnugget/src/MF-Engine/mfengine/src/''globals.cpp; then mv -f ".deps/mfengine-globals.Tpo" ".deps/mfengine-globals.Po"; else rm -f ".deps/mfengine-globals.Tpo"; exit 1; fi
*if g++ -DHAVE_CONFIG_H -I. -I/home/mcnugget/src/MF-Engine/mfengine/src -I.. -O0 -g3 -MT mfengine-MFColor.o -MD -MP -MF ".deps/mfengine-MFColor.Tpo" -c -o mfengine-MFColor.o
test -f ''MFColor.cpp'' || echo ''/home/mcnugget/src/MF-Engine/mfengine/src/''MFColor.cpp; then mv -f ".deps/mfengine-MFColor.Tpo" ".deps/mfengine-MFColor.Po"; else rm -f ".deps/mfengine-MFColor.Tpo"; exit 1; fi
*if g++ -DHAVE_CONFIG_H -I. -I/home/mcnugget/src/MF-Engine/mfengine/src -I.. -O0 -g3 -MT mfengine-MFEngine.o -MD -MP -MF ".deps/mfengine-MFEngine.Tpo" -c -o mfengine-MFEngine.o
test -f ''MFEngine.cpp'' || echo ''/home/mcnugget/src/MF-Engine/mfengine/src/''MFEngine.cpp; then mv -f ".deps/mfengine-MFEngine.Tpo" ".deps/mfengine-MFEngine.Po"; else rm -f ".deps/mfengine-MFEngine.Tpo"; exit 1; fi
*In file included from /home/mcnugget/src/MF-Engine/mfengine/src/MFEngine.cpp:3:
*/home/mcnugget/src/MF-Engine/mfengine/src/MFTexture.h:9: error: '' BITMAPFILEHEADER'' is used as a type, but is not defined as a type.
*/home/mcnugget/src/MF-Engine/mfengine/src/MFTexture.h:10: error: '' BITMAPINFOHEADER'' is used as a type, but is not defined as a type.
*if g++ -DHAVE_CONFIG_H -I. -I/home/mcnugget/src/MF-Engine/mfengine/src -I.. -O0 -g3 -MT mfengine-MFInput.o -MD -MP -MF ".deps/mfengine-MFInput.Tpo" -c -o mfengine-MFInput.o
test -f ''MFInput.cpp'' || echo ''/home/mcnugget/src/MF-Engine/mfengine/src/''MFInput.cpp; then mv -f ".deps/mfengine-MFInput.Tpo" ".deps/mfengine-MFInput.Po"; else rm -f ".deps/mfengine-MFInput.Tpo"; exit 1; fi
*make: *** [mfengine-MFEngine.o] Fehler 1
*if g++ -DHAVE_CONFIG_H -I. -I/home/mcnugget/src/MF-Engine/mfengine/src -I.. -O0 -g3 -MT mfengine-MFMatrix.o -MD -MP -MF ".deps/mfengine-MFMatrix.Tpo" -c -o mfengine-MFMatrix.o
test -f ''MFMatrix.cpp'' || echo ''/home/mcnugget/src/MF-Engine/mfengine/src/''MFMatrix.cpp; then mv -f ".deps/mfengine-MFMatrix.Tpo" ".deps/mfengine-MFMatrix.Po"; else rm -f ".deps/mfengine-MFMatrix.Tpo"; exit 1; fi
*if g++ -DHAVE_CONFIG_H -I. -I/home/mcnugget/src/MF-Engine/mfengine/src -I.. -O0 -g3 -MT mfengine-MFPoint2D.o -MD -MP -MF ".deps/mfengine-MFPoint2D.Tpo" -c -o mfengine-MFPoint2D.o
test -f ''MFPoint2D.cpp'' || echo ''/home/mcnugget/src/MF-Engine/mfengine/src/''MFPoint2D.cpp; then mv -f ".deps/mfengine-MFPoint2D.Tpo" ".deps/mfengine-MFPoint2D.Po"; else rm -f ".deps/mfengine-MFPoint2D.Tpo"; exit 1; fi
*if g++ -DHAVE_CONFIG_H -I. -I/home/mcnugget/src/MF-Engine/mfengine/src -I.. -O0 -g3 -MT mfengine-MFPoint3D.o -MD -MP -MF ".deps/mfengine-MFPoint3D.Tpo" -c -o mfengine-MFPoint3D.o
test -f ''MFPoint3D.cpp'' || echo ''/home/mcnugget/src/MF-Engine/mfengine/src/''MFPoint3D.cpp; then mv -f ".deps/mfengine-MFPoint3D.Tpo" ".deps/mfengine-MFPoint3D.Po"; else rm -f ".deps/mfengine-MFPoint3D.Tpo"; exit 1; fi
*if g++ -DHAVE_CONFIG_H -I. -I/home/mcnugget/src/MF-Engine/mfengine/src -I.. -O0 -g3 -MT mfengine-MFQuaternion.o -MD -MP -MF ".deps/mfengine-MFQuaternion.Tpo" -c -o mfengine-MFQuaternion.o
test -f ''MFQuaternion.cpp'' || echo ''/home/mcnugget/src/MF-Engine/mfengine/src/''MFQuaternion.cpp; then mv -f ".deps/mfengine-MFQuaternion.Tpo" ".deps/mfengine-MFQuaternion.Po"; else rm -f ".deps/mfengine-MFQuaternion.Tpo"; exit 1; fi
*if g++ -DHAVE_CONFIG_H -I. -I/home/mcnugget/src/MF-Engine/mfengine/src -I.. -O0 -g3 -MT mfengine-MFRotation.o -MD -MP -MF ".deps/mfengine-MFRotation.Tpo" -c -o mfengine-MFRotation.o
test -f ''MFRotation.cpp'' || echo ''/home/mcnugget/src/MF-Engine/mfengine/src/''MFRotation.cpp; then mv -f ".deps/mfengine-MFRotation.Tpo" ".deps/mfengine-MFRotation.Po"; else rm -f ".deps/mfengine-MFRotation.Tpo"; exit 1; fi
*if g++ -DHAVE_CONFIG_H -I. -I/home/mcnugget/src/MF-Engine/mfengine/src -I.. -O0 -g3 -MT mfengine-MFText.o -MD -MP -MF ".deps/mfengine-MFText.Tpo" -c -o mfengine-MFText.o
test -f ''MFText.cpp'' || echo ''/home/mcnugget/src/MF-Engine/mfengine/src/''MFText.cpp; then mv -f ".deps/mfengine-MFText.Tpo" ".deps/mfengine-MFText.Po"; else rm -f ".deps/mfengine-MFText.Tpo"; exit 1; fi
*if g++ -DHAVE_CONFIG_H -I. -I/home/mcnugget/src/MF-Engine/mfengine/src -I.. -O0 -g3 -MT mfengine-MFTexture.o -MD -MP -MF ".deps/mfengine-MFTexture.Tpo" -c -o mfengine-MFTexture.o
test -f ''MFTexture.cpp'' || echo ''/home/mcnugget/src/MF-Engine/mfengine/src/''MFTexture.cpp; then mv -f ".deps/mfengine-MFTexture.Tpo" ".deps/mfengine-MFTexture.Po"; else rm -f ".deps/mfengine-MFTexture.Tpo"; exit 1; fi
*In file included from /home/mcnugget/src/MF-Engine/mfengine/src/MFTexture.cpp:1:
*/home/mcnugget/src/MF-Engine/mfengine/src/MFTexture.h:9: error: '' BITMAPFILEHEADER'' is used as a type, but is not defined as a type.
*/home/mcnugget/src/MF-Engine/mfengine/src/MFTexture.h:10: error: '' BITMAPINFOHEADER'' is used as a type, but is not defined as a type.
*/home/mcnugget/src/MF-Engine/mfengine/src/MFTexture.cpp: In member function

*uint MFTexture::LoadBMP(const char*)'':
*/home/mcnugget/src/MF-Engine/mfengine/src/MFTexture.cpp:162: error: ''struct BITMAP_IMAGE'' has no member named ''bmfHeader''
*/home/mcnugget/src/MF-Engine/mfengine/src/MFTexture.cpp:165: error: ''struct BITMAP_IMAGE'' has no member named ''bmiHeader''
*/home/mcnugget/src/MF-Engine/mfengine/src/MFTexture.cpp:168: error: ''struct BITMAP_IMAGE'' has no member named ''bmiHeader''
*/home/mcnugget/src/MF-Engine/mfengine/src/MFTexture.cpp:170: error: ''struct BITMAP_IMAGE'' has no member named ''bmiHeader''
*/home/mcnugget/src/MF-Engine/mfengine/src/MFTexture.cpp:171: error: ''struct BITMAP_IMAGE'' has no member named ''bmiHeader''
*/home/mcnugget/src/MF-Engine/mfengine/src/MFTexture.cpp:171: error: ''struct BITMAP_IMAGE'' has no member named ''bmiHeader''
*/home/mcnugget/src/MF-Engine/mfengine/src/MFTexture.cpp:173: error: ''struct BITMAP_IMAGE'' has no member named ''bmiHeader''
*/home/mcnugget/src/MF-Engine/mfengine/src/MFTexture.cpp:186: error: ''struct BITMAP_IMAGE'' has no member named ''bmiHeader''
*/home/mcnugget/src/MF-Engine/mfengine/src/MFTexture.cpp:186: error: ''struct BITMAP_IMAGE'' has no member named ''bmiHeader''
*if g++ -DHAVE_CONFIG_H -I. -I/home/mcnugget/src/MF-Engine/mfengine/src -I.. -O0 -g3 -MT mfengine-MFTimer.o -MD -MP -MF ".deps/mfengine-MFTimer.Tpo" -c -o mfengine-MFTimer.o test -f ''MFTimer.cpp'' || echo ''/home/mcnugget/src/MF-Engine/mfengine/src/''MFTimer.cpp; then mv -f ".deps/mfengine-MFTimer.Tpo" ".deps/mfengine-MFTimer.Po"; else rm -f ".deps/mfengine-MFTimer.Tpo"; exit 1; fi
*make: *** [mfengine-MFTexture.o] Fehler 1
*In file included from /home/mcnugget/src/MF-Engine/mfengine/src/MFTimer.cpp:1:
*/home/mcnugget/src/MF-Engine/mfengine/src/MFTimer.h:12: error: ''__int64'' is used as a type, but is not defined as a type.
*/home/mcnugget/src/MF-Engine/mfengine/src/MFTimer.h:14: error: Fehler beim Parsen before ,'' token
*/home/mcnugget/src/MF-Engine/mfengine/src/MFTimer.cpp: In constructor

*MFTimer::MFTimer()'':
*/home/mcnugget/src/MF-Engine/mfengine/src/MFTimer.cpp:5: error: LARGE_INTEGER'' undeclared (first use this function)
*/home/mcnugget/src/MF-Engine/mfengine/src/MFTimer.cpp:5: error: (Each undeclared identifier is reported only once for each function it appears in.)
*/home/mcnugget/src/MF-Engine/mfengine/src/MFTimer.cpp:5: error: Fehler beim Parsen before
)'' token
*/home/mcnugget/src/MF-Engine/mfengine/src/MFTimer.cpp:5: error: pf'' undeclared (first use this function)
*/home/mcnugget/src/MF-Engine/mfengine/src/MFTimer.cpp:5: error:
QueryPerformanceFrequency'' undeclared (first use this functi
*if g++ -DHAVE_CONFIG_H -I. -I/home/mcnugget/src/MF-Engine/mfengine/src -I.. -O0 -g3 -MT mfengine-MFVector2D.o -MD -MP -MF ".deps/mfengine-MFVector2D.Tpo" -c -o mfengine-MFVector2D.o test -f ''MFVector2D.cpp'' || echo ''/home/mcnugget/src/MF-Engine/mfengine/src/''MFVector2D.cpp; then mv -f ".deps/mfengine-MFVector2D.Tpo" ".deps/mfengine-MFVector2D.Po"; else rm -f ".deps/mfengine-MFVector2D.Tpo"; exit 1; fi
*on)
*/home/mcnugget/src/MF-Engine/mfengine/src/MFTimer.cpp: In member function void
*MFTimer::_Val2Proc()'':
*/home/mcnugget/src/MF-Engine/mfengine/src/MFTimer.cpp:18: error: Fehler beim Parsen before
)'' token
*/home/mcnugget/src/MF-Engine/mfengine/src/MFTimer.cpp:18: error: pc2'' undeclared (first use this function)
*/home/mcnugget/src/MF-Engine/mfengine/src/MFTimer.cpp:18: error:
QueryPerformanceCounter'' undeclared (first use this function)
*/home/mcnugget/src/MF-Engine/mfengine/src/MFTimer.cpp:19: error: pc1'' undeclared (first use this function)
*/home/mcnugget/src/MF-Engine/mfengine/src/MFTimer.cpp:20: error: Fehler beim Parsen before
)'' token
*if g++ -DHAVE_CONFIG_H -I. -I/home/mcnugget/src/MF-Engine/mfengine/src -I.. -O0 -g3 -MT mfengine-MFVector3D.o -MD -MP -MF ".deps/mfengine-MFVector3D.Tpo" -c -o mfengine-MFVector3D.o test -f ''MFVector3D.cpp'' || echo ''/home/mcnugget/src/MF-Engine/mfengine/src/''MFVector3D.cpp; then mv -f ".deps/mfengine-MFVector3D.Tpo" ".deps/mfengine-MFVector3D.Po"; else rm -f ".deps/mfengine-MFVector3D.Tpo"; exit 1; fi
*make: *** [mfengine-MFTimer.o] Fehler 1
*make: Das Target »all« wurde wegen Fehlern nicht aktualisiert.
**** Exited with status: 2 ***

DarkMcNugget next time... ;)
me22
me22
int64 on most 32 bit architectures is a long long

I've got the following in my universal header:

// Fixed-Width Integer Types
typedef signed char int8_t;
typedef unsigned char uint8_t;
typedef signed short int16_t;
typedef unsigned short uint16_t;
typedef signed long int32_t;
typedef unsigned long uint32_t;
typedef signed long long int64_t;
typedef unsigned long long uint64_t;

// Fixed-Width Float Types
typedef float float32_t;
typedef double float64_t;
typedef long double float128_t;


I think that <stddef.h> does some of these, but I don't think it's ISO...

[edited by - me22 on March 6, 2004 2:50:57 PM]

[edited by - me22 on March 6, 2004 2:51:34 PM]
Fruny
Fruny
For ''isnan'', you can do it two ways. Either check whether the number is not equal to itself: as surprising as it sounds, NaN != NaN.
Alternatively you can test for the specific bit pattern: maximal exponent field, non-zero mantissa field (maximal exponent and zero mantissa represents infinity).


“Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it.” — Brian W. Kernighan (C programming language co-inventor)
"Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it." — Brian W. Kernighan
DarkKiller
DarkKiller
ok, thats good to know!

I found the same function: ''isnan'' within the standard c++ includes! I think its implemented in math.h. This should work on both systems. If not I''ll write a little macro.


How can I inplement the typecast: LARGE_INTEGER for

QueryPerformanceCounter((LARGE_INTEGER*)&pc2);

DarkMcNugget next time... ;)
DarkKiller
DarkKiller
@George2: Hey, youre right! I found GetTimeOfDay() as an equivalent for my QueryPerformanceCounter()! Thankx a lott for this information!
DarkMcNugget next time... ;)
DarkKiller
DarkKiller
which lib do I have to include within the project options (like libSDL) to use the OpenGL functions like... whatever you can think of....

??

Which package do I need?
DarkMcNugget next time... ;)
DarkKiller
DarkKiller
About my System:

I have a Debian running with a 2.4.22 Kernel and a NVidia GeForge2 TI with nvidia-driver correctly installed, openGL is running.

But I cannot compile the Engine because I don''t have the libGL (or however it is called - cannot find any information via google).
It also seems like that I don''t have the freetype libs.

Here is the compilerlisting:



quote:


cd "/home/mcnugget/src/MF-Engine/mfengine/debug" && WANT_AUTOCONF_2_5="1" WANT_AUTOMAKE_1_6="1" make -k
*make all-recursive
*Making all in src
*if g++ -DHAVE_CONFIG_H -I. -I/home/mcnugget/src/MF-Engine/mfengine/src -I.. -I/usr/include/SDL -D_REENTRANT -O0 -g3 -MT mfengine-ciSDL.o -MD -MP -MF ".deps/mfengine-ciSDL.Tpo" -c -o mfengine-ciSDL.o test -f ''ciSDL.cpp'' || echo ''/home/mcnugget/src/MF-Engine/mfengine/src/''ciSDL.cpp; then mv -f ".deps/mfengine-ciSDL.Tpo" ".deps/mfengine-ciSDL.Po"; else rm -f ".deps/mfengine-ciSDL.Tpo"; exit 1; fi
*if g++ -DHAVE_CONFIG_H -I. -I/home/mcnugget/src/MF-Engine/mfengine/src -I.. -I/usr/include/SDL -D_REENTRANT -O0 -g3 -MT mfengine-enginetest.o -MD -MP -MF ".deps/mfengine-enginetest.Tpo" -c -o mfengine-enginetest.o test -f ''enginetest.cpp'' || echo ''/home/mcnugget/src/MF-Engine/mfengine/src/''enginetest.cpp; then mv -f ".deps/mfengine-enginetest.Tpo" ".deps/mfengine-enginetest.Po"; else rm -f ".deps/mfengine-enginetest.Tpo"; exit 1; fi
*if g++ -DHAVE_CONFIG_H -I. -I/home/mcnugget/src/MF-Engine/mfengine/src -I.. -I/usr/include/SDL -D_REENTRANT -O0 -g3 -MT mfengine-globals.o -MD -MP -MF ".deps/mfengine-globals.Tpo" -c -o mfengine-globals.o test -f ''globals.cpp'' || echo ''/home/mcnugget/src/MF-Engine/mfengine/src/''globals.cpp; then mv -f ".deps/mfengine-globals.Tpo" ".deps/mfengine-globals.Po"; else rm -f ".deps/mfengine-globals.Tpo"; exit 1; fi
*if g++ -DHAVE_CONFIG_H -I. -I/home/mcnugget/src/MF-Engine/mfengine/src -I.. -I/usr/include/SDL -D_REENTRANT -O0 -g3 -MT mfengine-MFColor.o -MD -MP -MF ".deps/mfengine-MFColor.Tpo" -c -o mfengine-MFColor.o test -f ''MFColor.cpp'' || echo ''/home/mcnugget/src/MF-Engine/mfengine/src/''MFColor.cpp; then mv -f ".deps/mfengine-MFColor.Tpo" ".deps/mfengine-MFColor.Po"; else rm -f ".deps/mfengine-MFColor.Tpo"; exit 1; fi
*if g++ -DHAVE_CONFIG_H -I. -I/home/mcnugget/src/MF-Engine/mfengine/src -I.. -I/usr/include/SDL -D_REENTRANT -O0 -g3 -MT mfengine-MFEngine.o -MD -MP -MF ".deps/mfengine-MFEngine.Tpo" -c -o mfengine-MFEngine.o test -f ''MFEngine.cpp'' || echo ''/home/mcnugget/src/MF-Engine/mfengine/src/''MFEngine.cpp; then mv -f ".deps/mfengine-MFEngine.Tpo" ".deps/mfengine-MFEngine.Po"; else rm -f ".deps/mfengine-MFEngine.Tpo"; exit 1; fi
*if g++ -DHAVE_CONFIG_H -I. -I/home/mcnugget/src/MF-Engine/mfengine/src -I.. -I/usr/include/SDL -D_REENTRANT -O0 -g3 -MT mfengine-MFInput.o -MD -MP -MF ".deps/mfengine-MFInput.Tpo" -c -o mfengine-MFInput.o test -f ''MFInput.cpp'' || echo ''/home/mcnugget/src/MF-Engine/mfengine/src/''MFInput.cpp; then mv -f ".deps/mfengine-MFInput.Tpo" ".deps/mfengine-MFInput.Po"; else rm -f ".deps/mfengine-MFInput.Tpo"; exit 1; fi
*if g++ -DHAVE_CONFIG_H -I. -I/home/mcnugget/src/MF-Engine/mfengine/src -I.. -I/usr/include/SDL -D_REENTRANT -O0 -g3 -MT mfengine-MFMatrix.o -MD -MP -MF ".deps/mfengine-MFMatrix.Tpo" -c -o mfengine-MFMatrix.o test -f ''MFMatrix.cpp'' || echo ''/home/mcnugget/src/MF-Engine/mfengine/src/''MFMatrix.cpp; then mv -f ".deps/mfengine-MFMatrix.Tpo" ".deps/mfengine-MFMatrix.Po"; else rm -f ".deps/mfengine-MFMatrix.Tpo"; exit 1; fi
*if g++ -DHAVE_CONFIG_H -I. -I/home/mcnugget/src/MF-Engine/mfengine/src -I.. -I/usr/include/SDL -D_REENTRANT -O0 -g3 -MT mfengine-MFPoint2D.o -MD -MP -MF ".deps/mfengine-MFPoint2D.Tpo" -c -o mfengine-MFPoint2D.o test -f ''MFPoint2D.cpp'' || echo ''/home/mcnugget/src/MF-Engine/mfengine/src/''MFPoint2D.cpp; then mv -f ".deps/mfengine-MFPoint2D.Tpo" ".deps/mfengine-MFPoint2D.Po"; else rm -f ".deps/mfengine-MFPoint2D.Tpo"; exit 1; fi
*if g++ -DHAVE_CONFIG_H -I. -I/home/mcnugget/src/MF-Engine/mfengine/src -I.. -I/usr/include/SDL -D_REENTRANT -O0 -g3 -MT mfengine-MFPoint3D.o -MD -MP -MF ".deps/mfengine-MFPoint3D.Tpo" -c -o mfengine-MFPoint3D.o test -f ''MFPoint3D.cpp'' || echo ''/home/mcnugget/src/MF-Engine/mfengine/src/''MFPoint3D.cpp; then mv -f ".deps/mfengine-MFPoint3D.Tpo" ".deps/mfengine-MFPoint3D.Po"; else rm -f ".deps/mfengine-MFPoint3D.Tpo"; exit 1; fi
*if g++ -DHAVE_CONFIG_H -I. -I/home/mcnugget/src/MF-Engine/mfengine/src -I.. -I/usr/include/SDL -D_REENTRANT -O0 -g3 -MT mfengine-MFQuaternion.o -MD -MP -MF ".deps/mfengine-MFQuaternion.Tpo" -c -o mfengine-MFQuaternion.o test -f ''MFQuaternion.cpp'' || echo ''/home/mcnugget/src/MF-Engine/mfengine/src/''MFQuaternion.cpp; then mv -f ".deps/mfengine-MFQuaternion.Tpo" ".deps/mfengine-MFQuaternion.Po"; else rm -f ".deps/mfengine-MFQuaternion.Tpo"; exit 1; fi
*if g++ -DHAVE_CONFIG_H -I. -I/home/mcnugget/src/MF-Engine/mfengine/src -I.. -I/usr/include/SDL -D_REENTRANT -O0 -g3 -MT mfengine-MFRotation.o -MD -MP -MF ".deps/mfengine-MFRotation.Tpo" -c -o mfengine-MFRotation.o test -f ''MFRotation.cpp'' || echo ''/home/mcnugget/src/MF-Engine/mfengine/src/''MFRotation.cpp; then mv -f ".deps/mfengine-MFRotation.Tpo" ".deps/mfengine-MFRotation.Po"; else rm -f ".deps/mfengine-MFRotation.Tpo"; exit 1; fi
*if g++ -DHAVE_CONFIG_H -I. -I/home/mcnugget/src/MF-Engine/mfengine/src -I.. -I/usr/include/SDL -D_REENTRANT -O0 -g3 -MT mfengine-MFText.o -MD -MP -MF ".deps/mfengine-MFText.Tpo" -c -o mfengine-MFText.o test -f ''MFText.cpp'' || echo ''/home/mcnugget/src/MF-Engine/mfengine/src/''MFText.cpp; then mv -f ".deps/mfengine-MFText.Tpo" ".deps/mfengine-MFText.Po"; else rm -f ".deps/mfengine-MFText.Tpo"; exit 1; fi
*if g++ -DHAVE_CONFIG_H -I. -I/home/mcnugget/src/MF-Engine/mfengine/src -I.. -I/usr/include/SDL -D_REENTRANT -O0 -g3 -MT mfengine-MFTimer.o -MD -MP -MF ".deps/mfengine-MFTimer.Tpo" -c -o mfengine-MFTimer.o test -f ''MFTimer.cpp'' || echo ''/home/mcnugget/src/MF-Engine/mfengine/src/''MFTimer.cpp; then mv -f ".deps/mfengine-MFTimer.Tpo" ".deps/mfengine-MFTimer.Po"; else rm -f ".deps/mfengine-MFTimer.Tpo"; exit 1; fi
*if g++ -DHAVE_CONFIG_H -I. -I/home/mcnugget/src/MF-Engine/mfengine/src -I.. -I/usr/include/SDL -D_REENTRANT -O0 -g3 -MT mfengine-MFVector2D.o -MD -MP -MF ".deps/mfengine-MFVector2D.Tpo" -c -o mfengine-MFVector2D.o test -f ''MFVector2D.cpp'' || echo ''/home/mcnugget/src/MF-Engine/mfengine/src/''MFVector2D.cpp; then mv -f ".deps/mfengine-MFVector2D.Tpo" ".deps/mfengine-MFVector2D.Po"; else rm -f ".deps/mfengine-MFVector2D.Tpo"; exit 1; fi
*if g++ -DHAVE_CONFIG_H -I. -I/home/mcnugget/src/MF-Engine/mfengine/src -I.. -I/usr/include/SDL -D_REENTRANT -O0 -g3 -MT mfengine-MFVector3D.o -MD -MP -MF ".deps/mfengine-MFVector3D.Tpo" -c -o mfengine-MFVector3D.o test -f ''MFVector3D.cpp'' || echo ''/home/mcnugget/src/MF-Engine/mfengine/src/''MFVector3D.cpp; then mv -f ".deps/mfengine-MFVector3D.Tpo" ".deps/mfengine-MFVector3D.Po"; else rm -f ".deps/mfengine-MFVector3D.Tpo"; exit 1; fi
*/bin/sh ../libtool --mode=link g++ -O0 -g3 -o mfengine mfengine-ciSDL.o mfengine-enginetest.o mfengine-globals.o mfengine-MFColor.o mfengine-MFEngine.o mfengine-MFInput.o mfengine-MFMatrix.o mfengine-MFPoint2D.o mfengine-MFPoint3D.o mfengine-MFQuaternion.o mfengine-MFRotation.o mfengine-MFText.o mfengine-MFTimer.o mfengine-MFVector2D.o mfengine-MFVector3D.o -lSDL -lpthread
*mkdir .libs
*g++ -O0 -g3 -o mfengine mfengine-ciSDL.o mfengine-enginetest.o mfengine-globals.o mfengine-MFColor.o mfengine-MFEngine.o mfengine-MFInput.o mfengine-MFMatrix.o mfengine-MFPoint2D.o mfengine-MFPoint3D.o mfengine-MFQuaternion.o mfengine-MFRotation.o mfengine-MFText.o mfengine-MFTimer.o mfengine-MFVector2D.o mfengine-MFVector3D.o /usr/lib/libSDL.so -lm -ldl -L/usr/X11R6/lib -lX11 -lXext -lpthread
*mfengine-enginetest.o(.text+0x1bc): In function SetupOpenGL(int, int)'':
*/home/mcnugget/src/MF-Engine/mfengine/src/enginetest.cpp:22: undefined reference to
glShadeModel''
*mfengine-enginetest.o(.text+0x1d0):/home/mcnugget/src/MF-Engine/mfengine/src/enginetest.cpp:23: undefined reference to glPolygonMode''
*mfengine-enginetest.o(.text+0x1dc):/home/mcnugget/src/MF-Engine/mfengine/src/enginetest.cpp:26: undefined reference to
glEnable''
*mfengine-enginetest.o(.text+0x1e8):/home/mcnugget/src/MF-Engine/mfengine/src/enginetest.cpp:27: undefined reference to glEnable''
*mfengine-enginetest.o(.text+0x1f4):/home/mcnugget/src/MF-Engine/mfengine/src/enginetest.cpp:28: undefined reference to
glDepthFunc''
*mfengine-enginetest.o(.text+0x208):/home/mcnugget/src/MF-Engine/mfengine/src/enginetest.cpp:29: undefined reference to glBlendFunc''
*mfengine-enginetest.o(.text+0x21c):/home/mcnugget/src/MF-Engine/mfengine/src/enginetest.cpp:30: undefined reference to
glHint''
*mfengine-enginetest.o(.text+0x244):/home/mcnugget/src/MF-Engine/mfengine/src/enginetest.cpp:31: undefined reference to glClearColor''
*mfengine-enginetest.o(.text+0x24e):/home/mcnugget/src/MF-Engine/mfengine/src/enginetest.cpp:32: undefined reference to
glClearDepth''
*mfengine-enginetest.o(.text+0x270):/home/mcnugget/src/MF-Engine/mfengine/src/enginetest.cpp:34: undefined reference to glViewport''
*mfengine-enginetest.o(.text+0x27c):/home/mcnugget/src/MF-Engine/mfengine/src/enginetest.cpp:35: undefined reference to
glMatrixMode''
*mfengine-enginetest.o(.text+0x281):/home/mcnugget/src/MF-Engine/mfengine/src/enginetest.cpp:36: undefined reference to glLoadIdentity''
*mfengine-enginetest.o(.text+0x2af):/home/mcnugget/src/MF-Engine/mfengine/src/enginetest.cpp:38: undefined reference to
gluPerspective''
*mfengine-enginetest.o(.text+0x2bb):/home/mcnugget/src/MF-Engine/mfengine/src/enginetest.cpp:40: undefined reference to glMatrixMode''
*mfengine-enginetest.o(.text+0x2c0):/home/mcnugget/src/MF-Engine/mfengine/src/enginetest.cpp:41: undefined reference to
glLoadIdentity''
*mfengine-enginetest.o(.text+0x2fe): In function DrawScene()'':
*/home/mcnugget/src/MF-Engine/mfengine/src/enginetest.cpp:49: undefined reference to
glClear''
*mfengine-enginetest.o(.text+0x303):/home/mcnugget/src/MF-Engine/mfengine/src/enginetest.cpp:50: undefined reference to glLoadIdentity''
*mfengine-MFText.o(.text+0x2cb): In function
MFText::_FontData::MakeDList(FT_FaceRec_*, unsigned char, unsigned, unsigned*)'':
*/home/mcnugget/src/MF-Engine/mfengine/src/MFText.cpp:56: undefined reference to FT_Get_Char_Index''
*mfengine-MFText.o(.text+0x2e2): In function
MFText::_FontData::MakeDList(FT_FaceRec_*, unsigned char, unsigned, unsigned*)'':
*/usr/include/c++/3.3/bits/vector.tcc:257: undefined reference to FT_Load_Glyph''
*mfengine-MFText.o(.text+0x313): In function
MFText::_FontData::MakeDList(FT_FaceRec_*, unsigned char, unsigned, unsigned*)'':
*/home/mcnugget/src/MF-Engine/mfengine/src/MFText.cpp:63: undefined reference to FT_Get_Glyph''
*mfengine-MFText.o(.text+0x352):/home/mcnugget/src/MF-Engine/mfengine/src/MFText.cpp:69: undefined reference to
FT_Glyph_To_Bitmap''
*mfengine-MFText.o(.text+0x475):/home/mcnugget/src/MF-Engine/mfengine/src/MFText.cpp:98: undefined reference to glBindTexture''
*mfengine-MFText.o(.text+0x491):/home/mcnugget/src/MF-Engine/mfengine/src/MFText.cpp:99: undefined reference to
glTexParameteri''
*mfengine-MFText.o(.text+0x4ad):/home/mcnugget/src/MF-Engine/mfengine/src/MFText.cpp:100: undefined reference to glTexParameteri''
*mfengine-MFText.o(.text+0x4f6):/home/mcnugget/src/MF-Engine/mfengine/src/MFText.cpp:105: undefined reference to
glTexImage2D''
*mfengine-MFText.o(.text+0x51e):/home/mcnugget/src/MF-Engine/mfengine/src/MFText.cpp:111: undefined reference to glNewList''
*mfengine-MFText.o(.text+0x53f):/home/mcnugget/src/MF-Engine/mfengine/src/MFText.cpp:112: undefined reference to
glBindTexture''
*mfengine-MFText.o(.text+0x55f):/home/mcnugget/src/MF-Engine/mfengine/src/MFText.cpp:117: undefined reference to glTranslatef''
*mfengine-MFText.o(.text+0x564):/home/mcnugget/src/MF-Engine/mfengine/src/MFText.cpp:122: undefined reference to
glPushMatrix''
*mfengine-MFText.o(.text+0x593):/home/mcnugget/src/MF-Engine/mfengine/src/MFText.cpp:123: undefined reference to glTranslatef''
*mfengine-MFText.o(.text+0x5ba):/home/mcnugget/src/MF-Engine/mfengine/src/MFText.cpp:140: undefined reference to
glBegin''
*mfengine-MFText.o(.text+0x5ca):/home/mcnugget/src/MF-Engine/mfengine/src/MFText.cpp:141: undefined reference to glTexCoord2d''
*mfengine-MFText.o(.text+0x5e0):/home/mcnugget/src/MF-Engine/mfengine/src/MFText.cpp:141: undefined reference to
glVertex2f''
*mfengine-MFText.o(.text+0x5f1):/home/mcnugget/src/MF-Engine/mfengine/src/MFText.cpp:142: undefined reference to glTexCoord2d''
*mfengine-MFText.o(.text+0x607):/home/mcnugget/src/MF-Engine/mfengine/src/MFText.cpp:142: undefined reference to
glVertex2f''
*mfengine-MFText.o(.text+0x619):/home/mcnugget/src/MF-Engine/mfengine/src/MFText.cpp:143: undefined reference to glTexCoord2d''
*mfengine-MFText.o(.text+0x630):/home/mcnugget/src/MF-Engine/mfengine/src/MFText.cpp:143: undefined reference to
glVertex2f''
*mfengine-MFText.o(.text+0x641):/home/mcnugget/src/MF-Engine/mfengine/src/MFText.cpp:144: undefined reference to glTexCoord2d''
*mfengine-MFText.o(.text+0x658):/home/mcnugget/src/MF-Engine/mfengine/src/MFText.cpp:144: undefined reference to
glVertex2f''
*mfengine-MFText.o(.text+0x65d):/home/mcnugget/src/MF-Engine/mfengine/src/MFText.cpp:145: undefined reference to glEnd''
*mfengine-MFText.o(.text+0x662):/home/mcnugget/src/MF-Engine/mfengine/src/MFText.cpp:146: undefined reference to
glPopMatrix''
*mfengine-MFText.o(.text+0x690):/home/mcnugget/src/MF-Engine/mfengine/src/MFText.cpp:147: undefined reference to glTranslatef''
*mfengine-MFText.o(.text+0x695):/home/mcnugget/src/MF-Engine/mfengine/src/MFText.cpp:154: undefined reference to
glEndList''
*mfengine-MFText.o(.text+0x6b4): In function MFText::_FontData:ushScreenCoordinateMatrix()'':
*/home/mcnugget/src/MF-Engine/mfengine/src/MFText.cpp:161: undefined reference to
glPushAttrib''
*mfengine-MFText.o(.text+0x6c7):/home/mcnugget/src/MF-Engine/mfengine/src/MFText.cpp:163: undefined reference to glGetIntegerv''
*mfengine-MFText.o(.text+0x6d3):/home/mcnugget/src/MF-Engine/mfengine/src/MFText.cpp:164: undefined reference to
glMatrixMode''
*mfengine-MFText.o(.text+0x6d8):/home/mcnugget/src/MF-Engine/mfengine/src/MFText.cpp:165: undefined reference to glPushMatrix''
*mfengine-MFText.o(.text+0x6dd):/home/mcnugget/src/MF-Engine/mfengine/src/MFText.cpp:166: undefined reference to
glLoadIdentity''
*mfengine-MFText.o(.text+0x6fd):/home/mcnugget/src/MF-Engine/mfengine/src/MFText.cpp:167: undefined reference to gluOrtho2D''
*mfengine-MFText.o(.text+0x702):/home/mcnugget/src/MF-Engine/mfengine/src/MFText.cpp:168: undefined reference to
glPopAttrib''
*mfengine-MFText.o(.text+0x716): In function MFText::_FontData:opProjectionMatrix()'':
*/home/mcnugget/src/MF-Engine/mfengine/src/MFText.cpp:173: undefined reference to
glPushAttrib''
*mfengine-MFText.o(.text+0x722):/home/mcnugget/src/MF-Engine/mfengine/src/MFText.cpp:174: undefined reference to glMatrixMode''
*mfengine-MFText.o(.text+0x727):/home/mcnugget/src/MF-Engine/mfengine/src/MFText.cpp:175: undefined reference to
glPopMatrix''
*mfengine-MFText.o(.text+0x72c):/home/mcnugget/src/MF-Engine/mfengine/src/MFText.cpp:176: undefined reference to glPopAttrib''
*mfengine-MFText.o(.text+0x753): In function
MFText::_FontData::Clean()'':
*/home/mcnugget/src/MF-Engine/mfengine/src/MFText.cpp:182: undefined reference to glDeleteLists''
*mfengine-MFText.o(.text+0x772):/home/mcnugget/src/MF-Engine/mfengine/src/MFText.cpp:185: undefined reference to
glDeleteTextures''
*mfengine-MFText.o(.text+0x93a): In function MFText::LoadFont(char const*, unsigned, char const*)'':
*/home/mcnugget/src/MF-Engine/mfengine/src/MFText.cpp:217: undefined reference to
FT_Init_FreeType''
*mfengine-MFText.o(.text+0x982):/home/mcnugget/src/MF-Engine/mfengine/src/MFText.cpp:229: undefined reference to FT_New_Face''
*mfengine-MFText.o(.text+0x9d8):/home/mcnugget/src/MF-Engine/mfengine/src/MFText.cpp:235: undefined reference to
FT_Set_Char_Size''
*mfengine-MFText.o(.text+0x9e4):/home/mcnugget/src/MF-Engine/mfengine/src/MFText.cpp:237: undefined reference to glGenLists''
*mfengine-MFText.o(.text+0x9fa):/home/mcnugget/src/MF-Engine/mfengine/src/MFText.cpp:238: undefined reference to
glGenTextures''
*mfengine-MFText.o(.text+0xa5f):/home/mcnugget/src/MF-Engine/mfengine/src/MFText.cpp:249: undefined reference to FT_Done_Face''
*mfengine-MFText.o(.text+0xa6a):/home/mcnugget/src/MF-Engine/mfengine/src/MFText.cpp:252: undefined reference to
FT_Done_FreeType''
*mfengine-MFText.o(.text+0xe08): In function MFText:rint(char const*, float, float, char const*, ...)'':
*/home/mcnugget/src/MF-Engine/mfengine/src/MFText.cpp:325: undefined reference to
glPushAttrib''
*mfengine-MFText.o(.text+0xe14):/home/mcnugget/src/MF-Engine/mfengine/src/MFText.cpp:326: undefined reference to glMatrixMode''
*mfengine-MFText.o(.text+0xe20):/home/mcnugget/src/MF-Engine/mfengine/src/MFText.cpp:327: undefined reference to
glDisable''
*mfengine-MFText.o(.text+0xe2c):/home/mcnugget/src/MF-Engine/mfengine/src/MFText.cpp:328: undefined reference to glEnable''
*mfengine-MFText.o(.text+0xe38):/home/mcnugget/src/MF-Engine/mfengine/src/MFText.cpp:329: undefined reference to
glDisable''
*mfengine-MFText.o(.text+0xe44):/home/mcnugget/src/MF-Engine/mfengine/src/MFText.cpp:330: undefined reference to glEnable''
*mfengine-MFText.o(.text+0xe58):/home/mcnugget/src/MF-Engine/mfengine/src/MFText.cpp:331: undefined reference to
glBlendFunc''
*mfengine-MFText.o(.text+0xe63):/home/mcnugget/src/MF-Engine/mfengine/src/MFText.cpp:333: undefined reference to glListBase''
*mfengine-MFText.o(.text+0xe79):/home/mcnugget/src/MF-Engine/mfengine/src/MFText.cpp:336: undefined reference to
glGetFloatv''
*mfengine-MFText.o(.text+0xe9a):/home/mcnugget/src/MF-Engine/mfengine/src/MFText.cpp:348: undefined reference to glPushMatrix''
*mfengine-MFText.o(.text+0xe9f):/home/mcnugget/src/MF-Engine/mfengine/src/MFText.cpp:349: undefined reference to
glLoadIdentity''
*mfengine-MFText.o(.text+0xed0):/home/mcnugget/src/MF-Engine/mfengine/src/MFText.cpp:350: undefined reference to glTranslatef''
*mfengine-MFText.o(.text+0xede):/home/mcnugget/src/MF-Engine/mfengine/src/MFText.cpp:351: undefined reference to
glMultMatrixf''
*mfengine-MFText.o(.text+0xf32):/home/mcnugget/src/MF-Engine/mfengine/src/MFText.cpp:359: undefined reference to glCallLists''
*mfengine-MFText.o(.text+0xf37):/home/mcnugget/src/MF-Engine/mfengine/src/MFText.cpp:366: undefined reference to
glPopMatrix''
*mfengine-MFText.o(.text+0xf46):/home/mcnugget/src/MF-Engine/mfengine/src/MFText.cpp:369: undefined reference to glPopAttrib''
*mfengine-MFText.o(.text+0x1015): In function
MFText:rint(char const*, float, float, float, float, float, char const*, ...)'':
*/home/mcnugget/src/MF-Engine/mfengine/src/MFText.cpp:388: undefined reference to `glColor3f''
*collect2: ld returned 1 exit status
*make[2]: Für das Ziel »all-am« ist nichts zu tun.
*make[2]: *** [mfengine] Fehler 1
*make[2]: Das Target »all« wurde wegen Fehlern nicht aktualisiert.
*make[1]: *** [all-recursive] Fehler 1
*make: *** [all] Fehler 2
**** Exited with status: 2 ***




Thankx for your great help!
DarkMcNugget next time... ;)
C-Junkie
C-Junkie
you have to add: -lGL

you MAY also need a special include path to find that library, try it without first.
robinei
robinei
Check out SDL_image which can load all kinds of image files including png.

http://www.libsdl.org/projects/SDL_image/

Edit: Under Linux the GL package is called Mesa. The include files and lib files are still called *GL* but you'll have to search for Mesa to download it if you haven't got it already.

[edited by - robinei on March 6, 2004 10:35:45 PM]
the Speed Bump
the Speed Bump
ack. source tag, not code

like so!
"There is only one everything"

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.