Compiling H323Plus in Windows VS2017
Posted: Mon Dec 20, 2021 4:34 am
Greetings!
I have downloaded and managed to build static ptlibs.lib and h323plus.lib. I used VS2017 to load the VS2010 solutions. I left the Windows SDK version at 8.1 and Platform Toolset to V100. What version of the Windows SDK is compatible? It was difficult to find any instructions for building the projects, but I think I got all the pieces hooked up. Now, the challenge is that I want to create a wrapper DLL in VS2017 C++ so I can use features in C#. So, in my wrapper code I am able to access classes/methods from H323Plus. Everything was looking good until I went to build the wrapper project. I am getting 14 compiler errors in the Thread.h and h4601.h header files:
1>C:\H323Work\ptlib\include\ptlib/thread.h(342): error C2143: syntax error : missing ',' before '&'
1>C:\H323Work\ptlib\include\ptlib/thread.h(349): error C2059: syntax error : ')'
1>C:\H323Work\ptlib\include\ptlib/thread.h(349): error C2143: syntax error : missing ')' before ';'
1>C:\H323Work\ptlib\include\ptlib/thread.h(351): error C2143: syntax error : missing ',' before '&'
1>C:\H323Work\ptlib\include\ptlib/thread.h(353): error C2535: 'PThread *PThread::Create(const int)' : member function already defined or declared
1>C:\H323Work\ptlib\include\ptlib/thread.h(353): error C2065: 'notifier' : undeclared identifier
1>C:\H323Work\ptlib\include\ptlib/thread.h(353): error C2065: 'threadName' : undeclared identifier
1>c:\h323work\h323plus-1_27_2\include\h460/h4601.h(1069): error C2143: syntax error : missing ')' before 'generic'
1>c:\h323work\h323plus-1_27_2\include\h460/h4601.h(1069): error C2143: syntax error : missing ';' before 'generic'
1>c:\h323work\h323plus-1_27_2\include\h460/h4601.h(1069): error C2059: syntax error : ')'
1>c:\h323work\h323plus-1_27_2\include\h460/h4601.h(1069): error C2059: syntax error : ';'
1>c:\h323work\h323plus-1_27_2\include\h460/h4601.h(1069): error C2238: unexpected token(s) preceding ';'
1>c:\h323work\h323plus-1_27_2\include\h460/h4601.h(1073): error C2143: syntax error : missing '>' before ';'
1>c:\h323work\h323plus-1_27_2\include\h460/h4601.h(1073): fatal error C1903: unable to recover from previous error(s); stopping compilation
1> 0 Warning(s)
1> 14 Error(s)
I have NO IDEA what is causing these errors. The first error in the list is referring to this statement in Thread.h:
static PThread * Create(
const PNotifier & notifier, ///< Function to execute in thread.
INT parameter = 0, ///< Parameter value to pass to notifier.
AutoDeleteFlag deletion = AutoDeleteThread,
///< Automatically delete PThread instance on termination of thread.
Priority priorityLevel = NormalPriority, ///< Initial priority of thread.
const PString & threadName = PString::Empty(), ///< The name of the thread (for Debug/Trace)
PINDEX stackSize = 65536 ///< Stack size on some platforms
);
It was really frustrating to make it so far in the process only to be stopped by these errors in header files included in the source download.
I would like to find a step-by-step set of instructions for how to compile the current source code provided on H323plus.org using Visual Studio 2017. There is nothing available anywhere (the frequently mentioned http://www.voxgratia.org/documents.html no longer exists). Has anybody been able to download the current source and build the PTLib and H323Plus projects on Windows with VS2017/2010? Note that TECHNICALLY I have built the projects, but I am not 100% sure they were built correctly.
My end goal is to create a C# application that can create a basic H323 endpoint to talk to another H323 device.
Any help would be greatly appreciated.
David
I have downloaded and managed to build static ptlibs.lib and h323plus.lib. I used VS2017 to load the VS2010 solutions. I left the Windows SDK version at 8.1 and Platform Toolset to V100. What version of the Windows SDK is compatible? It was difficult to find any instructions for building the projects, but I think I got all the pieces hooked up. Now, the challenge is that I want to create a wrapper DLL in VS2017 C++ so I can use features in C#. So, in my wrapper code I am able to access classes/methods from H323Plus. Everything was looking good until I went to build the wrapper project. I am getting 14 compiler errors in the Thread.h and h4601.h header files:
1>C:\H323Work\ptlib\include\ptlib/thread.h(342): error C2143: syntax error : missing ',' before '&'
1>C:\H323Work\ptlib\include\ptlib/thread.h(349): error C2059: syntax error : ')'
1>C:\H323Work\ptlib\include\ptlib/thread.h(349): error C2143: syntax error : missing ')' before ';'
1>C:\H323Work\ptlib\include\ptlib/thread.h(351): error C2143: syntax error : missing ',' before '&'
1>C:\H323Work\ptlib\include\ptlib/thread.h(353): error C2535: 'PThread *PThread::Create(const int)' : member function already defined or declared
1>C:\H323Work\ptlib\include\ptlib/thread.h(353): error C2065: 'notifier' : undeclared identifier
1>C:\H323Work\ptlib\include\ptlib/thread.h(353): error C2065: 'threadName' : undeclared identifier
1>c:\h323work\h323plus-1_27_2\include\h460/h4601.h(1069): error C2143: syntax error : missing ')' before 'generic'
1>c:\h323work\h323plus-1_27_2\include\h460/h4601.h(1069): error C2143: syntax error : missing ';' before 'generic'
1>c:\h323work\h323plus-1_27_2\include\h460/h4601.h(1069): error C2059: syntax error : ')'
1>c:\h323work\h323plus-1_27_2\include\h460/h4601.h(1069): error C2059: syntax error : ';'
1>c:\h323work\h323plus-1_27_2\include\h460/h4601.h(1069): error C2238: unexpected token(s) preceding ';'
1>c:\h323work\h323plus-1_27_2\include\h460/h4601.h(1073): error C2143: syntax error : missing '>' before ';'
1>c:\h323work\h323plus-1_27_2\include\h460/h4601.h(1073): fatal error C1903: unable to recover from previous error(s); stopping compilation
1> 0 Warning(s)
1> 14 Error(s)
I have NO IDEA what is causing these errors. The first error in the list is referring to this statement in Thread.h:
static PThread * Create(
const PNotifier & notifier, ///< Function to execute in thread.
INT parameter = 0, ///< Parameter value to pass to notifier.
AutoDeleteFlag deletion = AutoDeleteThread,
///< Automatically delete PThread instance on termination of thread.
Priority priorityLevel = NormalPriority, ///< Initial priority of thread.
const PString & threadName = PString::Empty(), ///< The name of the thread (for Debug/Trace)
PINDEX stackSize = 65536 ///< Stack size on some platforms
);
It was really frustrating to make it so far in the process only to be stopped by these errors in header files included in the source download.
I would like to find a step-by-step set of instructions for how to compile the current source code provided on H323plus.org using Visual Studio 2017. There is nothing available anywhere (the frequently mentioned http://www.voxgratia.org/documents.html no longer exists). Has anybody been able to download the current source and build the PTLib and H323Plus projects on Windows with VS2017/2010? Note that TECHNICALLY I have built the projects, but I am not 100% sure they were built correctly.
My end goal is to create a C# application that can create a basic H323 endpoint to talk to another H323 device.
Any help would be greatly appreciated.
David