gsoap adding "custom/chrono_time_point.h" "WARNING": missing ';' or invalid type specified - gsoap

after uncommenting in typemap.dat the following line:
xsd__dateTime = #import "custom/chrono_time_point.h" | xsd__dateTime
I run wsdl2h and everything is fine..
but later in soapcpp2 I'm getting the following warning:
custom/chrono_time_point.h(70): *WARNING*: invalid type specified (missing ';' or type name used as non-type identifier?)
what is this?
Edit
I use gsoap windows from vcpkg.

You do not need to #include "custom/chrono_time_point.h" in your code base after adding that line to your typemap.dat. Adding this line suffices to use std::chrono::system_clock::time_point for XML xsd:dateTime values.
Note that #import custom/chrono_time_point.h is used by soapcpp2 to register the std::chrono::system_clock::time_point serializer.
The serialization implementation is custom/chrono_time_point.cpp which should also be compiled together with the project.

Related

Omnet++ make issues

I get the following error when compiling omnetpp-5.4.1, do I need to uninstall the libgles2-mesa-dev package ?
In file included from /usr/include/GL/gl.h:2055:
/usr/include/GL/glext.h:469:19: error: typedef redefinition with different types
('ptrdiff_t' (aka 'int') vs 'khronos_intptr_t' (aka 'long'))
typedef ptrdiff_t GLintptr;
^
/usr/include/GLES3/gl31.h:74:26: note: previous definition is here
typedef khronos_intptr_t GLintptr;
^
In file included from osgviewer.cc:27:
In file included from /usr/include/arm-linux-gnueabihf/qt5/QtGui/QOpenGLFunctions:1:
/usr/include/arm-linux-gnueabihf/qt5/QtGui/qopenglfunctions.h:60:16: error:
cannot combine with previous 'double' declaration specifier
typedef double GLdouble;
^
/usr/include/osg/GL:129:38: note: expanded from macro 'GLdouble'
#define GLdouble double
^
3 errors generated.
This seems to be an issue with the system headers. If you do not need OpenSceneGraph/osgEarth support, you can turn it off in the configure.user file and the re-configure/rebuild omnet. That will exclude the OSG specific files from the build process. (if you do not need the graphical environment (Qtenv) you can even turn off that in the configure.user which will prevent also linking with Qt libs).

Unknown error when compiling Clang 3.3 with Mingw

I'm not able to compile clang(3.3) using MinGW 4.8.1. The following error always pops-up when 70% build is complete:
clang/lib/Basic/FileManager.cpp includes sys/stat.h, which defines #define stat _stat64i32 (actually there are a few other defines in between, but you get the idea ;)
clang/include/clang/Basic/FileManager.h does not include sys/stat.h; instead only has a forward-declaration.
Hence, while parsing the header, the forward declaration is used (struct stat)
But when it finally arrives at the implementation, the preprocessor will kick in and replace struct stat with struct stat64i32. Hence the mismatch.
The best solution would be to change the forward declaration in the header to instead include sys/stat.h. (I didn't actually test if it will compile then)
The current trunk does not contain the code anymore.
Update: regarding off64_t. This is defined in _mingw_off_t.h these days as:
#ifndef _OFF64_T_DEFINED
#define _OFF64_T_DEFINED
__MINGW_EXTENSION typedef long long _off64_t;
#if !defined(NO_OLDNAMES) || defined(_POSIX)
__MINGW_EXTENSION typedef long long off64_t;
#endif
#endif /*_OFF64_T_DEFINED */
So you probably want to define _POSIX before including io.h (or stdio.h)

uic: Unexpected element name

I am trying to compile a .pro file using qmake and Qt4 to get a library from qttestrunnerlib.pro but I get this error:
~/docs/UT_Cpp_Test/main/cppDir/src/qttestrunner$ qmake qttestrunnerlib.pro
uic: Error in line 6, column 14 : Unexpected element name
uic: Error in line 6, column 14 : Unexpected element name
When I use Qt3 it works, and I get my lib successfully. But I want to upgrade it to Qt4. Is it possible? and what should I do?
I've used uic3 from the qt3-support package (on gentoo at least)
uic3 -convert ui-file-qt3.ui -o ui-file-qt4.ui
That is because the designer in qt4 is different from qt3. means ui files generated by qt3 and qt4 are not the same. That's why the unexpected element name error!
The uic reads a user interface definition (.ui) file in XML as generated by Qt
Designer and creates corresponding C++ header or source files.
Easiest way to solve is, use your qt4 ide to open you form and it will ask for
conversion.Then use the newly created ui for your compilation.

Using STL within the Mac 10.5 SDK

Hopefully this is more relevant to StackOverflow than mac.stackexchange...
I am using ARToolkit for an augmented reality project, and in order to make it work under Mac I need to run the 10.5 SDK.
My problem is that I cannot seem to include any of the STL header files...especially vector.
Is there any sort of wrapper or workaround that I can use? I am basically compiling straight C code, and would like to make use of some of the nicer features of the STL framework to speed up development...
Edit:
In closer inspection, it appears that ARToolkit is including std_vector at some point in its include path.
Error snippet:
Bits/c++allocator.h: No such file or directory
Expected template-name before '<' token
Expected `{' before '<' token
Expected unqualified-id before '<' token
/Developer/SDKs/MacOSX10.5.sdk/usr/include/c++/4.2.1/iosfwd
Bits/c++locale.h: No such file or directory
Bits/c++io.h: No such file or directory
/Developer/SDKs/MacOSX10.5.sdk/usr/include/c++/4.2.1/bits/stl_algobase.h
Bits/c++config.h: No such file or directory
/Developer/SDKs/MacOSX10.5.sdk/usr/include/c++/4.2.1/bits/stl_vector.h
Expected type-specifier before 'allocator'
Expected '>' before 'allocator'
'input_iterator_tag' has not been declared
'forward_iterator_tag' has not been declared
'input_iterator_tag' has not been declared
'forward_iterator_tag' has not been declared
'input_iterator_tag' has not been declared
'forward_iterator_tag' has not been declared
There are no arguments to '__N' that depend on a template parameter, so a declaration of '__N' must be available
(if you use '-fpermissive', G++ will accept your code, but allowing the use of an undeclared name is deprecated)
Expected nested-name-specifier before 'iterator_traits'
Expected initializer before '<' token
There are no arguments to '_IterCategory' that depend on a template parameter, so a declaration of '_IterCategory' must be available
Expected nested-name-specifier before 'iterator_traits'
Expected initializer before '<' token
There are no arguments to '_IterCategory' that depend on a template parameter, so a declaration of '_IterCategory' must be available
Expected nested-name-specifier before 'iterator_traits'
Expected initializer before '<' token
There are no arguments to '_IterCategory' that depend on a template parameter, so a declaration of '_IterCategory' must be available
/Users/espais/research/artoolkit/trunk/artoolkit/examples/newproject/newproject.cpp
Expected `}' at end of input
/Developer/SDKs/MacOSX10.5.sdk/usr/include/c++/4.2.1/bits/stl_bvector.h
Expected template-name before '<' token
Expected `{' before '<' token
Expected unqualified-id before '<' token
You might need to make your file a .mm file (Objective-C++) instead of .m (Objective-C).
Other than that, there shouldn't be any trouble doing #include <vector>.
Basically, there was some trickery that had to be done behind the scenes.
I had to update my local SDK (turns out that ARToolkit does support newer versions, regardless of what THEIR documentation says), and then the STL libraries worked.

boost/unordered_set: compile error with mingw ()

I have a piece of code that uses boost's unordered_set
#include <boost/unordered_set.hpp>
boost::unordered_set<string> mySet(100);
It compiles and works fine with gcc under unix. When I try cross compiling with mingw32 (gmake 3.8.1) I get the following message:
In file included
from /usr/i686-pc-mingw32/sys-root/mingw/include/boost/functional/hash/detail/hash_float.hpp:17,
from /usr/i686-pc-mingw32/sys-root/mingw/include/boost/functional/hash/hash.hpp:15,
from /usr/i686-pc-mingw32/sys-root/mingw/include/boost/functional/hash.hpp:6,
from /usr/i686-pc-mingw32/sys-root/mingw/include/boost/unordered/unordered_set.hpp:17,
from /usr/i686-pc-mingw32/sys-root/mingw/include/boost/unordered_set.hpp:16,
from /mnt/VirtualBoxShare/percolator/src/ProteinProbEstimatorHelper.h:33,
from /mnt/VirtualBoxShare/percolator/src/ProteinProbEstimator.cpp:28:
/usr/i686-pc-mingw32/sys-root/mingw/include/boost/cstdint.hpp:105: error: expected unqualified-id before 'unsigned'
/usr/i686-pc-mingw32/sys-root/mingw/include/boost/cstdint.hpp:105: error: expected ';' before 'unsigned'
/usr/i686-pc-mingw32/sys-root/mingw/include/boost/cstdint.hpp:105: error: declaration does not declare anything
/usr/i686-pc-mingw32/sys-root/mingw/include/boost/cstdint.hpp:114: error: expected unqualified-id before 'unsigned'
/usr/i686-pc-mingw32/sys-root/mingw/include/boost/cstdint.hpp:114: error: expected ';' before 'unsigned'
/usr/i686-pc-mingw32/sys-root/mingw/include/boost/cstdint.hpp:114: error: declaration does not declare anything
To me it seems like a template related problem; any suggestions?
Thank you,
Mattia
[EDIT]
other boost functionalities are available, for example the lexical cast
#include <boost/lexical_cast.hpp>
It seems that some typedef breaks the boost cstdint header, which looks like
103 using ::int8_t;
104 using ::int_least8_t;
105 using ::int_fast8_t;
106 using ::uint8_t;
107 using ::uint_least8_t;
108 using ::uint_fast8_t;
on my system. So, some hero probably defined "#define uint8_t" instead of "typedef ... uint8_t", and this code consequently breaks.
You might try to to modify your boost/config/platform/win32.hpp and, if that helps, report the bug to the mingw developers.

Resources