Author Topic: Changing object file of source file does not work  (Read 1894 times)

Offline Lazybones

  • Multiple posting newcomer
  • *
  • Posts: 14
Changing object file of source file does not work
« on: March 14, 2008, 01:45:19 pm »
Hi there.

I am using a compiler which requires, that all objects created by any souce file must be in one directory to link them, regardless of the directory structure of the source files.

So I have to change the object file of my source files, as displayed in the file properties dialog on tab "Advanced", correct?

I have done this for all my project files using this script:

Code
                local Numberoffiles = project.GetFilesCount();
                for ( local i = 0; i < Numberoffiles; i++ )
                {
                    local file = project.GetFile(i);
                    if (!IsNull(file))
    {
    if (file.link == true) {
            local filename = wxFileName();
    filename.Assign(file.GetObjName(), ::wxPATH_NATIVE);
    file.SetObjName(filename.GetFullName());
    ::Log(_T("Object path changed for: ") + filename.GetFullName() );
}
    }
                }

Now I would expect, that when linking the files I get only the the common objects output directory plus the new object name as replacement for $object in the compiler options, correct?

My problem: this does not work. $object is still the "original" object name, so my changes did not work or were ignored.

Am I doing something wrong here?

Thanks for your help!
 Sven