473,773 Members | 2,398 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 38166
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
5849
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 want to store data like a database: ---------------------------------- Custumer:
3
1425
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
1259
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 address. However, if I try to access the development machine from another client on the LAN then I fail to access the server. The IIS on the server is set for Anonymous Access. Any clues please? Regards
8
3045
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 just the filename. Can anyone suggest how I do this? It's all part of a google maps mash up.
16
11847
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 that most Windows programs have, so I'm suprised it's not easier to implement in Access/VBA. Through Google, I found two VB6 examples and one VBA example on the Access Web written by Dev Ashish. The VB6 examples used loops to keep checking...
60
4113
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
9454
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10264
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10106
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10039
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9914
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7463
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6717
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5484
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
3
2852
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.