lcm-gen(1)
β¨ lcm-gen(1) β¨
okay bestie, grab a snack because we're about to talk about lcm-gen from the Lightweight Communications and Marshalling (LCM) project π she's the code generation tool and she is, honestly, so iconic.
πΈ NAME πΈ
lcm-gen β the code generation tool. that's it, that's her whole job, and she does it flawlessly π
π¦ SYNOPSIS π¦
lcm-gen [options] FILE...
π DESCRIPTION π
so lcm-gen is the Lightweight Communications and Marshalling code generation utility. you hand her one or more .lcm files (those are the ones holding your LCM message type definitions, iykyk), and she generates language-specific bindings for marshalling and unmarshalling messages of the types you specified. no cap. she just does that. π
and rn she can generate language bindings for C, C++, Java, Python, Lua, and C#. six languages, one girl, main character energy fr fr β¨
π GENERAL OPTIONS π
the universal ones, the ones that work no matter what language you're living in π«Ά
-hβ prints some help text and dips out. cute, informative, quick.-t,--tokenizeβ shows the tokenization. like, the behind-the-scenes of how she's reading your file π-d,--debugβ shows the parsed files. for when you wanna peek at what she actually understood.--lazyβ generates the output file only if the.lcmfile is newer than the output file (or if the output file doesn't already exist yet). so unserious of her, but honestly? valid. why do work you don't need to do π--package-prefix PFXβ adds the package name PFX as a prefix to the declared package. a little name tag, a little accessory β¨--versionβ shows version information and exits. quick lil flex.
π C OPTIONS π
the C crew, we love them, we respect them π
-c,--cβ emit C code. yes ma'am.--c-cpath DIRβ destination directory for the generated.cfiles. (default: current directory)--c-hpath DIRβ destination directory for the generated.hfiles. (default: current directory)--cinclude DIRβ the generated#includelines reference this directory.--c-no-pubsub DIRβ do not generate_publishand_subscribefunctions. this gives you.cand.hfiles with no linking dependencies that you can use for just marshalling, totally separate from liblcm. but heads up bestie: they still#include <lcm/lcm_coretypes.h>, so you'll need to copy that file over to the appropriate include path yourself π--c-typeinfoβ generates typeinfo functions for each type. it's experimental, so like, she's trying something new, be nice π
β C++ OPTIONS β
-x,--cppβ emit C++ code.--cpp-hpath DIRβ destination directory for the generated.hppfiles. (default: current directory)--cpp-include DIRβ the generated C++#includelines reference this directory.--cpp-std STDβ the generated files comply with the specified C++ standard. supported values are:c++98,c++11. default isc++98. choose your era, bestie π°οΈ
β JAVA OPTIONS β
-j,--javaβ emit Java code.--jpath DIRβ destination base directory for the generated Java files. (default: current directory)--jmkdir <true|false>β automatically create Java source directories. (default:true)--jdecl STRβ a string added to class declarations. (default:implements lcm.lcm.LCMEncodable)--jdefaultpkg PKGβ the default Java package if the LCM type has no package. (default:lcmtypes)
π PYTHON OPTIONS π
-p,--pythonβ emit Python code.--ppath DIRβ destination base directory for the generated Python files. (default: current directory)
π LUA OPTIONS π
-l,--luaβ emit Lua code.--lpath DIRβ Lua destination directory.
π C#.NET OPTIONS π
--csharpβ emit C#.NET code--csharp-path DIRβ C#.NET destination directory--csharp-mkdir <true|false>β make C#.NET source directories automatically. (default:true)--csharp-strip-dirs <true|false>β do not generate folders for default and root namespace. (default:false)--csharp-decl STRβ a string added to class declarations. (default:" : LCM.LCM.LCMEncodable")--csharp-root-nsp NSPβ root C#.NET namespace (wrapper) added before the LCM package. (default:"")--csharp-default-nsp NSPβ default C#.NET namespace if the LCM type has no package. (default:LCMTypes)
π COPYRIGHT π
lcm-gen is part of the Lightweight Communications and Marshalling (LCM) project. permission is granted to copy, distribute and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. see the file COPYING in the LCM distribution for more details regarding distribution π
LCM is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. see the GNU Lesser General Public License for more details. you should have received a copy of the GNU Lesser General Public License along with LCM; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
π«Ά AUTHOR π«Ά
this manual page was written by Albert Huang. thank you for your service, legend π
and that's the whole vibe, bestie π¦ this is LCM, dated 2007-12-13, living her best life as lcm-gen(1). go generate something iconic β¨π
π
π¦ where this page comes from
- debian bookworm: liblcm-bin 1.3.1+repack1-3 Β· LGPL-2.1-or-later
- debian trixie: liblcm-bin 1.3.1+repack1-9 Β· LGPL-2.1-or-later
- ubuntu jammy: liblcm-bin 1.3.1+repack1-2.3 Β· LGPL-2.1-or-later
- ubuntu noble: liblcm-bin 1.5.0~repack1-0ubuntu1 Β· LGPL-2.1-or-later
- ubuntu questing: liblcm-bin 1.5.0~repack1-0ubuntu2
- ubuntu resolute: liblcm-bin 1.5.0~repack1-0ubuntu4 Β· LGPL-2.1-or-later
- ubuntu stonking: liblcm-bin 1.5.0~repack1-0ubuntu4 Β· LGPL-2.1-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms