ludocode / mpack

MPack - A C encoder/decoder for the MessagePack serialization format / msgpack.org[C]
MIT License
521 stars 82 forks source link

How to compile with Borland C++ Builder 6 (2002) #76

Closed orill closed 4 years ago

orill commented 4 years ago

I was looking for a simple C/C++ msgpack library to use with Borland C++ Builder 6 ... Unfortunately, complexity of macros, re-definitions, and exotic headers killed my hopes. Same problem with Flatbuffers.

May the gods of computing hear me !

ludocode commented 4 years ago

MPack is written in the portable subset of C99 and C++. Your compiler is very old so it probably doesn't support C99, but you may have some luck building MPack as C++.

Try renaming mpack.c to mpack.cpp first to make use of mixed declarations and code. You'll probably need to get a portable stdint.h header since I doubt there will be one with your compiler. This will give you the standard types like int32_t. You may also have some problems with variadic macros, so you may need to clean up mpack_assert() with some refactoring tool.

There might be a few more issues, but I can't think of any others off the top of my head. Maybe you can get it to work. Good luck!