This topic is 4752 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

Getting the following errors:
hxr2.h:20:19: gl/gl.h: No such file or directory
hxr2.h:21:20: gl/glu.h: No such file or directory
hxr2.h:169:7: warning: no newline at end of file

for the first two, it should be
#include <GL/gl.h>

#include <GL/glu.h>

linux is case sensitive

The new line thing is more of an irritating warning, but can cause a problem in rare situations.

After fixing that I get the following error:
ar rcs hxr2.a hxr2.o
ar: hxr2.o: No such file or directory

I don't have much experience building libraries in linux, but if no one else can help you i'll look into it.

##### Share on other sites
I don't even know what the ar command does...

##### Share on other sites
You also need to change in hxSDLContext.cpp

hxSDLContext::Setup(int w, int h, int bpp, bool fs, const char *title)// toint hxSDLContext::Setup(int w, int h, int bpp, bool fs, const char *title)

##### Share on other sites
Quote:
 Original post by PnP BiosI don't even know what the ar command does...

Here's a man page listing (manual) for ar. Hope it helps.

thanks!

##### Share on other sites
also in the makefile, change
ar rcs hxr2.a hxr2.o
to
ar rcs hxr2.a hxContext.o hxSurface.o utility_functions.o

and
ar rcs hxSDL2.a hxSDL2.o
to
ar rcs hxSDL2.a hxSDLContext.o hxSDLUtility.o

and it will build - however I can't guarantee it'll work as expected
I don't have the time now, but if I get the chance i'll come back and take a look at it.

Also, that's a really ugly looking Makefile - but not bad for a first try.

##### Share on other sites
I know you asked for Linux, but I don't have linux and only FreeBSD installed, but should be able to figure it out all the same.

all:        g++ sdl11-config --cflags -I/usr/X11R6/include -c hxContext.cpp hxSurface.cpp utility_functions.cpp        ar rcs hxr2.a hxContext.o hxSurface.o utility_functions.o        g++ sdl11-config --cflags -I/usr/X11R6/include -c hxSDLContext.cpp hxSDLUtility.cpp        ar rcs hxSDL2.a hxSDLContext.o hxSDLUtility.oclean:        rm -f hxr2.a hxr2.o hxSDL2.a hxSDL2.oinstall:        install hxr2.a hxSDL2.a /usr/local/lib        install hxr2.h hxSDL2.h /usr/local/include

I just had to change sdl-config to sdl11-config (just how FreeBSD installs it from the ports, leave that as sdl-config for linux I'd imagine). Add -I/usr/X11R6/include as that is where the GL headers are installed at least on FreeBSD not sure where linux distro's install those. For the ar you need to combine all the object files that were compiled from the previous line.

HTH some.

##### Share on other sites
Quote:
 Original post by Will Falso in the makefile, changear rcs hxr2.a hxr2.otoar rcs hxr2.a hxContext.o hxSurface.o utility_functions.oandar rcs hxSDL2.a hxSDL2.otoar rcs hxSDL2.a hxSDLContext.o hxSDLUtility.oand it will build - however I can't guarantee it'll work as expectedI don't have the time now, but if I get the chance i'll come back and take a look at it.Also, that's a really ugly looking Makefile - but not bad for a first try.

tis not my makefile. it is one built from an older version of hxRender, so stuff was lost in the translation. thanks, I will make the changes to the makefile.

##### Share on other sites
Quote:
 Original post by gg83I just had to change sdl-config to sdl11-config (just how FreeBSD installs it from the ports, leave that as sdl-config for linux I'd imagine).

Yup, leave it as it was for linux.

Quote:
 Add -I/usr/X11R6/include as that is where the GL headers are installed at least on FreeBSD not sure where linux distro's install those.

Mine (Fedora Core) are in /usr/include/GL, so you don't need the -I switch.

You might also want to use the -Wall (report all warnings) switch for g++:

g++ -Wall sdl-config --cflags -I/usr/X11R6/include -c hxSDLContext.cpp hxSDLUtility.cpp

1. 1
2. 2
3. 3
Rutin
22
4. 4
JoeJ
17
5. 5

• 14
• 30
• 13
• 11
• 11
• ### Forum Statistics

• Total Topics
631774
• Total Posts
3002295
×