User forums > Nightly builds

The 14 April 2012 build (7932) is out.

<< < (15/22) > >>

stahta01:

--- Quote from: headkase on April 28, 2012, 02:02:09 am ---"libcodeblocks.a" exists in parent folder of devel (src), not devel.  Link errors ensue.  

--- End quote ---

I can confirm that libcodeblocks.a and libwxpropgrid.a are place in the source folder when compiling with self compiled CB 7945
Note: The codeblocks.dll and libwxscintilla_cb.a was placed in devel folder.

Tim S.

ollydbg:

--- Quote from: stahta01 on April 28, 2012, 03:42:06 am ---
--- Quote from: headkase on April 28, 2012, 02:02:09 am ---"libcodeblocks.a" exists in parent folder of devel (src), not devel.  Link errors ensue.  

--- End quote ---

I can confirm that libcodeblocks.a and libwxpropgrid.a are place in the source folder when compiling with self compiled CB 7945
Note: The codeblocks.dll was placed in devel folder.

Tim S.

--- End quote ---
So, it looks like there are something wrong between rev7945 and rev7932. Especially, rev7945 generate the dll/a file to a wrong place.

ollydbg:
Maybe, this is the cause of this regression:

--- Quote ---Commit:3db06060fddd327c867bc404ab3ff2a4e99a2805

* * save/load dynamic link library lib name and def file into project file -> *backward compatible* change in project file

git-svn-id: svn://svn.berlios.de/codeblocks/trunk@7940 98b59c6a-2706-0410-b7d6-d2fa1a1880c9


--- End quote ---


--- Code: --- src/sdk/compiletargetbase.cpp         |    6 +++---
 src/sdk/projectloader.cpp             |   23 +++++++++++++++++++++--
 src/wxsmith/debuggersettingspanel.wxs |    3 +--
 3 files changed, 25 insertions(+), 7 deletions(-)

diff --git a/src/sdk/compiletargetbase.cpp b/src/sdk/compiletargetbase.cpp
index 9a47037..2c099d9 100644
--- a/src/sdk/compiletargetbase.cpp
+++ b/src/sdk/compiletargetbase.cpp
@@ -61,7 +61,7 @@ void CompileTargetBase::GetTargetFilenameGenerationPolicy(TargetFilenameGenerati
 {
     prefixOut = m_PrefixGenerationPolicy;
     extensionOut = m_ExtensionGenerationPolicy;
-} // end of GetTargetFilenameGenerationPolicy
+}
 
 const wxString& CompileTargetBase::GetFilename() const
 {
@@ -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;
     }
diff --git a/src/sdk/projectloader.cpp b/src/sdk/projectloader.cpp
index 5c5207f..491d9ce 100644
--- a/src/sdk/projectloader.cpp
+++ b/src/sdk/projectloader.cpp
@@ -527,6 +527,8 @@ void ProjectLoader::DoBuildTargetOptions(TiXmlElement* parentNode, ProjectBuildT
 
     bool use_console_runner = true;
     wxString output;
+    wxString imp_lib;
+    wxString def_file;
     wxString working_dir;
     wxString obj_output;
     wxString deps_output;
@@ -560,6 +562,12 @@ void ProjectLoader::DoBuildTargetOptions(TiXmlElement* parentNode, ProjectBuildT
         if (node->Attribute("output"))
             output = UnixFilename(cbC2U(node->Attribute("output")));
 
+        if (node->Attribute("imp_lib"))
+            imp_lib = UnixFilename(cbC2U(node->Attribute("imp_lib")));
+
+        if (node->Attribute("def_file"))
+            def_file = UnixFilename(cbC2U(node->Attribute("def_file")));
+
         if (node->Attribute("prefix_auto"))
             prefixPolicy = atoi(node->Attribute("prefix_auto")) == 1 ? tgfpPlatformDefault : tgfpNone;
 
@@ -649,6 +657,8 @@ void ProjectLoader::DoBuildTargetOptions(TiXmlElement* parentNode, ProjectBuildT
         target->SetTargetFilenameGenerationPolicy(prefixPolicy, extensionPolicy);
         target->SetTargetType((TargetType)type); // type *must* come before output filename!
         target->SetOutputFilename(output); // because if no filename defined, one will be suggested based on target type...
+        target->SetImportLibraryFilename(imp_lib);
+        target->SetDefinitionFileFilename(def_file);
         target->SetUseConsoleRunner(use_console_runner);
         if (!working_dir.IsEmpty())
             target->SetWorkingDir(working_dir);
@@ -1166,9 +1176,13 @@ bool ProjectLoader::ExportTargetAsProject(const wxString& filename, const wxStri
             if (extensionPolicy == tgfpPlatformDefault)
             {
                 wxFileName fname(outputFileName);
-                fname.ClearExt();
-                outputFileName = fname.GetFullPath();
+                if (fname.HasExt())
+                {
+                    fname.ClearExt();
+                    outputFileName = fname.GetFullPath();
+                }
             }
+
             if (   (prefixPolicy == tgfpPlatformDefault)
                 && (   (!platform::windows && target->GetTargetType() == ttDynamicLib)
                     || (target->GetTargetType() == ttStaticLib) ) )
@@ -1195,6 +1209,11 @@ bool ProjectLoader::ExportTargetAsProject(const wxString& filename, const wxStri
             }
 
             TiXmlElement* outnode = AddElement(tgtnode, "Option", "output", outputFileName);
+            if (target->GetTargetType() == ttDynamicLib)
+            {
+                outnode->SetAttribute("imp_lib",  cbU2C(target->GetDynamicLibImportFilename()));
+                outnode->SetAttribute("def_file", cbU2C(target->GetDynamicLibDefFilename()));
+            }
             outnode->SetAttribute("prefix_auto", prefixPolicy == tgfpPlatformDefault ? "1" : "0");
             outnode->SetAttribute("extension_auto", extensionPolicy == tgfpPlatformDefault ? "1" : "0");
 
diff --git a/src/wxsmith/debuggersettingspanel.wxs b/src/wxsmith/debuggersettingspanel.wxs
index 1ca329f..0e5a02d 100644
--- a/src/wxsmith/debuggersettingspanel.wxs
+++ b/src/wxsmith/debuggersettingspanel.wxs
@@ -41,11 +41,10 @@
  <label>Info</label>
  <object class="sizeritem">
  <object class="wxTextCtrl" name="ID_TEXTCTRL_INFO" variable="textInfo" member="no">
- <value>Text</value>
  <size>186,243</size>
  <enabled>0</enabled>
  </object>
- <flag>wxALL|wxEXPAND|wxALIGN_LEFT|wxALIGN_BOTTOM</flag>
+ <flag>wxEXPAND|wxALIGN_LEFT|wxALIGN_BOTTOM</flag>
  <border>5</border>
  <option>1</option>
  </object>


--- End code ---

headkase:
Whew.  It's nice to be a "correct" n00b instead of a "wrong" n00b.  I'll let you wizards duke it out now and try to build again when a new SVN is out! :D

ollydbg:
Here

--- Code: ---
             if (extensionPolicy == tgfpPlatformDefault)
             {
                 wxFileName fname(outputFileName);
-                fname.ClearExt();
-                outputFileName = fname.GetFullPath();
+                if (fname.HasExt())
+                {
+                    fname.ClearExt();
+                    outputFileName = fname.GetFullPath();
+                }
             }
--- End code ---
Do we need a "else" like:

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

--- End code ---
because the old logic is:

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

--- End code ---
??

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version