Site Map | Contact Us
Quantum Leaps - innovating embedded systems Call us toll-free!
Quantum Developer Zone
Quantum Leaps Discussion Forum

Search the Forum for answers or post your questions to the
Quantum Leaps community


Return to Website

  First
  Prev
  Reply
  Forum
Next  
Last  
Search this Forum:  
Viewing Page 1 of 1 (Total Posts: 7)


Author Comment    
Tim



Feb 19, 08 - 1:42 PM
Link Error

I'm getting a linking error and am not sure if it is because I haven't compiled the coded correctly or I am not linking to the QF correctly.

Does any of this make sense?

Error 1 error LNK2019: unresolved external symbol "protected: void __thiscall QHsm::tranStat(struct QHsm::Tran *,void (__thiscall QHsm::*(__thiscall QHsm::*)(struct QEvent const *))(struct QEvent const *))" (?tranStat@QHsm@@IAEXPAUTran@1@P81@AEP81@AEXPBUQEvent@@@Z1@Z@Z) referenced in function "private: void (__thiscall QHsm::*__thiscall CParser::code(struct QEvent const *))(struct QEvent const *)" (?code@CParser@@AAEP8QHsm@@AEXPBUQEvent@@@Z0@Z) CParser.obj
Miro Samek

www.quantum-leaps.com


Feb 19th, 2008 - 2:28 PM
Re: Link Error

Tim,

You are apparently using QP v2.x (the version from the "PSiCC" book?). In this version, the "static transition" member function QHsm::tranStat() is located in the file Qhsm.cpp. Please make sure that you have this file in the QF library.

If you only can, I'd recommend that you try the new version of QP 3.x, currently available for download from www.quantum-leaps.com/downloads.

Miro
TIM



Feb 19th, 2008 - 3:25 PM
Re: Link Error

Yes.. QHsm.cpp is in QF/Source
Miro Samek

www.quantum-leaps.com


Feb 20th, 2008 - 5:26 AM
Re: Link Error

I really don't see how this link problem could happen, except for a broken build. I'd make sure that you compile the QF library with the exact same header files and compiler options as the application.

Miro
Tim



Feb 20th, 2008 - 7:29 AM
Re: Link Error

I am using the code that came from the CD .. and have looked into your suggestion for upgrading to the downloadable version.

I've looked at the install instructions and am a bit confused. How do I use the source files to compile them. I'm seeing that this gives only the framework and will have to still use the project files from the CD. I'm just a bit cloudy on how to take the source files to make the framework and then use it with the project files.

I am using VS2005
Miro Samek

www.quantum-leaps.com


Feb 20th, 2008 - 8:51 AM
Re: Link Error

Tim,

I’ve compiled the book version of QF and all the CParser examples with VC++ 2005 Express Edition. The old VC 6.0 projects translated automatically to VC 2005. The only issue was with incomplete initial state handlers passed to the constructors. For example, instead of


CParser4() : Fsm((State)initial) {} // ctor


I had to fully-qualify the initial state handler, like this:


CParser4() : Fsm((State)&CParser4::initial) {} // ctor


I have placed the VC2005 code online at http://www.quantum-leaps.com/psicc (go to the bottom of the page).


Miro
Tim



Feb 20th, 2008 - 11:09 AM
Re: Link Error

Miro,

After looking at your new build and the projects that were included I have noticed that the big problem was that I wasn't linking to the qf_win32.lib correctly.

Nonetheless.. I have upgraded to the code that you provided and all is well. Thank you for your help!


  First
  Prev
  Reply
  Forum
Next  
Last  


powered by Powered by Bravenet bravenet.com