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

Article ID: 551
Created On: Tue, May 12, 2015 at 3:04 PM
Last Updated On: Tue, May 12, 2015 at 7:43 PM
Authored by: Administrator

Online URL: https://www.prosoft-technology.com/kb/article.php?id=551