Причина желания использовать подушку состоит в том, чтобы создавать ту же среду библиотеки с помощью проекта Python-Tensorflow, который использует подушку. OpenCV и подушка. "Loop. < /p>
Код: Выделить всё
'ImagingMemoryArena': 'ImagingMemoryArena *' differs in levels of indirection from 'ImagingMemoryArena'
Я думал, что C код может быть составлен в коде C ++. Так что попробовал приведенный ниже код в .c и .cpp file оба. . < /p>
#if defined(__cplusplus)
extern "C" {
#endif
typedef struct ImagingMemoryArena {
int alignment; /* Alignment in memory of each line of an image */
int block_size; /* Preferred block size, bytes */
int blocks_max; /* Maximum number of cached blocks */
int blocks_cached; /* Current number of blocks not associated with images */
int stats_new_count; /* Number of new allocated images */
int stats_allocated_blocks; /* Number of allocated blocks */
int stats_reused_blocks; /* Number of blocks which were retrieved from a pool */
int stats_reallocated_blocks; /* Number of blocks which were actually reallocated after retrieving */
int stats_freed_blocks; /* Number of freed blocks */
} *ImagingMemoryArena;
#if defined(__cplusplus)
}
#endif
< /code>
Я хочу узнать причину, почему компилятор c ++ допускает ошибку для приведенного выше кода, даже включая «extern c».
Спасибо.>
Подробнее здесь: https://stackoverflow.com/questions/653 ... -c-program
Мобильная версия