[Tex/LaTex] undefined control sequence \includegraphics

graphics

I write my text in Mac OS X and every thing was fine but when I want compile my code with Winedt in Windows 7 Environment I got this error:

undefined control sequence \includegraphics[width=0.30/textwidth]{Hypercube}

I change \ to / but Still got the error. And also I use package graphicx.

% GRAPHICS RELATED PACKAGES   
%  
 \ifCLASSINFOpdf   
   \usepackage[pdftex]{graphicx}     
 % declare the path(s) where your graphic files are       
   \graphicspath{{../pdf/}{../jpeg/}{./image/}}    
  % and their extensions so you won't have to specify these with    
  % every instance of \includegraphics      
 \DeclareGraphicsExtensions{.pdf,.jpeg,.png,.jpg}   
 \else   
   % or other class option (dvipsone, dvipdf, if not using dvips). graphicx     
 % will default to the driver specified in the system graphics.cfg if no   % driver is specified.    
  % \usepackage[dvips]{graphicx}   
   % declare the path(s) where your graphic files are     
 % \graphicspath{{../eps/}}    
  % and their extensions so you won't have to specify these with   
   % every instance of \includegraphics    
  % \DeclareGraphicsExtensions{.eps}   
\fi

\begin{figure}[htpb]   
    \label{Figure::Hypercube}      
  \begin{center}    
 \includegraphics[width=0.30/textwidth]{Hypercube}    
    \caption{a Hypercube with 8 nodes}      
  \end{center}     
   \end{figure}

Best Answer

You can replace that whole block of code with just

\usepackage{graphicx}

and give the path with the image name

\includegraphics{pdf/image}

Or use the block this way:

\ifCLASSINFOpdf   
   \usepackage[pdftex]{graphicx}     
   % declare the path(s) where your graphic files are       
   \graphicspath{{../pdf/}{../jpeg/}{./image/}}    
   % and their extensions so you won't have to specify these with    
   % every instance of \includegraphics      
   \DeclareGraphicsExtensions{.pdf,.jpeg,.png,.jpg}   
 \else   
   % or other class option (dvipsone, dvipdf, if not using dvips). graphicx     
   % will default to the driver specified in the system graphics.cfg if no   % driver is specified.    
   \usepackage[dvips]{graphicx}   
   % declare the path(s) where your graphic files are     
   \graphicspath{{../eps/}}    
  % and their extensions so you won't have to specify these with   
  % every instance of \includegraphics    
  % \DeclareGraphicsExtensions{.eps}   
\fi