Skip to main content

Posts

Showing posts with the label compiler

[ffmpeg] ffmpeg-2.2 patch for relocation R_X86_64_PC32 against symbol error

ffmpeg-2.2-patch ffmpeg-2.2 patch for relocation R_X86_64_PC32 against symbol error when compile in x64-bit Patch Link: Download: V1.0 Scope of Issue: When ffmpeg is built for static library and this compiled static library is linked with another dynamic library then the final linking failed with error -- ffmpeg/libavcodec/libavcodec.a(xx_yyyy.o): relocation R_X86_64_PC32 against symbol `ff_xx_yy_zz_qq' can not be used when making a shared object; recompile with -fPIC /usr/bin/ld: final link failed: Bad value collect2: ld returned 1 exit status Machine: x64-bit Linux, Unix, may be windows 64-bit How to fix: Use the ffmpeg-2.2.patch in your FFmpeg-n2.2 release source. How to apply patch: Copy the downloaded patch to your FFmpeg-n2.2 folder. Test the patch compatibility with your ffmpeg source by -- patch --dry-run -p1 -i ffmpeg-2.2.patch giving this command inside your ffmpeg source folder. If the test returns no fail patch file then you are ...

Shift Reduce algorithm source code in c for Compiler

#include #include #include #include #include using namespace std; struct stru1 { char non_ter[1],pro[25]; }cfg[25]; int n,st=-1,j,i,t=-1,m; int v,c,p=1; char str[20],stack[20],ch,tmp[10]; void match(int k); void matchl(int k); int main() { printf("Enter the number of productions:\n"); scanf("%d",&n); printf("\n"); printf("Enter the productions on LEFT and RIGHT sides:\n"); for(i=0;i \n"); scanf("%s",cfg[i].pro); printf("\n"); } printf("Enter the input string:\n"); scanf("%s",str); printf("\n"); i=0; do { ch=str[i]; stack[++st]=ch; tmp[0]=ch; match(1); i++; }while(str[i]!='\0'); c=st; v=st; puts(stack); printf("\n"); while(st) { --st; v=st; t=-1; p=0; while(v<=c) { ...