Page 1 of 1

Cannot compile libvlc in Codeblocks

Posted: 19 Apr 2021 04:03
by suckitdry
Hi, I'm trying to compile an example program using libvlc 3.0.0 with Codeblocks 15.12, but I get several errors, first it complained to add -std=c++11 to compiler options, after I added it I got all these errors:

||=== Build: Release in player (compiler: GNU GCC Compiler) ===|
D:\Program Files (x86)\CodeBlocks\MinGW\include\vlc\libvlc_media.h|368|error: 'libvlc_media_read_cb' was not declared in this scope|
D:\Program Files (x86)\CodeBlocks\MinGW\include\vlc\libvlc_media.h|368|error: 'ssize_t' was not declared in this scope|
D:\Program Files (x86)\CodeBlocks\MinGW\include\vlc\libvlc_media.h|368|error: 'libvlc_media_read_cb' was not declared in this scope|
D:\Program Files (x86)\CodeBlocks\MinGW\include\vlc\libvlc_media.h|368|error: 'ssize_t' was not declared in this scope|
D:\Program Files (x86)\CodeBlocks\MinGW\include\vlc\libvlc_media.h|368|error: expected primary-expression before 'void'|
D:\Program Files (x86)\CodeBlocks\MinGW\include\vlc\libvlc_media.h|368|error: expected primary-expression before 'unsigned'|
D:\Program Files (x86)\CodeBlocks\MinGW\include\vlc\libvlc_media.h|369|error: expected primary-expression before 'len'|
D:\Program Files (x86)\CodeBlocks\MinGW\include\vlc\libvlc_media.h|478|error: 'libvlc_media_read_cb' has not been declared|

Re: Cannot compile libvlc in Codeblocks

Posted: 19 Apr 2021 15:48
by RĂ©mi Denis-Courmont
Define the ssize_t type to ptrdiff_t before you include VLC headers.

Re: Cannot compile libvlc in Codeblocks

Posted: 24 Apr 2021 21:35
by suckitdry
Ok thanks