You have to install the "-dev" packages of wxWidgets.
That install all packages that you need (with the dependences).
By the way, Ubuntu 7.10 (Gutsy) wxWidgets packages are a bit old: "2.8.4.0-0ubuntu3", the latest stable release is 2.8.8. So I suggest you to get it from wxWidgets packages repository. For that, you have to add to your "/etc/apt/sources.list" (or go to "System->Administration->Software Sources" "Third-party Software"-tab) the following line:
deb http://apt.wxwidgets.org/ gutsy-wx main
And you have to add the key for getting access to the repository. Command line:
wget -q http://apt.wxwidgets.org/key.asc -O- | sudo apt-key add -