User forums > Nightly builds

The 14 April 2012 build (7932) is out.

<< < (16/22) > >>

MortenMacFly:

--- Quote from: ollydbg on April 28, 2012, 04:11:46 am ---??

--- End quote ---
Nope, this slipped in by accident as it seems. The correct way would be:

--- Code: ---             if (extensionPolicy == tgfpPlatformDefault)
             {
                 wxFileName fname(outputFileName);
                 if (fname.HasExt()) fname.ClearExt();
                 outputFileName = fname.GetFullPath();
             }

--- End code ---
Sorry for that, I am playing with that feature and this snippet was not supposed to be committed. Will fix...

headkase:
Build issue still exists in SVN 7948.

ollydbg:

--- Quote from: headkase on April 28, 2012, 06:32:55 pm ---Build issue still exists in SVN 7948.

--- End quote ---
I can confirm that this issue still exists in rev 7948.  :(

ollydbg:
@morten:

--- Code: ---@@ -100,7 +100,7 @@ void CompileTargetBase::SetImportLibraryFilename(const wxString& filename)
 {
     if (filename.IsEmpty())
     {
-        m_ImportLibraryFilename = _T("$(TARGET_NAME)");
+        m_ImportLibraryFilename = _T("lib$(TARGET_OUTPUT_BASENAME).a");
         SetModified(true);
         return;
     }
@@ -114,7 +114,7 @@ void CompileTargetBase::SetDefinitionFileFilename(const wxString& filename)
 {
     if (filename.IsEmpty())
     {
-        m_DefinitionFileFilename = _T("$(TARGET_NAME)");
+        m_DefinitionFileFilename = _T("$(TARGET_OUTPUT_BASENAME).def");
         SetModified(true);
         return;
     }

--- End code ---
I believe this cause the issue.

I have debugged how the link command was generated, and found that:

--- Code: ---switch (target->GetTargetType())
    {
        case ttDynamicLib:
            {
                TargetFilenameGenerationPolicy PrefixPolicy;
                TargetFilenameGenerationPolicy ExtensionPolicy;
                target->GetTargetFilenameGenerationPolicy(PrefixPolicy, ExtensionPolicy);

                wxString importLibraryFileNameString(target->GetDynamicLibImportFilename());
                Manager::Get()->GetMacrosManager()->ReplaceMacros(importLibraryFileNameString, target);
                wxFileName importLibraryFileName(importLibraryFileNameString);

                // apply prefix if needed
                if (   (PrefixPolicy == tgfpPlatformDefault)
                    && !importLibraryFileName.GetName().StartsWith(compiler->GetSwitches().libPrefix) )
                    importLibraryFileName.SetName(compiler->GetSwitches().libPrefix + importLibraryFileName.GetName());

                // apply extension if needed
                if (ExtensionPolicy == tgfpPlatformDefault)
                {
                    wxString current_ext   = importLibraryFileName.GetExt();
                    wxString requested_ext = compiler->GetSwitches().libExtension;

                    if (!current_ext.IsSameAs(requested_ext, false))
                        importLibraryFileName.SetFullName(importLibraryFileName.GetFullName() + wxFILE_SEP_EXT + requested_ext);
                }
                result = UnixFilename(importLibraryFileName.GetFullPath());
                QuoteStringIfNeeded(result);
                FixPathSeparators(compiler, result);
                m_StaticOutput[target] = result;

--- End code ---
Here, the target is sdk, and I see the importLibraryFileNameString is "lib$(TARGET_OUTPUT_BASENAME).a", which finally becomes "libcodeblocks.a", and finally the command generator have such code:

--- Code: ---"g++.exe -shared -Wl,--output-def=$def_output -Wl,--out-implib=$static_output -Wl,--dll -Lbase\\tinyxml -LE:\\code\\cb\\wxWidgets-2.8.12\\lib\\gcc_dll -Ldevel -Lsdk\\scripting\\lib -Lsdk\\propgrid  .objs\\sdk\\co"...

--- End code ---
and the value $static_output is replaced by "libcodeblocks.a", but it should be "devel\libcodeblocks.a" before rev7940.


BTW:
When debugging, I found a some code when the command generator try to generate the compile command, but I see for each file, there is always some function call like:


--- Code: ---macro.Replace(_T("$static_output"), m_StaticOutput[target]);
--- End code ---

The interesting thing is, the value "macro" is always "g++.exe", and I believe it have no change to do a replacement actually. So it just waste some CPU cycles. Any comments.

MortenMacFly:
...should be fixed in SVN now.

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version