Guidance
指路人
g.yi.org
Guidance Forums / wxWidgets (wxWindows) in C++ / wxWindows install on SUSE Linux 9.0

Register 
新用户注册
Search 搜索
首页 
Home Home
Software
Upload

  
Forum List • Thread List • Reply • Refresh • New Topic • Search • Previous • Next First 1 Last
Message1. wxWindows install on SUSE Linux 9.0
#2817
Posted by: 2003-10-31 19:46:42
Hi,

im having trouble installing wxWindows on my linux machine. I think it is installed ok, but when i try to compile a program i get hundreds of errors.

These are the applications ive installed:

atk-1.2.4.tar.gz
glib-2.3.0.tar.gz
gtk+-2.3.0.tar.gz
pango-1.3.0.tar.gz
pkgconfig-0.15.0.tar.gz
wxGTK-2.4.2.tar.gz

The installations seemed to go ok, i tried a plain configure of wxGTK then i retried with --with-gtk --enable-gtk and it still didnt work.

Here is the first bit of output from the make command:

g++ -c HelloWorld.cpp -o hw.o
In file included from /usr/local/include/wx/defs.h:23,
                 from /usr/local/include/wx/wx.h:15,
                 from HelloWorld.cpp:4:
/usr/local/include/wx/platform.h:85:22: wx/setup.h: No such file or directory
In file included from /usr/local/include/wx/platform.h:88,
                 from /usr/local/include/wx/defs.h:23,
                 from /usr/local/include/wx/wx.h:15,
                 from HelloWorld.cpp:4:
/usr/local/include/wx/chkconf.h:47:9: #error "wxUSE_DYNLIB_CLASS must be defined."
/usr/local/include/wx/chkconf.h:55:9: #error "wxUSE_FILESYSTEM must be defined."
/usr/local/include/wx/chkconf.h:68:9: #error "wxUSE_DYNAMIC_LOADER must be defined."



My Makefile looks like this:

#
# Makefile for Hello World
#

# To execute clean even if a file called clean exists
.PHONY: clean

# Variables
CFLAGS = -O0 -Wall -time # For debug
#CFLAGS = -O3 -time # For release
CC = g++
TARGET = hw

# Objects to get linked
OBJECTS = hw.o

# Main compilation routine
$(TARGET): $(OBJECTS)
   $(CC) $(CFLAGS) $(OBJECTS) -o $(TARGET) -I/usr/local/include -L/usr/local/lib -lwx_gtk2.4

# Compile objects
hw.o: HelloWorld.cpp HelloWorld.h
   g++ -c HelloWorld.cpp -o hw.o

# Clean directory
clean:
   rm -frv *.o hw




Any help would be much appreciated, thanks
Message2. Re: wxWindows install on SUSE Linux 9.0
#2819
Posted by: upCASE 2003-10-31 20:30:39
Hi!
When you compiled and installed wxGTK it should have generated a script for you named "wx-config". When compiling your apps use this script so that the correct paths and libs are used, like:
g++ 'wx-config' -c HelloWorld.cpp -o hw.o
You'll have to include this into your makefile too. I use wxGTK 2.4.0 on SuSE 8.1 and it works perfectly.
Read the install and readme again. I'm quite sure they stated something there about using wx-config.
BTW: A good Dev-C++ like IDE for Linux is Anjuta. It has wxWindows support and definitly makes live easier.

upcase
upCASE
-----------------------------------
If it was hard to write, it should be hard to read!- Do. Or do not. There is no try!
Message3. Re: wxWindows install on SUSE Linux 9.0
#2820
Posted by: 2003-10-31 20:48:23
This is a copy of the error details when i try that:

mark@suse:~/Documents/Development/Hello> g++ 'wx-config' HelloWorld.cpp -o HelloWorld.o
g++: wx-config: No such file or directory
In file included from /usr/local/include/wx/wx.h:15,
                 from HelloWorld.cpp:4:
/usr/local/include/wx/defs.h:32:2: #error "No Target! You should use wx-config program for compilation flags!"
In file included from /usr/local/include/wx/intl.h:24,
                 from /usr/local/include/wx/wx.h:21,
                 from HelloWorld.cpp:4:
/usr/local/include/wx/fontenc.h:131:6: #error "Unsupported toolkit"
In file included from /usr/local/include/wx/gdicmn.h:29,
                 from /usr/local/include/wx/event.h:24,
                 from /usr/local/include/wx/wx.h:23,
                 from HelloWorld.cpp:4:
....etc....
Message4. Re: wxWindows install on SUSE Linux 9.0
#2821
Posted by: upCASE 2003-11-01 00:50:07
Hi!
Did you
1. ./configure
2. ./make
3. login as su
4. make install?

There has to be a wx-config script, that's why it complains "#error "No Target! You should use wx-config program for compilation flags!""
Try "wx-config --help" at the prompt.
I guess "wx-config --cxxflags --libs" was what the syntax should look like...

upcase
upCASE
-----------------------------------
If it was hard to write, it should be hard to read!- Do. Or do not. There is no try!
Message5. Re: wxWindows install on SUSE Linux 9.0
#2822
Posted by: 2003-11-01 01:05:16
Hi,

ive managed to work out what the problem is!

i was using ' instead of `

I didnt realise it was a backtick instead of a single quote.

All is working now :)

Thanks for your help
Message6. Re: wxWindows install on SUSE Linux 9.0
#2823
Posted by: upCASE 2003-11-01 18:40:01
Hi!
Just replied via mail to hide that it was all my fault :)
Sure, it's a backtick for a nested command, not a single quote.

Sorry!

upcase
upCASE
-----------------------------------
If it was hard to write, it should be hard to read!- Do. Or do not. There is no try!
Forum List • Thread List • Reply • Refresh • New Topic • Search • Previous • Next First 1 Last
掌柜推荐
 
 
 
 
 
 
 
 
 
 
 
 
© Mon 2021-9-20  Guidance Laboratory Inc.
Email:webmaster1g.yi.org Hits:0