<div dir="ltr"><div><div><div>Hello Pavel,<br><br></div>You're right: changing the extension to .cc made it work, even without protecting Init task in my case.<br><br></div>Best Regards,<br></div>Saeed<br></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Aug 18, 2016 at 2:42 AM, Pavel Pisa <span dir="ltr"><<a href="mailto:ppisa4lists@pikron.com" target="_blank">ppisa4lists@pikron.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hello Saeed,<br>
<span class=""><br>
On Wednesday 17 of August 2016 21:47:31 Saeed Ehteshamifar wrote:<br>
> I had no main(). I was using Init() for C++ and C version as well.<br>
<br>
</span>I have checked RTEMS OMK rules with C++ application and it works<br>
for me.<br>
<br>
Makefile.omk<br>
------------------------------<wbr>-------------------------<br>
bin_PROGRAMS = appcpptest<br>
<br>
#lib_LIBRARIES =<br>
<br>
#include_HEADERS =<br>
<br>
appcpptest_SOURCES += init.cc task_1.cc test.c<br>
<br>
#appfoo_EMBEDTARFILES = rootfs<br>
<br>
lib_LOADLIBES += bar<br>
------------------------------<wbr>-------------------------<br>
<br>
I have to protect Init() definition in example system.h<br>
to build init.cc by C++ compiler<br>
<br>
#ifdef __cplusplus<br>
extern "C" {<br>
#endif<br>
<br>
rtems_task Init(<br>
  rtems_task_argument argument<br>
);<br>
<br>
#ifdef __cplusplus<br>
} /* extern "C"*/<br>
#endif<br>
<br>
I expect that your problem cause can be that RTEMS OMK rules<br>
variant recognizes only *.cc extension as C++ sources correctly.<br>
It filters out other unknown sources extensions which leads<br>
to link of empty application without init table defaulting to main.<br>
<br>
I can try to enhance that that more used C++ extensions<br>
(*.C, *.cxx, *.cpp) are recognized by RTEMS OMK as well.<br>
<br>
You can check how OMK build calls build tools with use of V=1<br>
option, that is<br>
<br>
  make clean all V=1<br>
<br>
Best wishes,<br>
<br>
                Pavel<br>
</blockquote></div><br></div>