[vox-tech] inline keyword solves "undefined reference" issue

Chanoch (Ken) Bloom kbloom at gmail.com
Wed Jun 9 10:57:24 PDT 2010


On Wed, 2010-06-09 at 09:47 -0700, Jeff Newmiller wrote:
> Glad you fixed it okay.  After thinking about it for awhile, I think
> the inline keyword was simply masking the problem.  If you had not yet
> written any code that called new_video_stream,  then that method would
> not be instantiated in your object code, and the offending reference
> to av_new_stream would not be there needing to be resolved.
> 
> FWIW I recommend not modifying code from the ffmpeg C source to keep
> your C++ code better isolated from the C code.  If you follow this
> advice you should not need the ifdef at all, because the C compiler
> should never encounter the extern "C" syntax. 

I was going to suggest the same solution, but I couldn't figure out why
inlining the code made a difference. Thanks for explaining.

--Ken


More information about the vox-tech mailing list