Home » Categories » Multiple Categories

How to compile a C++ project using the sample LDM makefile

Although the samples included with the LDM modules are written in C, it is also possible to compile the C++ code as a C++ project.

1) Rename your source code extensions from .cpp to .c (case sensitive!)

2) Replace all instances of "gcc" with "g++" in the makefile

Compiling the code through g++ will force C++ code as output.

While this workaround should suffice for simple C++ projects, it has not been well tested. For production builds on more advanced projects, the use of a custom makefile is highly recommended.

Custom Fields
    Attachments (0) Attachments
    There are no attachments for this article.
    Comments Comments
    There are no comments for this article. Be the first to post a comment.
    Related Articles RSS Feed
    Where are the on-board jumper positions defined for my MVI module?
    Viewed 1 times since Tue, Nov 28, 2006
    MVI56E-LDM FAQ
    Viewed 1 times since Thu, Jun 12, 2014
    What is the best ProSoft solution for communicating to devices that use the Siemens USS ASCII-based protocol?
    Viewed 1 times since Mon, Feb 18, 2008