When I remove {$LINKLIB stdc++} FPC can't find pow but also C mem management functions like malloc/free/calloc etc. Not many functions overall so I'll add their Pascal replacements like you did with pow to OpenJpeg unit to get rid of stdc++.

Hmm when I compile project in Lazarus it doesn't need stdc++ nor function replacements, maybe Laz links some C libs automatically?