473,395 Members | 1,530 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

Dev-C++ Error: "In file included from..."

Hi folks,

i use dev-c++ as my favourite development environment but i have some
little problems. I wrote a include file called ppmimage.h and now i
tried to implement it into the main file the following way:

#include "ppmimage.h"

When i start to compile the program i get the error: 1 "included from
main.cpp"
It doesn't work when I leave the .h, too. Then I get the message "No
such file or directory"

The second way to include the file with < >, also returns the same
messages. All the paths are correct in the project-options, i also
added the project directory to the include paths, the error remains...

Any ideas?

Thanks!
Chris

May 26 '06 #1
4 38126
On 2006-05-26 13:47, Christian Kirsch wrote:
Hi folks,

i use dev-c++ as my favourite development environment but i have some
little problems. I wrote a include file called ppmimage.h and now i
tried to implement it into the main file the following way:

#include "ppmimage.h"

When i start to compile the program i get the error: 1 "included from
main.cpp"
It doesn't work when I leave the .h, too. Then I get the message "No
such file or directory"

The second way to include the file with < >, also returns the same
messages. All the paths are correct in the project-options, i also
added the project directory to the include paths, the error remains...


Could you paste the code (or parts of it) and the full error message?
It seems to me that the message is something like "error in file
included from main.cpp" which would mean the there is something wrong
with your .h-file.

The correct way to include a file is just as you have done #include
"file.h", using the < and > is for including parts of the standard library.

Erik Wikström
--
"I have always wished for my computer to be as easy to use as my
telephone; my wish has come true because I can no longer figure
out how to use my telephone" -- Bjarne Stroustrup
May 26 '06 #2
Christian Kirsch wrote:
Hi folks,

i use dev-c++ as my favourite development environment but i have some
little problems. I wrote a include file called ppmimage.h and now i
tried to implement it into the main file the following way:

#include "ppmimage.h"

When i start to compile the program i get the error: 1 "included from
main.cpp"
It doesn't work when I leave the .h, too. Then I get the message "No
such file or directory"

The second way to include the file with < >, also returns the same
messages. All the paths are correct in the project-options, i also
added the project directory to the include paths, the error remains...

Any ideas?

Thanks!
Chris


You should use quotes around your headers as angle brackets are for
standard headers, and you'll need to include the real name of the file
-- e.g., if it is called foo.h, you must use '#include "foo.h"'. (The
business with dropping the .h extension has to do with a change in the
C++ standard where the headers were renamed from, e.g., iostream.h to
just plain iostream. The former are deprecated and should not be used,
while the latter put all the identifiers in the std namespace.)

Other than that, this is not a C++ language issue, and your problems
are most likely the result of user error. You may have misspelled the
file name or path, for instance. If you can't figure out the error,
you'll want to ask on a group dedicated to your environment since this
group deals only with the C++ language proper, not configuration of
arbitrary development environments. See this FAQ for what is on-topic
here and for some suggestions of where else you might try posting:

http://www.parashift.com/c++-faq-lit...t.html#faq-5.9

Cheers! --M

May 26 '06 #3
Hi Erik,

thanks for the quik answer, and you were right. There was an syntax
error in the h-file, which i didn't recognize because I tried to solve
the first error-message which was the, in my opinion "strange" one. Now
it works...

have a nice day...!
Chris

May 26 '06 #4
Hi mlimber,

no, the problem was more simple: just an error in the h-file. Thanks
for your help!

Chris

May 26 '06 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

14
by: Luiz Antonio Gomes Pican?o | last post by:
How i can store a variable length data in file ? I want to do it using pure C, without existing databases. I'm thinking to use pages to store data. Anyone has idea for the file format ? I...
3
by: Lennie | last post by:
Hello.. I have a problem in a c# application. I have a dataset that have a table cald tblcounter in this table I have 2 columns Computer_name and datetime.
5
by: gemel | last post by:
I have a wireless networked peer-to-peer LAN and I can access web pages on the Internet. I have a development platform for ASP and I can access all pages on this machine by using the localhost...
8
by: andyau | last post by:
I am uploading a file to the server and at the same time I want to place the file name in to a database. But for the the file to be effective I need to trim the path from the filename and leave...
16
by: John | last post by:
I am looking for VBA code that will work with Access 2003 to enable dragging and dropping a file/folder name from Windows XP Explorer into an Access form's text box. This is a common functionality...
60
by: =?ISO-8859-1?Q?Tom=E1s_=D3_h=C9ilidhe?= | last post by:
On May 3, 8:09 am, apati...@gmail.com wrote: A programmer that uses Vista? :O Vista is a hog of an operating system. Downgrade to Windows XP or get yourself a Linux distro.
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.