Link error

37 views
Skip to first unread message

jasper

unread,
Dec 2, 2011, 2:30:42 AM12/2/11
to Logog
Hi,

I just wanted to test logog. Created a win32 consolApp in vs2010.
Added the includes in Include, and libs in liibraries.

Called

logog::LogFile("D:\Testlog.log");

I get this error.

Error 1 error LNK2019: unresolved external symbol "public: virtual
__thiscall logog::LogFile::~LogFile(void)" (??1LogFile@logog@@UAE@XZ)
referenced in function _wmain D:\CVSSource\me_apm_components\apminsight
\source\dotnetagent\Solutions\TestLogog\TestLogog.obj TestLogog

What settings have I missed?

-JPJ

John Byrd

unread,
Dec 2, 2011, 2:45:58 AM12/2/11
to lo...@googlegroups.com
Hi jasper,

Not sure, but it might be related to the fact that LogFile and LogBuffer objects don't have virtual destructors.  I just fixed this; please get the latest code and try again.

Additionally, please use cmake when creating your project as per the getting started docs.

jwb
> --
> You received this message because you are subscribed to the Google Groups "Logog" group.
> To post to this group, send email to lo...@googlegroups.com.
> To unsubscribe from this group, send email to logog+un...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/logog?hl=en.
>
>

--
---

John Byrd
Gigantic Software
2102 Business Center Drive
Suite 144
Irvine, CA   92612-1001
http://www.giganticsoftware.com
T: (949) 892-3526 F: (206) 309-0850

John Byrd

unread,
Dec 5, 2011, 7:43:44 PM12/5/11
to lo...@googlegroups.com
I just checked and logog builds and runs fine under VS2010. jwb

jasper paul

unread,
Dec 5, 2011, 11:39:21 PM12/5/11
to lo...@googlegroups.com
Ok, will check it again. Thanks.
J.P.JASPER

No 36 & 37, Marvel river view county,
Manapakkam,
Chennai-6000125.

Mobile : 9841312365

jasper paul

unread,
Dec 7, 2011, 8:15:23 AM12/7/11
to lo...@googlegroups.com
I just built it Release-x64. 

Made a test console app -> Release 64 -> included the libs and includes 

put this code in main 

LOGOG_INITIALIZE();
logog::LogFile errFile("log.txt");
INFO("Sample");
LOGOG_SHUTDOWN();


I got crash in node.cpp

attaching screen shot

-Jasper


On Tue, Dec 6, 2011 at 6:13 AM, John Byrd <jb...@giganticsoftware.com> wrote:



--
crash.png

John Byrd

unread,
Dec 7, 2011, 4:29:09 PM12/7/11
to lo...@googlegroups.com
From http://johnwbyrd.github.com/logog/quickstart.html:

"At this point, your Target object (in this case, the errOutput object) should be destroyed. Falling out of scope is the easiest way to achieve this."

Try


LOGOG_INITIALIZE();
{
logog::LogFile errFile("log.txt");
INFO("Sample");
}
LOGOG_SHUTDOWN();

jasper paul

unread,
Dec 7, 2011, 11:55:57 PM12/7/11
to lo...@googlegroups.com
It works perfect.

I have some questions

1. What if I want to adapt logog to for my logger. (Adaptor pattern). The "falling out of scope" will hold good? I did test this below sample and it worked without a problem. Still, I am skeptical about a crash, hence this question.

2. In the below code INFO(sMsg) gives error,  no suitable conversion function from "CString" to "const LOGOG_CHAR *" exists.
how to rectify this? CString is not supported, yes. But how to rectify it or what are the other options I can follow...? my logging can be in any language hence unicode is a must for me. Thats is why I use CString. (later on I will use string tables). 

class Logger
{
  Logger(){
  LOGOG_INITIALZE();
  logog::LogFile errFile(".Native.log");
 }

~Logger(){
  LOGOG_SHUTDOWN();
 }
 
void Info(CString& sMsg)
{
   INFO(sMsg);

John Byrd

unread,
Dec 8, 2011, 1:25:06 AM12/8/11
to lo...@googlegroups.com
1. The falling out of scope business was documented in the getting
started section.

http://johnwbyrd.github.com/logog/quickstart.html

2. You should read the documentation on Unicode that comes with logog.

http://johnwbyrd.github.com/logog/unicodesupport.html

jwb

Reply all
Reply to author
Forward
0 new messages