[vlc-devel] Re: Compile with gcc 3.4 fails

Marius Kjeldahl marius at kjeldahl.net
Thu Dec 9 16:48:00 CET 2004


When/if you update the build files with -fpermissive, you should make 
sure only ".cpp" files gets the parameter, or else you will get warnings 
about that parameter not being valid for pure "C" (only C++/ObjC++). I 
guess the simplest way would be to put it in as part of CPPFLAGS 
somewhere (I tried putting it in the following line in vlc-config.in.in:

cppflags="${includes}"

so that it becomes

cppflags="${includes} -fpermissive"

but I still get a bunch of warnings which indicate that cppflags is 
being used for "pure" C compiles as well. Maybe it would be better to 
put it in the cxxflags parameter as well.

I guess I need to read up on autoconf stuff to figure out how to test 
for gcc 3.4 and put the -fpermissive flag in the right place. Until I do 
maybe somebody else with a clue can put it in the autoconf stuff.

Marius Kjeldahl

Marius Kjeldahl wrote:
> I get errors such as:
> 
> playlist.cpp: In member function `wxMenu* wxvlc::Playlist::SDMenu()':
> playlist.cpp:1351: error: ISO C++ forbids cast to non-reference type 
> used as lvalue
> playlist.cpp:1351: error: ISO C++ forbids cast to non-reference type 
> used as lvalue
> 
> The offending line contains:
> 
>             INSERT_ELEM( (void**)pp_sds, i_number, i_number,
>                          (void*)p_parser->psz_shortname );
> 
> I googled for it, and found the following advice when compiling with gcc 
> 3.4:
> 
> "use -fpermissive, and these errors will change to warnings"
> 
> I can easily fix it locally, but I do not know the autoconf stuff well 
> enough to make sure it gets put into the right place.
> 
> Regards,
> 
> Marius Kjeldahl
> 

-- 
This is the vlc-devel mailing-list, see http://www.videolan.org/vlc/
To unsubscribe, please read http://developers.videolan.org/lists.html



More information about the vlc-devel mailing list