lmi
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [lmi] RE: product editor branch created


From: Evgeniy Tarassov
Subject: Re: [lmi] RE: product editor branch created
Date: Tue, 13 Feb 2007 21:50:14 +0100

I'm really sorry for the long delay -- i was trying to reproduce it on
my system and to understand the problem.

On 2/13/07, Boutin, Wendy <address@hidden> wrote:
Your most recent change in cvs fixed the problem I reported,
so thank you again. I hope you don't mind that I'm still
returning for more help because I keep running into things
I can't resolve on my own. Unfortunately, I still had this
problem:

Vadim Zeitlin wrote:
> On Mon, 12 Feb 2007 15:45:07 -0500 "Boutin, Wendy"
> <address@hidden> wrote:
>
[re-inserted]
> make.EXE[1]: *** No rule to make target `policy_view_editor.o', needed
> by `lmi_wx_shared.exe'.
[...]
so I'm wondering if there are missing files, or if that's
what's really intended? I made this change locally to my
'objects.make':

 - policy_view_editor.o
 + product_editor.o

Yes! This is another thing which was incorrectly handled by me while
commiting the code. This correction is exactly what is needed to solve
the first issue.

It seemed to get me closer to what I expect, but I don't know
that it was actually correct because that led to this problem:

/MinGW-20050827/bin/g++ -o lmi_wx_shared.exe about_dialog.o alert_wx.o 
census_document.o census_view.o
[...]
database_document.o:c:/opt/lmi/src/lmi/database_document.cpp:111: undefined 
reference to `DBDictionary::CachedFilename'
database_document.o: In function `operator=':
[...]
The two problems seem unrelated, but I'd like to ask for your
help again if I can.

I'm sorry for not having answered shortly. I tend to test the code in
one branch while a clean checkout was not working for some reasons for
me, and i had to spend some time fixing things.

A quick workaround will solve the problem (the patch follows).
Another notice is that i had to remove -Wmissing-prototypes  and
-Wredundant-decls from workhorse.make, but i suspect it is my local
problem, and should not affect building.

Patch to apply to resolve the linking problem:

Index: database_document.cpp
===================================================================
RCS file: /sources/lmi/lmi/Attic/database_document.cpp,v
retrieving revision 1.1.2.1
diff -u -r1.1.2.1 database_document.cpp
--- database_document.cpp       11 Feb 2007 21:52:42 -0000      1.1.2.1
+++ database_document.cpp       13 Feb 2007 20:33:26 -0000
@@ -108,9 +108,9 @@
    dict_.swap(instance.GetDictionary());
    dict_map_swap_guard guard(dict_, instance.GetDictionary());

-    std::string const old_cached_filename = DBDictionary::CachedFilename;
+    std::string const old_cached_filename = DBDictionary::GetCachedFilename();
    instance.Init(filename);
-    DBDictionary::CachedFilename = old_cached_filename;
+    DBDictionary::GetCachedFilename() = old_cached_filename;
}

void DatabaseDocument::WriteDocument(wxString const& filename)
Index: ihs_dbdict.hpp
===================================================================
RCS file: /sources/lmi/lmi/ihs_dbdict.hpp,v
retrieving revision 1.8
diff -u -r1.8 ihs_dbdict.hpp
--- ihs_dbdict.hpp      27 Jan 2007 00:00:51 -0000      1.8
+++ ihs_dbdict.hpp      13 Feb 2007 20:33:26 -0000
@@ -64,6 +64,7 @@
    void BadFile(std::string const& Filename, std::string const& why);
    void InitDB();

+    static std::string& GetCachedFilename();
    static std::string CachedFilename;
    dict_map dictionary;
};
Index: ihs_dbdict.cpp
===================================================================
RCS file: /sources/lmi/lmi/ihs_dbdict.cpp,v
retrieving revision 1.15
diff -u -r1.15 ihs_dbdict.cpp
--- ihs_dbdict.cpp      27 Jan 2007 00:00:51 -0000      1.15
+++ ihs_dbdict.cpp      13 Feb 2007 20:33:26 -0000
@@ -130,6 +130,11 @@
        }
}

+std::string& DBDictionary::GetCachedFilename()
+{
+    return CachedFilename;
+}
+
//============================================================================
// TODO ?? Does this function make the code clearer, or less clear?
void DBDictionary::BadFile(std::string const& Filename, std::string const& why)




reply via email to

[Prev in Thread] Current Thread [Next in Thread]