hello,<br><br>we are having problems in compiling a 'slightly' altered x264. We are always receiving a <span style="color: rgb(255, 0, 0);">'helloWorld' undeclared (first use this function)</span> error. We may be commiting a very simple error but we just have to ask after looking through possible solutions that have not worked.
<br><br>So far, we are able to successfully compile the x263 source (an unaltered one from the VideoLAN downloads section) using the instructions found at <a href="http://www.mplayerhq.hu">www.mplayerhq.hu</a>. So now, we are trying to see if we can really access the library
libx264.a using a method of ours which is adding a simple int-returning function named hellowWorld(). <br><br>We are currently using Dev-Cpp. Our project directory contains the files:<br><br>main.cpp<br>libx264.a<br>x264_test.dev
<br><br>In Project -> project options -> parameters:<br>libx264.a<br><br>In Project -> project options -> directories:<br>Library directory: our project directory<br>Include directory: our project directory<br>
<br><br>As for the source codes, here is the code for <span style="color: rgb(51, 51, 255);">main.cpp</span>:<br>------------------<br>#include <stdio.h><br>#include <cstdlib><br>#include <iostream><br>#include <
stdint.h><br><br>int main(int argc, char *argv[])<br>{<br> argc = helloWorld();<br> system("PAUSE");<br> return EXIT_SUCCESS; <br>}<br>------------------<br>Note: as we are coding main.cpp, it can see the int helloWorld() function (through the autocomplete feature)
<br><br>As i mentioned, we added a function named helloWorld() at the end of x264.c<br>------------------<br>...<br>static int close_file_mkv( hnd_t handle )<br>{<br> ...<br>}<br><br>extern int helloWorld()<br>{<br> return -1;
<br>}<br>------------------<br><br>We added the helloWorld prototype in x264.h:<br>------------------<br>extern int helloWorld();<br>------------------<br><br>And so, we compiled x264 again and tried to use the new libx264.a
in our project. As we try to compile our own test project, we get the following errors:<br><br><span style="color: rgb(255, 0, 0);">Compile Log:</span><br>Compiler: Default compiler<br>Building Makefile: "C:\Documents and Settings\Michi and the others\Desktop\x264-test\Makefile.win"
<br>Executing make...<br>make.exe -f "C:\Documents and Settings\Michi and the others\Desktop\x264-test\Makefile.win" all<br>g++.exe -c main.cpp -o main.o -I"C:/Dev-Cpp/lib/gcc/mingw32/3.4.2/include" -I"C:/Dev-Cpp/include/c++/3.4.2/backward" -I"C:/Dev-Cpp/include/c++/3.4.2/mingw32" -I"C:/Dev-Cpp/include/c++/3.4.2" -I"C:/Dev-Cpp/include" -I"C:/Documents and Settings/Michi and the others/Desktop/x264-test"
<br><br>main.cpp: In function `int main(int, char**)':<br><br>main.cpp:11: error: `helloWorld' undeclared (first use this function)<br>main.cpp:11: error: (Each undeclared identifier is reported only once for each function it appears in.)
<br><br>make.exe: *** [main.o] Error 1<br><br>Execution terminated<br><br><br>We are currently stuck at this problem.I hope anybody could help us. <br><br>Thank you.<br><br><br><br><br>