Login | Register
My pages Projects Community openCollabNet

Discussions > SCons Development (OBSOLETE) > SCons adds backslash to include path

Project highlights:

14 Nov 2017: Release 3.0.1 is now available at the download page.

18 Sep 2017: Release 3.0.0 is now available at the download page.

03 Nov 2016: Release 2.5.1 is now available at the download page.

scons
Discussion topic

Back to topic list

SCons adds backslash to include path

Author "Boisvert, Ian (AB02)" <Ian dot Boisvert at honeywell dot com>
Full name "Boisvert, Ian (AB02)" <Ian dot Boisvert at honeywell dot com>
Date 2005-08-29 10:02:37 PDT
Message Hi. I've found a problem with SCons 0.96.90 that is described below that
was not present in SCons 0.96.1. The problem is that when I run scons,
the command to compile readstring.cpp is:
cl /nologo /TP /I\\temp /c readstring.cpp /Foreadstring.obj
Note the extra backslash on \temp.

I was wondering if anyone had seen this problem before, or if someone
could point me in a direction as to how it may be fixed. I noticed that
in FS.py a lot of filepaths are constructed by adding a seperator like
path + os.sep + name, which seems to result in the bad path. I tried
changing all of the instances of this that I could find to os.path.join,
which produces a correct path, but it didn't seem to help.

I'm in the process of evaluating SCons as a replacement build tool for
what we are using now so if anyone can help out it would be much
appreciated.

Ian.

Using Windows 2000, SCons 0.96.9, ActivePython 2.4.1
Build 245. Here is my SConstruct:
Program('readstring', CPPPATH=r'\temp',
source='readstring.cpp')

Here is my sample program, readstring.cpp. This is a bad example but it
serves the purpose.
#include <fstream>
#include <sstream>
#include <iostream>

using namespace std;

int main(void) {
// create a temporary file
ofstream ofs("temp");
ofs << "This is a test" << endl << flush;
ofs.close();

// read the temporary file
ifstream ifs("temp");
ostringstream oss;
oss << ifs.rdbuf();

// dump the contents of the temporary file
const string &s = oss.str();
const char* c = s.c_str();
cout << c;

ifs.close();

return 0;
}

« Previous message in topic | 1 of 4 | Next message in topic »

Messages

Show all messages in topic

SCons adds backslash to include path "Boisvert, Ian (AB02)" <Ian dot Boisvert at honeywell dot com> "Boisvert, Ian (AB02)" <Ian dot Boisvert at honeywell dot com> 2005-08-29 10:02:37 PDT
     FW: SCons adds backslash to include path "Boisvert, Ian (AB02)" <Ian dot Boisvert at honeywell dot com> "Boisvert, Ian (AB02)" <Ian dot Boisvert at honeywell dot com> 2005-09-02 11:59:35 PDT
         Re: [scons-dev] FW: SCons adds backslash to include path stevenknight Steven Knight 2005-09-02 12:33:32 PDT
             Re: [scons-dev] FW: SCons adds backslash to include path stevenknight Steven Knight 2005-09-02 13:04:39 PDT
Messages per page: