Hi,

 

            I have a application then was created in linux. That application contains references to functions glClientActiveTextureARB() and glActiveTextureARB(). These functions are not defined in opengl32 default library, and I’m having problems to use that functions. I’m trying to use the Mesa3d lib, but I’m having some problems to build and use the “.a” file of this lib.

 

Building lib I got:

C:\Mesa-6.2.1> Make –f  MakeFile.mgw

...
VERSION 6.0
Warning: resolving _glPolygonMode by linking to _glPolygonMode@8
...
Warning: resolving _glClearColor by linking to _glClearColor@16
Warning: resolving _glViewport by linking to _glViewport@16

make: Leaving directory `C:/Mesa-6.2.1/src/Mesa'

That creates the file “libopengl32.a” with 754Kb. That file I’m including in my app project)

 

Building app I got:
make.exe -f "C:\eIndigenteDev\cgteste\Makefile.win" all
g++.exe main.o  -o "cgteste.exe" -L"C:/Dev-Cpp/lib" -glui -glaux ../Indigente/Indigente.a -lmingw32  -lopengl32 -lglu32 -lglut -lglut32 SDL_image.lib -lSDLmain -lSDL 
...
Linker errors:
  [Linker error] undefined reference to `glPolygonMode@8 '
  ...
  [Linker error] undefined reference to `glClearColor@16'  
  [Linker error] undefined reference to `glViewport@16'

 

 

LIB MakeFile

.PHONY : all libgl clean realclean
CPU ?= pentium
 
ifeq ($(ICD),1)
  # when -std=c99 mingw will not define WIN32
  CFLAGS = -Wall -W -Werror
else
  # I love c89
  CFLAGS = -Wall -W -pedantic
endif
CFLAGS += -O2 -ffast-math -mcpu=$(CPU)
 
export CFLAGS
 
ifeq ($(wildcard $(addsuffix /rm.exe,$(subst ;, ,$(PATH)))),)
UNLINK = del $(subst /,\,$(1))
else
UNLINK = $(RM) $(1)
endif
 
all: libgl
 
libgl: lib
                $(MAKE) -f Makefile.mgw -C src/mesa
lib:
                mkdir lib
clean:
                $(MAKE) -f Makefile.mgw clean -C src/mesa
realclean: clean
                -$(call UNLINK,lib/*.a)
                -$(call UNLINK,lib/*.dll)

 

App MakeFile

CPP  = g++.exe
CC   = gcc.exe
WINDRES = windres.exe
RES  =
OBJ  = main.o $(RES)
LINKOBJ  = main.o $(RES)
LIBS =  -L"C:/Dev-Cpp/lib" -glui -glaux -lmingw32  -lopengl32 -lglu32 -lglut -lglut32 SDL_image.lib -lSDLmain -lSDL 
INCS =  -I"C:/Dev-Cpp/include"  -I"C:/eIndigenteDev"
CXXINCS =  -I"C:/Dev-Cpp/lib/gcc/mingw32/3.4.2/include"  -I"C:/Dev-Cpp/include/c++/3.4.2/backward"  -I"C:/Dev-Cpp/include/c++/3.4.2/mingw32"  -I"C:/Dev-Cpp/include/c++/3.4.2"  -I"C:/Dev-Cpp/include"  -I"C:/eIndigenteDev"
BIN  = cgteste.exe
CXXFLAGS = $(CXXINCS) 
CFLAGS = $(INCS) 
RM = rm -f
 
.PHONY: all all-before all-after clean clean-custom
 
all: all-before cgteste.exe all-after
 
 
clean: clean-custom
                ${RM} $(OBJ) $(BIN)
$(BIN): $(OBJ)
                $(CPP) $(LINKOBJ) -o "cgteste.exe" $(LIBS)
main.o: main.cpp
                $(CPP) -c main.cpp -o main.o $(CXXFLAGS)

 

 

My enviroment: Windows XP Professsional, Geforce4 MX 440, Intel p4 processor

 

            What can be wrong?

           

            Thank you

 

            Arivan