User forums > Using Code::Blocks

Avr-gcc project on x86_64 and gnu/stubs-32.h file

<< < (4/5) > >>

oBFusCATed:
Seems the autodetection fails, see for the details: CompilerGNUAVR::AutoDetectInstallationDir()

http://svn.berlios.de/wsvn/codeblocks/trunk/src/plugins/compilergcc/compilerGNUAVR.cpp?peg=7359

Seems like the m_MasterPath is not set correctly.

Difool:

--- Quote from: Difool on August 10, 2011, 10:03:30 pm ---
--- Quote from: jens on August 10, 2011, 09:50:05 pm ---Please close C::B and rename the default.conf.
Than restart C::B, so the configuration is rebuild from scratch and check the "Search directories".

--- End quote ---

/usr/include always appear in the search directory

--- End quote ---

I've already do this ...
And I said I had tested with two differents linux distribs (Fedora & Ubuntu), both are fresh installs (in fact, with Live CD ...).
So, they haven't ~/.codeblocks/default.conf

Difool:

--- Quote from: oBFusCATed on August 11, 2011, 03:10:18 pm ---Seems the autodetection fails, see for the details: CompilerGNUAVR::AutoDetectInstallationDir()

http://svn.berlios.de/wsvn/codeblocks/trunk/src/plugins/compilergcc/compilerGNUAVR.cpp?peg=7359

Seems like the m_MasterPath is not set correctly.

--- End quote ---

m_MasterPath is set by :

--- Code: ---    if (platform::windows)
    {
      ....
    }
    else // if platform::linux
        m_MasterPath = _T("/usr");

--- End code ---

But what is the usefulness of adding this include path ?

--- Code: ---AddIncludeDir(m_MasterPath + sep + _T("include"));
--- End code ---

Jenna:
After installing avr-gcc, I cam confirm this issue.

If the compiler-plugin detects the gnu-avr-gcc compiler it adds /usr/include and /usr/lib to the appropriate search dirs, but this is (of course) wrong for a cross-compiler.
I guess none of these is normally needed as long as only compiler-included headers and libs are used, because the compiler normally knows where to search.
I am not sure if it is needed on windows, normally it should not.

The wrong search-dirs are only added, if auto-detection does not fail:

--- Code: ---    AutoDetectResult ret = wxFileExists(m_MasterPath + sep + _T("bin") + sep + m_Programs.C) ? adrDetected : adrGuessed;
    if (ret == adrDetected)
    {
        if (platform::windows)
        {
            AddIncludeDir(m_MasterPath + sep + _T("avr\\include"));
            AddLibDir(m_MasterPath + sep + _T("avr\\lib"));
            m_ExtraPaths.Add(m_MasterPath + sep + _T("utils") + sep + _T("bin")); // for make
        }
        else
        {
            AddIncludeDir(m_MasterPath + sep + _T("include"));
            AddLibDir(m_MasterPath + sep + _T("lib"));
        }
    }

--- End code ---

m_MasterPath is /usr, because the executables are in /usr/bin as nearly in all cases on linux.
That's the cause, why I did not see them until I installed the compiler.

Jenna:

--- Quote from: Difool on August 11, 2011, 03:18:08 pm ---
--- Quote from: oBFusCATed on August 11, 2011, 03:10:18 pm ---Seems the autodetection fails, see for the details: CompilerGNUAVR::AutoDetectInstallationDir()

http://svn.berlios.de/wsvn/codeblocks/trunk/src/plugins/compilergcc/compilerGNUAVR.cpp?peg=7359

Seems like the m_MasterPath is not set correctly.

--- End quote ---

m_MasterPath is set by :

--- Code: ---    if (platform::windows)
    {
      ....
    }
    else // if platform::linux
        m_MasterPath = _T("/usr");

--- End code ---

But what is the usefulness of adding this include path ?

--- Code: ---AddIncludeDir(m_MasterPath + sep + _T("include"));
--- End code ---

--- End quote ---
As posted before: master path is set correctly, but the search-dirs are not (and most likely not needed).

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version