PDA

View Full Version : [ubuntu] g++ compilation problem



vptl316
August 12th, 2011, 12:45 PM
Hi,

I installed g++ using package manager and support libraries using
sudo apt-get install build-essential cmd,
but I'm not able to compile a socket code.
It gives me the following error:

server.cpp:1:26: error: ServerSocket.h: No such file or directory
server.cpp:2:29: error: SocketException.h: No such file or directory

Can Anyone tell me what's wrong?!!:confused:

lkraemer
August 12th, 2011, 12:59 PM
SocketException.h should be a clue.... you need your Headers.......


INSTALL REQUIRED SOFTWARE FOR COMPILE:
Typically you need to install build-essential and the headers for the
kernel you are running, if you are going to compile code.


uname -r

will tell you the kernel you are currently running.


sudo apt-get install build-essential linux-headers-$(uname -r)

will install the software needed to compile your code. .........


You most likely will also want to install:


gdb
ddd

also.....

lk