hi David thanks for ur reply i have given my Makefile here with this post so help me out in the proper linkiing of wxGTK2.6.3. i have given two makefiles one is local Makefile named Makefile.linux and another one is master makefile which is named as Makefile.
Makefile.linux
OUTPUT = xxx
APPLIBS =
WXLIBS = -lwx_gtk2_core-2.6 -lwx_gtk2_adv-2.6 -lwx_gtk2_gl-2.6 -lwx_base_net-2
.6 -lwx_base-2.6
GTKLIBS = -Wl,--export-dynamic -pthread -lgtk-x11-2.0 -lgdk-x11-2.0 -latk-1.0 -l
gdk_pixbuf-2.0 -lm -lpangoxft-1.0 -lpangox-1.0 -lpango-1.0 -lgobject-2.0 -lgmodu
le-2.0 -ldl -lgthread-2.0 -lglib-2.0 -lpng -lz -ljpeg -ltiff
SYSLIBS = -lm -lz -ldl
DISPLIBS = -lGLU -lGL
FLEXLIBS = -llmgr -lsb -lcrvs -llmgr_as -llmgr_s -lsb_pic
PARENTOBJS := $(patsubst %.cpp,%.o,$(wildcard *.cpp))
DESIGNOBJS := $(patsubst ./Parameter/%.cpp,./Parameter/%.o,$(wil
dcard ./Parameter/*.cpp))
OBJS = $(PARENTOBJS) $(DESIGNOBJS)
CC = c++
LD = c++
CCFLAGS = -O2 -fcheck-new -DLINUX -D__WXGTK__ -DGTK_NO_CHECK_CASTS -c -DGNU
LINKFLAGS = -m64
LIBS = $(APPLIBS) $(WXLIBS) $(GTKLIBS) $(SYSLIBS) $(DISPLIBS)
INCPATH = -I. \
-I.. \
-I/home/downloads/testwx2.6.3/wxGTK-2.6.3/lib/wx/include/gtk2-ansi-re
lease-2.6 \
-I/home/downloads/testwx2.6.3/wxGTK-2.6.3/include
LIBPATH = -L../LIB \
-L/usr/include/gtk-2.0 \
-L/usr/lib64/gtk-2.0/include \
-L/usr/include/glib-2.0 \
-L/usr/lib64/glib-2.0/include \
-L/usr/include/pango-1.0 \
-L/usr/include/atk-1.0 \
-L/home/downloads/testwx2.6.3/wxGTK-2.6.3/lib \
-L/usr/XllR6/lib64
Makefile - (Master Makefile)
include $(PLATFORM_MODULE_MAKEFILE)
$(OUTPUT): $(OBJS)
@echo
@echo ================================
@echo Building $(OUTPUT) ...
$(LD) $(LIBPATH) $(LINKFLAGS) -o $@ $(OBJS) $(FLEXOBJ) $(LIBS)
@echo
@echo ================================
@echo Copying libraries...
@mkdir -p LIB 2>/dev/null
@echo
.SUFFIXES:
.SUFFIXES: .o .cpp .c
.cpp.o:
@echo "------------------------------" >> errors
@echo $< >> errors
@echo $<
@$(CC) $(INCPATH) $(CCFLAGS) $< -o $@
clean:
@echo
@echo ================================
@echo Cleaning...
/bin/rm -f .depend $(OBJS) $(OUTPUT)
@echo
To David - Makefiles of linking wxGTK-2.6.3 Topic is solved
I think the problem is your sequence of the linked libs. They are relative.The lib based by other libs must be placed at the back.
e.g
wx_gtk2_adv-2.6 should be placed in front of wx_gtk2_core-2.6
You can refer to the chapter of libraries list in wxWidgets manual,
there are relation of the libs.
ps: I am chinese,so my English is poor. Maybe I didnot express clearly.If that, I feel sorry!
e.g
wx_gtk2_adv-2.6 should be placed in front of wx_gtk2_core-2.6
You can refer to the chapter of libraries list in wxWidgets manual,
there are relation of the libs.
ps: I am chinese,so my English is poor. Maybe I didnot express clearly.If that, I feel sorry!
Hi,
Thank you for posting your makefile(s). I was about to say the same thing as fenny: the order could be the problem. FWIW, my order is xrc, xml, adv, core, base. (You won't necessarily need the extra ones.)
If that doesn't work, try adding any other libraries that your build created.
One other thing. Is this the first time you've installed wxGTK-2.6.x on this partition? If not, you could be getting conflicts with previous libraries. One answer to this would be to do a local install: see http://forums.wxwidgets.org/viewtopic.php?t=7065.
Regards,
David
Thank you for posting your makefile(s). I was about to say the same thing as fenny: the order could be the problem. FWIW, my order is xrc, xml, adv, core, base. (You won't necessarily need the extra ones.)
If that doesn't work, try adding any other libraries that your build created.
One other thing. Is this the first time you've installed wxGTK-2.6.x on this partition? If not, you could be getting conflicts with previous libraries. One answer to this would be to do a local install: see http://forums.wxwidgets.org/viewtopic.php?t=7065.
Regards,
David