Other Software > Developer's Corner
Problems with GNU C++
SkyIDE:
Problems with search paths
When you type this:
c++ --help
you get this:
-B <directory> Add <directory> to the compiler's search paths
I have created two folders in the root directory of my drive. C:\Test and C:\Test2. Both folders contain the file "header.h".
I use the following command:
c++ C:\test.cpp -B "C:\Test;C\Test2" but I get
C:\test.cpp:3:20: header.h: No such file or directory
Regardless what I do, I get the same error message.
c++ C:\test.cpp -B"C:\Test;C\Test2" but I get
C:\test.cpp:3:20: header.h: No such file or directory
c++ C:\test.cpp -B C:\Test;C\Test2 but I get
C:\test.cpp:3:20: header.h: No such file or directory
c++ C:\test.cpp -I "C:\Test;C\Test2" but I get
C:\test.cpp:3:20: header.h: No such file or directory
c++ C:\test.cpp -I"C:\Test;C\Test2" but I get
C:\test.cpp:3:20: header.h: No such file or directory
Well, other compilers have no problems with this. The only one with the problem is GNU C++.
Could be something wrong with my environment settings but that won't make a lot of sense? I am already telling the compiler where are the include files.
pob:
Can you definitely give it more than one directory in a list like that?
f0dder:
Try moving all switches before the filename to compile. If that still doesn't work, you might have to rely on INCLUDE and LIB environment variables.
SkyIDE:
no luck
I tried with single dir:
c++ C:\test.cpp -B C:\Test
Same story.
Contents of C:\Test.cpp
--- ---#include <iostream.h>
#include <header.h>
int main()
{
int iVar = 0;
cout << "Simple C++ Program\n" << endl;
return 0;
}
Then I tried moving the switch before the filename
c++ -B"C:\Test" C:\test.cpp
In file included from ../lib/gcc/mingw32/3.4.2/../../../../include/c++/3.4.2/bac
kward/iostream.h:31,
from C:\test.cpp:2:
../lib/gcc/mingw32/3.4.2/../../../../include/c++/3.4.2/backward/backward_warning
.h:32:2: warning: #warning This file includes at least one deprecated or antiqua
ted header. Please consider using one of the 32 headers found in section 17.4.1.
2 of the C++ standard. Examples include substituting the <X> header for the <X.h
> header for C++ includes, or <iostream> instead of the deprecated header <iostr
eam.h>. To disable this warning use -Wno-deprecated.
C:\test.cpp:3:20: header.h: No such file or directory
same story with
c++ -B "C:\Test" C:\test.cpp
This is one of the only things preventing me to release Beta 11. I must fix this before I release Beta 11.
SkyIDE:
This is weird! I am so sure this problem did not exist!! This must be a different version of GNU C++! I will download an older version and see how I go!
Navigation
[0] Message Index
[#] Next page
Go to full version