Skip to content
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
119 lines (67 sloc) 1.74 KB






(C++) shared_ptr.hpp: call to undefined function 'assert'


Compile error.








IDE: C++ Builder 6.0

Compiler: Borland BCC32.EXE version

Project type: VCL


The compiler takes you to shared_ptr.hpp, to the BOOST_ASSERT:


T * operator-> () const // never throws {   BOOST_ASSERT(px != 0);   return px; }


I still do not understand why it occurs (as on top of the header file boost/assert.hpp is #included).


This error started to occur when I split a multi-unit project over multiple folders, in which I had defined by own assert.h (instead of Assert.hpp) and use assert (instead of Assert).








  • Move the 'Auto-Create Forms' to 'Available' (Choose 'Project | Options | Forms')
  • Now compiling should be successful
  • Move the 'Available' Forms back


Why this works? I don't know.






Alternative possible solution


  • remove all files from the project
  • remove all project directories (i.e. the multiple paths for the project)
  • rename your own assert.h to Assert.hpp, use Assert instead of assert
  • add the removed files to the project again







You can’t perform that action at this time.