Advertisement

GTK - Critical

Started by July 17, 2005 03:55 AM
1 comment, last by Last Attacker 19 years, 3 months ago
For those who're new to my 3rd year project question just read the first post of this Older Post. Its not long and I'm tyred of explaining the whole situation over and over again. Anyway, I finally got it to compile and run in Linux by creating my own Makefile and to leave KDevelop. Then my app started to run in Linux with GNOME interface (I assume GTK is a GNOME thing). But no 3d was rendered and the console window from which I was running it said :
Gdk-CRITICAL **: file gdkdraw.c: line 169 (gdk_drawable_get_size): 
Strangely I managed to still run the app but the OpenGL panel was just black. Anyone have ideas? I hope its not a memory thing again! >:( Thanks :) O and this is how my Makefile looks like because it managed to elminate the Segmentation fault error after the gdk error than when I compiled it from KDev:

# Project: SimuDet
# Makefile created by Dandre van Vuuren
# (with the help of the Window's wx-DevCpp 4.9.9.2-wx-beta-6.7)

LIBS_ALL =`wx-config --libs --cxxflags --gl-libs`

APPNAME	=simudet
APPEXT	=
CXX	=g++

WORKDIR	=./output
BIN	=$(APPNAME)$(APPEXT)

OBJ	=output/GlcTerrain.o output/CNewDlg.o output/FrmMain.o output/Main.o output/tga.o output/image.o output/CVector.o output/log.o output/CGrid.o output/3DLandscape.o output/3DWave.o output/CHole.o output/DlgOptions.o output/UserConfig.o

LINKOBJ	=output/GlcTerrain.o output/CNewDlg.o output/FrmMain.o output/Main.o output/tga.o output/image.o output/CVector.o output/log.o output/CGrid.o output/3DLandscape.o output/3DWave.o output/CHole.o output/DlgOptions.o output/UserConfig.o

.PHONY: all all-before all-after clean clean-custom

all: $(BIN)

install: all

uninstall: 

install-strip: install

#Delete the WORKDIR and then the Binary file
clean:
	rm -f -d -r $(WORKDIR) ./$(BIN)

$(BIN): $(OBJ)
	$(CXX) $(LINKOBJ) -o $(BIN) $(LIBS_ALL)

#Since this file is executed first, we need to create the WORKDIR
#first, otherwise it'll give a compile error. If the directory
#allready exists, then nothing will happen.
$(WORKDIR)/GlcTerrain.o: GlcTerrain.cpp
	mkdir -p output
	$(CXX) -c GlcTerrain.cpp -o $(WORKDIR)/GlcTerrain.o $(LIBS_ALL)

$(WORKDIR)/CNewDlg.o: CNewDlg.cpp
	$(CXX) -c CNewDlg.cpp -o $(WORKDIR)/CNewDlg.o $(LIBS_ALL)

$(WORKDIR)/FrmMain.o: FrmMain.cpp
	$(CXX) -c FrmMain.cpp -o $(WORKDIR)/FrmMain.o $(LIBS_ALL)

$(WORKDIR)/Main.o: Main.cpp
	$(CXX) -c Main.cpp -o $(WORKDIR)/Main.o $(LIBS_ALL)

$(WORKDIR)/tga.o: libs/images/tga.cpp
	$(CXX) -c libs/images/tga.cpp -o $(WORKDIR)/tga.o

$(WORKDIR)/image.o: libs/images/image.cpp
	$(CXX) -c libs/images/image.cpp -o $(WORKDIR)/image.o

$(WORKDIR)/CVector.o: libs/math/CVector.cpp
	$(CXX) -c libs/math/CVector.cpp -o $(WORKDIR)/CVector.o

$(WORKDIR)/log.o: libs/log.cpp
	$(CXX) -c libs/log.cpp -o $(WORKDIR)/log.o

$(WORKDIR)/CGrid.o: CGrid.cpp
	$(CXX) -c CGrid.cpp -o $(WORKDIR)/CGrid.o

$(WORKDIR)/3DLandscape.o: 3DLandscape.cpp
	$(CXX) -c 3DLandscape.cpp -o $(WORKDIR)/3DLandscape.o

$(WORKDIR)/3DWave.o: 3DWave.cpp
	$(CXX) -c 3DWave.cpp -o $(WORKDIR)/3DWave.o

$(WORKDIR)/CHole.o: CHole.cpp
	$(CXX) -c CHole.cpp -o $(WORKDIR)/CHole.o

$(WORKDIR)/DlgOptions.o: DlgOptions.cpp
	$(CXX) -c DlgOptions.cpp -o $(WORKDIR)/DlgOptions.o $(LIBS_ALL)

$(WORKDIR)/UserConfig.o: UserConfig.cpp
	$(CXX) -c UserConfig.cpp -o $(WORKDIR)/UserConfig.o $(LIBS_ALL)

"Take delight in the Lord and He will give you your heart's desires" - Psalm 37:4My Blog
check glxinfo.
IT should report hardware opengl support (direct: yes). What gfx card do you have?
Advertisement
I've got a Geforce 4 440MX.
Well the other OpenGL examples of wxWidgets 2.5.4 compiled and ran ok. I mean, I've got the GTK version of wxWidgets. I'm just baffled about the GDK error.

Thanks
"Take delight in the Lord and He will give you your heart's desires" - Psalm 37:4My Blog

This topic is closed to new replies.

Advertisement