Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » U++ Library support » U++ Library : Other (not classified elsewhere) » setting include-path
setting include-path [message #12491] Mon, 05 November 2007 21:24 Go to next message
amando1957 is currently offline  amando1957
Messages: 57
Registered: November 2007
Location: Wien/Vienna/Viden
Member
Hello folks,

In my first posting, i want say a THANKS SO MUCH to the contributors of U++! Anyone will encounter that there are true prof's at work here, which have obvious pushed the gas pedal heavily. That's it what makes us happy Smile.

Now my question. I have set an include-path for my own headers, but got the error (translated from German):
fatal error C1083: Include-file cannot be opened: 'mystuff.h': No such file or directory

Is that not enough to set the include-path at "setup / build methods"?

with kind greets
Martin
Re: setting include-path [message #12493 is a reply to message #12491] Mon, 05 November 2007 21:58 Go to previous messageGo to next message
mr_ped is currently offline  mr_ped
Messages: 825
Registered: November 2005
Location: Czech Republic - Praha
Experienced Contributor
Try to check "Setup / Be verbose" and examine the command line used to spawn compiler, this will give you answer if (and how) your settings are used.
Re: setting include-path [message #12552 is a reply to message #12493] Thu, 08 November 2007 20:35 Go to previous messageGo to next message
amando1957 is currently offline  amando1957
Messages: 57
Registered: November 2007
Location: Wien/Vienna/Viden
Member
Hi,

Thanks for the hint. I have found the "be verbose", but i don't really understand: do i need to compile over the command-line, to get the info mentioned? I am not very fit with "cmd".

amando
Re: setting include-path [message #12554 is a reply to message #12491] Thu, 08 November 2007 21:32 Go to previous messageGo to next message
mr_ped is currently offline  mr_ped
Messages: 825
Registered: November 2005
Location: Czech Republic - Praha
Experienced Contributor
No, just check the "be verbose" ON, and than recompile the package with your source.

In the status window where normally the compilation progress is shown you will see not just which files and packages are build, but also the command line used to invoke compiler will be printed.

Like this for example:
cd /home/ped/UppVA/VATestsAll
VATestsAll.cpp
c++ -c  -I"/home/ped/UppVA" -I"/home/ped/upp/uppsrc" -I"/usr/include/freetype2" -I"/usr/include/gtk-2.0" -I"/usr/include/glib-2.0" -I"/usr/lib/glib-2.0/include" -I"/usr/lib/gtk-2.0/include" -I"/usr/include/cairo" -I"/usr/include/pango-1.0" -I"/usr/include/atk-1.0" -DflagMAIN -DflagGCC -DflagDEBUG -DflagSHARED -DflagDEBUG_FULL -DflagBLITZ -DflagLINUX -DflagNOLIB -DbmYEAR=2007 -DbmMONTH=11 -DbmDAY=8 -DbmHOUR=21 -DbmMINUTE=24 -DbmSECOND=14 -ggdb -g2  -fexceptions  D_DEBUG -O0 -x c++ "/home/ped/UppVA/VATestsAll/VATestsAll.cpp" -o "/home/ped/upp/out/VATestsAll/GCC.Debug_full.Main.Shared/VATestsAll.o"


Now look for the string you did insert into "includes" where it is used in compiler invocation.

See my
-I"/home/ped/UppVA"
.. that's what you are looking for.

If you have your include path somewhere on the line, you only need to make sure there's correct option ahead of it (-I also for MSVC? Check it in help).

You don't really need to know cmd.exe well, just check your compiler help for command line options to understand which are used and why.

If it is missing completely, than you put that include path in some wrong place, or you did hit Cancel by accident, or it is applied only in different mode of compilation or simply something went wrong and you will have to find out what.
In such case it may be of some help to post here the content of your package.upp file which will show where the include path is stored.

It's good to know your tools a bit. You don't need to memorize every compilation option, but you should be aware how the final binary is produced, in what steps (preprocessing, object compilation, linking), and what possible options your compiler has... you should read it at least once in life. Smile
(and maybe you will like some of them, like /Wall)
Re: setting include-path [message #12555 is a reply to message #12491] Thu, 08 November 2007 21:44 Go to previous messageGo to next message
mr_ped is currently offline  mr_ped
Messages: 825
Registered: November 2005
Location: Czech Republic - Praha
Experienced Contributor
Also setting up include paths in Setup/Build methods make it available for any project, which is compiled by the modified build method. That's maybe not what you really want, if those include paths are relevant only for one package.

You may in such case go to Project/Package organizer
There right-click in upper right panel, select New Compiler option, and add your include path WITH the include path option switch.
(In my case with gcc that previous example would be like this:
-I"/home/ped/UppVA"
)

It's different from build methods dialog, where you need to add only path itself.

And one more thing. The build methods are not stored in package.upp file, so that file will not help to diagnose the problem in case you insist on using the include paths from build methods.

Those are stored elsewhere.. some file with "bm" somewhere around upp dir maybe.

[Updated on: Thu, 08 November 2007 21:46]

Report message to a moderator

Re: setting include-path [message #12573 is a reply to message #12555] Fri, 09 November 2007 12:29 Go to previous messageGo to next message
amando1957 is currently offline  amando1957
Messages: 57
Registered: November 2007
Location: Wien/Vienna/Viden
Member
hello mr_red,

Quote:

See my
-I"/home/ped/UppVA"
.. that's what you are looking for.

I did not find my include path here. I only found those of Upp and MS-VC7. But the following excerpt says, it is searching
in the wrong dir:
F:\upp\MyApps\sometext_t\sometext_t.cpp(36) : fatal error C1083: Include-file cannot be opened: 'sometext.h': No such file or directory

So i know its serching in the "MyApps", where it is not.

Here is my *.upp in case of interest:
Quote:

description "test of sometext.h";

uses
Core;

file
F:\Cplus\112include\clip.h,
F:\Cplus\112include\file.h,
F:\Cplus\112include\getkey.h,
F:\Cplus\112include\use.h,
F:\Cplus\112include\codepars.h,
F:\Cplus\112include\sometext.h,
sometext_t.cpp;

mainconfig
"" = "";

Now that does not tell me the was its using the pathes. It is true i can use them all, as long i'm providing the full path. Actually the path installed is only for convenience.

Obvious it is not as simple as i thought. I will study your tips now, and the compiler-options in manual, and then try again, but that will take me some time.

Thanks a lot for your effort, mr_red. If not other, i will write a proggy which accumulates them all to a single long *.h, similar as the preprocessor does, so i only need that.

kind greets
amando
Re: setting include-path [message #12591 is a reply to message #12491] Fri, 09 November 2007 18:50 Go to previous messageGo to next message
mr_ped is currently offline  mr_ped
Messages: 825
Registered: November 2005
Location: Czech Republic - Praha
Experienced Contributor
So adding "F:/Cplus/112include" in the 'setup / build method' does not work? That's curious, did you add it to correct build method? (the one you use for compilation?)

You may (and should?) still go with the package organizer way, doing "Add compiler option" with include path option and absolute path.

But using external includes/libraries in TheIDE is not as simple as using "packages", so if you by any chance posses sources of those libraries and they are compilable under their own U++ package, I would convert it. (I'm working with Unit++ unit test library in this way, so I don't need to worry about include paths, for packages those are solved by TheIDE)
Re: setting include-path [message #12594 is a reply to message #12591] Fri, 09 November 2007 19:55 Go to previous messageGo to next message
mdelfede is currently offline  mdelfede
Messages: 1307
Registered: September 2007
Ultimate Contributor
Another option for external include files is to put them inside an assembly path (or, make an assembly path point to include dir...).

Ciao

Max
Re: setting include-path [message #12614 is a reply to message #12594] Sat, 10 November 2007 20:40 Go to previous message
amando1957 is currently offline  amando1957
Messages: 57
Registered: November 2007
Location: Wien/Vienna/Viden
Member
hello folks,

I will try to make a package of it, then its simple, and study the compiler options. Thanks to all for your effort!

sincerly
amando
Previous Topic: console + WIN-GDI
Next Topic: ZCompress question
Goto Forum:
  


Current Time: Fri Apr 19 17:03:03 CEST 2024

Total time taken to generate the page: 0.02317 seconds