# Cannot find \_fini and \_init at link when C++ option used

**URL:** <https://forums.digi.com/t/cannot-find-fini-and-init-at-link-when-c-option-used/5095>\
**Category:** NET+OS\
**Created:** [March 13, 2007, 2:42pm UTC](https://forums.digi.com/t/cannot-find-fini-and-init-at-link-when-c-option-used/5095 "2007-03-13T14:42:18Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![marcm](https://avatars.discourse-cdn.com/v4/letter/m/439d5e/32.png) [@marcm](https://forums.digi.com/u/marcm)\
**Post date:** [March 13, 2007, 2:42pm UTC](https://forums.digi.com/t/cannot-find-fini-and-init-at-link-when-c-option-used/5095/1 "2007-03-13T14:42:18Z")

</div>

I have created a basic project using the wizard and selected the options I needed of Web, FTP and File System. I need to use C++ for some of the code in the system but when I enable the C++ option in project properties it is causing linker errors because \_fini and \_init cannot be found.

If I use the C++ demo from the sample projects there is no linker problem. Are there any specific libraried I have to include to get the linking to work ?

Thanks.

---

<div class="post-metadata">

**Author:** ![egawtry](https://avatars.discourse-cdn.com/v4/letter/e/8e8cbc/32.png) [@egawtry](https://forums.digi.com/u/egawtry)\
**Post date:** [March 13, 2007, 3:45pm UTC](https://forums.digi.com/t/cannot-find-fini-and-init-at-link-when-c-option-used/5095/2 "2007-03-13T15:45:09Z")

</div>

Some ideas:

1. Did you list your files under APP\_CC\_FILES instead of APP\_C\_FILES in the makefile?
2. Did you add the extern “C” to your init functions?
3. When you moved your source, did you adjust the NETOS\_DIR path in the makefile?
4. In your appconf.h, did you define APP\_CPP as TRUE?

-Erik
