Yepessin / slb

Automatically exported from code.google.com/p/slb
0 stars 0 forks source link

Missing stdlib include causes malloc to not be linked properly #20

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Compile SLB on GCC 4.6.3

What is the expected output? What do you see instead?

You get the error: "there are no arguments to 'malloc' that depend on a 
template parameter, so a declaration of 'malloc' must be available (if you use 
'-fpermissive', G++ will accept your code, but allowing the use of an 
undeclared name is deprecated)"

What version of the product are you using? On what operating system?

Latest trunk, on Ubuntu 12.04.

Please provide any additional information below.

This is because malloc is not explicitly included from any header file.  Adding 
an explicit declaration to stdlib.h or cstdlib.h seems to resolve it.

Original issue reported on code.google.com by psi...@gmail.com on 17 Feb 2013 at 4:59

Attachments:

GoogleCodeExporter commented 8 years ago
Done, thanks for the report.

Original comment by joseLuis...@gmail.com on 20 Feb 2013 at 12:37