• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

C++ compile problem

 
Ranch Hand
Posts: 2676
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have decided now is a good time to learn a little C++. I downloaded the Borland compiler and created a Hello World program in C++. When I try to compile it I get two errors. One states that it unable to open include file iostream.h. The other is an undefined symbol cout. It appears that error is caused by the first error.
My initial reaction to this was that it is a classpath issue. I placed the Borland include folder in my classpath, but it did not resolve the issue. What am I doing wrong? I have posted the code below just in case I did something wrong there.
 
High Plains Drifter
Posts: 7289
Netbeans IDE VI Editor
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Easiest and laziest way to fix this: change your include statement to find the file on an absolutel path. For example, on Solaris:
include "/usr/local/include/g++-3/iostream.h"
and see if that at least works.
After that, find the file in the compiler install that governs the default location of angle-bracket includes. You can probably define the default location to be what you want.
 
Matthew Phillips
Ranch Hand
Posts: 2676
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The absolute path did not work, but defining the angle bracket includes did. Thanks.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic