:: Re: [DNG] Pointer error in the back…
Página Principal
Delete this message
Reply to this message
Autor: aitor_czr
Data:  
Para: Edward Bartolo
CC: dng
Assunto: Re: [DNG] Pointer error in the backend of Netman
Hi Edward,

Now i get the following error trying to compile the backend:

" ... automated_scanner.c:291: undefined reference to `pow' ... "

The 'pow' function is part of the 'math' library. Therefore, the
invokation of the compiler should be as follows:

$ gcc -g -lm [...]

in order to link with the math library, but it doesn't work for me even
though the headers <math.h> are included in 'automated_scanner.c'

Aitor.

Note.- I'm using the latest version in your git repository.

https://git.devuan.org/edbarx/netman


On 12/06/2015 03:19 PM, Edward Bartolo wrote:
> Hi Aitor,
>
> This is my latest edit of the code so that memory allocations are done
> when needed instead of the iteration just before more memory is
> required.
>
> The edited code:
>                  if (z == 1)
>             active_wifi_list = calloc(10, sizeof(void*));
>         else if ((z - 1) % 20 == 0)
>             active_wifi_list = realloc(active_wifis, (((z - 1)/2) + 10)*sizeof(void*));

>
>
> Edward