YACE PWLib 10.0.3 on VS2k5 Express+SP1

Help
2007-07-20
2013-06-03
  • Marcos F. J.

    Marcos F. J. - 2007-07-20

    Yes Another Compilation Error

      Hello to all, I'm new in this forum and I'm having problens to compile PWLib 10.0.3 on Visual Studio .Net 2005 Express. It ts a few errors (3 link errors on MergeSym exe and PTLib dll)

      Describing my system:
           Windows XP (pt-br +SP2)
           .Net 2.0 (all patchs)
           Visual Studio .NET 2005 Express (patched with SP1 for express)
           Microsoft Platform SDK for Windows Server 2003 R2
           Microsoft DirectX SDK (October 2006) [needed because many media headers are now belong directx]

       Plataform SDK and DirectX SDK has properly configured.
       C:\tool (bison - OK)
       Paths to PWLib ok (Voxgratia step-by-step)
       Compiling 'configure' and 'console' and 'console components' projects OK (with _CRT_SECURE_NO_WARNINGS to minimize warnings)

       Compiling MergeSym (eror):

    1>------ Build started: Project: MergeSym, Configuration: Release Win32 ------
    1>Compiling...
    1>MergeSym.cxx
    1>Linking...
    1>ptlibs.lib(win32.obj) : error LNK2001: unresolved external symbol "int PWLibFactoryLoader::PURLScheme_PString" (?PURLScheme_PString@PWLibFactoryLoader@@3HA)
    1>ptlibs.lib(win32.obj) : error LNK2001: unresolved external symbol "int PWLibFactoryLoader::PWAVFileFormat_unsigned" (?PWAVFileFormat_unsigned@PWLibFactoryLoader@@3HA)
    1>ptlibs.lib(win32.obj) : error LNK2001: unresolved external symbol "int PWLibFactoryLoader::PWAVFileConverter_unsigned" (?PWAVFileConverter_unsigned@PWLibFactoryLoader@@3HA)
    1>.\Release/MergeSym.exe : fatal error LNK1120: 3 unresolved externals
    1>Build log was saved at "file://d:\pwlib_1_10_3\tools\MergeSym\Release\BuildLog.htm"
    1>MergeSym - 4 error(s), 0 warning(s)
    ========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

    same for PTLib (dll) project.

    Im tracking pluginmgr.cxx, pglobalstatic.cxx, Http.cxx and pwavfile.cxx, but they apparently dont have errors.
    I tried to erase .dtf files (mail tracking in gmail search), but no effect. And YES i need they, in cross plataform flavour

     
    • Marcos F. J.

      Marcos F. J. - 2007-08-02

      Because of the emptiness of this forum, I'll post a reply for me :S

      After a good look, I noted the globals declarations and initializers of

      int PWLibFactoryLoader::PURLScheme_PString
      int PWLibFactoryLoader::PWAVFileFormat_unsigned
      int PWLibFactoryLoader::PWAVFileConverter_unsigned

      in file pglobalstatic.cxx, do not make more sense for "Console" project. The files that declares it at first time (Http.cxx and pwavfile.cxx) are now on "Console Components" project.

      Because win32.cxx includes pglobalstatic.cxx and "Console" project don't include Http.cxx and pwavfile.cxx they're throwing the errors.

      Now I'll try comment

      int PWLibFactoryLoader::PURLScheme_PString
      int PWLibFactoryLoader::PWAVFileFormat_unsigned
      int PWLibFactoryLoader::PWAVFileConverter_unsigned

      in pglobalstatic.cxx, and create a new one for "Console Components" project.

       
    • Marcos F. J.

      Marcos F. J. - 2007-08-13

      Ok, let's go to cook book:

      HowTo Compile PWLib and OpenH323 on Visual C++ Express + SP1 + PSDK + DirectX SDK

      0) [ya a zero point!] U need VC++Express, VC++Express ServicePack 1 (plus Service pack 1 for Vista if u are programaing to Vista), the Plataform SDK R2 and DirectX SDK (why? many media headers and libs are on DirectX SDK now, October 2006 are sufficient)
      1) Download and unpack u favorite PWLib zip archive (I've tested with 1.10.0 and 1.10.3)
      2) Download and unpack OpenH323 1.18.0
      3) Open pwlib.sln (VC++ will ask to convert, convert it!)
      4) Open, search and modify the files:

      ***pwlib\src\ptlib\common\pglobalstatic.cxx
      Comment:
              PLOAD_FACTORY_DECLARE(PWAVFileConverter, unsigned)
              PLOAD_FACTORY_DECLARE(PWAVFileFormat,    unsigned)
      Add:
              PINSTANTIATE_FACTORY(PWAVFileFormat, unsigned)
              PINSTANTIATE_FACTORY(PWAVFileConverter, unsigned)

      Comment:
              PLOAD_FACTORY_DECLARE(PURLScheme, PString)
      Add:
              PINSTANTIATE_FACTORY(PURLScheme, PString)

      ***pwlib\src\ptclib\http.cxx
      Comment:
              PINSTANTIATE_FACTORY(PURLScheme, PString)

      ***pwlib\src\ptclib\pwavfile.cxx
      Comment:
              PINSTANTIATE_FACTORY(PWAVFileFormat, unsigned)
              PINSTANTIATE_FACTORY(PWAVFileConverter, unsigned)

      5)Configure 'Console', 'Console Components' and 'PTLib' in "Debug" to link with /MTd and "Release" to link with /MT
      6)Remove the dependency of 'PTLib' from 'MergeSym' (on "Debug" and "Release")
      7)Put ptclib and ptclibd on 'PTLib' linker dependency
      8)Copy the working version of MergeSym.exe from PWLib 1.11.1 and put they on pwlib\lib folder.
      9)Compile 'Console', 'Console Components' and 'PTLib'
      10)Pray

       
    • Marcos F. J.

      Marcos F. J. - 2007-08-13

      Same steps for OpenH323, if u reade the txt files and search on Google u can find the headers to compile all the plugins.

      Remember: put all projects to compile against MT and MTd
      Trick: use _CRT_SECURE_NO_DEPRECATE to cut down warnings avalanche

       
    • Vaccano

      Vaccano - 2007-08-13

      Marcos,

      Thanks for posting this.  I was very excited to see someone have some success with this code.

      I got to step 8 of your "Cook Book" and got stuck. 
      >>8)Copy the working version of MergeSym.exe from PWLib 1.11.1 and put they on pwlib\lib folder.

      Does this mean to do a get from the CVS on this version?  If so can you post the path to the exe so that I can just get that file?  If not, can you give some more details about where you got a working version of MergeSym.exe?

      I am so close, I appreciate any help you can give.

      Vaccano

       
    • Vaccano

      Vaccano - 2007-08-14

      OK, I got this one figured out.  Even though Source Forge lists the most recent version as 1.10 there is a 1.11 on http://www.voxgratia.org/downloads.html (though its release date is before the 1.10).

      I downloaded that ad was able to build a debug exe of MergeSym.exe.  And I used that for step 8 of the "Cook Book" above.

      I am now stuck getting linker error messages.  These have been changing as I have tried ways to get around them, but the first few lines of my current stuck spot are below:

      1>ptclib.lib(http.obj) : error LNK2019: unresolved external symbol __imp__MessageBoxA@16 referenced in function "public: static int __cdecl PURL::OpenBrowser(class PString const &)" (?OpenBrowser@PURL@@SAHABVPString@@@Z)
      1>ptlibs.lib(svcproc.obj) : error LNK2001: unresolved external symbol __imp__MessageBoxA@16
      1>ptlibs.lib(assert.obj) : error LNK2001: unresolved external symbol __imp__MessageBoxA@16
      1>ptclib.lib(http.obj) : error LNK2019: unresolved external symbol __imp__ShellExecuteExA@4 referenced in function "public: static int __cdecl PURL::OpenBrowser(class PString const &)" (?OpenBrowser@PURL@@SAHABVPString@@@Z)
      1>ptlibs.lib(svcproc.obj) : error LNK2019: unresolved external symbol __imp__Shell_NotifyIconA@8 referenced in function "public: void __thiscall PNotifyIconData::Add(void)" (?Add@PNotifyIconData@@QAEXXZ)
      1>ptlibs.lib(svcproc.obj) : error LNK2019: unresolved external symbol __imp__CloseServiceHandle@4 referenced in function "public: __thiscall NT_ServiceManager::~NT_ServiceManager(void)" (??1NT_ServiceManager@@QAE@XZ)

       
    • Marcos F. J.

      Marcos F. J. - 2007-08-15

      Hello Vaccano

        These functions are a common problem when compiling. U need to confirm if "Inharit from parent or project defualts" is enabled on Linker > Input > Addition Dependencies.

      A Note: remember, after building MergeSym of PWLib 1.11.1 to copy then to a safe place, and erase dirs and paths (indded anything) that reference PWLib 1.11.1 (del dirs, remove ptah from VS default project dirs etc)

      It s not good mixing pwlib 1.11.1 with openh323, because pwlib 1.11.1 altered many headers and the way some classes (expecially plugin manager) works.

      Other note: I'm compile PWLib 1.10.0 and OpenH323 and all child projects with /MT and /MTd, because using CRT dll crash with pwlib dll expported funcitons

      I'll put more detailed Cook Book Shortly.

       
    • Marcos F. J.

      Marcos F. J. - 2007-09-03

      Sorry the ausence.... I'm having big troubles trying to debug my app's. The core of OpenH323 (and PWLib) throws tons of access violations ( the famous 0x00000005, the low heap memory for threads), basicaly one for every PDU arrived! You only see they if u use Debug Interface of Visual Studio (or other descent debug env.)

        Some one having these type of troubles too?

      Thanks to everyone

      PS: a new more detailed cookbook is on the way...

       
    • sanjiva1983

      sanjiva1983 - 2007-10-10

      HEY marcos just hanging on the cookbook
      cheers
      take your time ASAP lol

       
    • Marcos F. J.

      Marcos F. J. - 2007-10-10

      Sorry make everyone wainting :$

        Last 2 months was critical on my work (deadline of many projects), I'm giving to me a break ;)

        Last notices: compiled all OpenH323 Plugins successfully (after all, with a little cheat on one of then...tsc)
                      upgraded the SimpleH323 tutotrial with video support (*the source of my last headache)
                     

      [to note: my work is to upgrade a working Java encapsulation of OpenH323 to suport video in Java too, with JNI direct bridge to a PVideoOutputDevice descendant, the previous encapsulation leavage the video functionality entirely to native SDL Device]

        I'll try to compile my experiance in a friendly pdf book, with illustrations. But need some way to spread it across the community. Perphpas, I'll try sending it to the OpenH323 autors or VoxGratia team.

      Please, make free to put any questions in this forums.

       

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.





No, thanks