Hello.
I have a Microsoft Visual C++ - Compiler and I try to compile this program:
| 1 | #include <allegro.h> |
| 2 | #include <math.h> |
| 3 | |
| 4 | int main(int argc,char**argv) |
| 5 | { |
| 6 | fixed c[8][8]; |
| 7 | int a, b; |
| 8 | double c; |
| 9 | |
| 10 | for (a=0; a< 8; a++) |
| 11 | { |
| 12 | c = (a == 0) ? sqrt(0.125) : 0.5; |
| 13 | for (b = 0; b < 8; b++){ |
| 14 | c[a]<b> = ftofix(c*a*(b+ 0.5))); |
| 15 | } |
| 16 | } |
| 17 | } END_OF_MAIN |
>>>> There are no errors or warnings, but when i build a .exe file there are 2 errors:-------------------Configuration: Display - Win32 Release-------------------
Compiling...
idctref.c
Linking...
idctref.obj : error LNK2001: unresolved external symbol __imp__allegro_errno
Release/Display.exe : fatal error LNK1120: 1 unresolved externals
Error executing link.exe.
Display.exe - 2 error(s), 0 warning(s)
I would be very gratefully, if somebody write an answer in detail to my question, because I am a Newbie in programming with C++.
You seem to have forgotten to add "alleg.lib" to your list of libraries.
Dear,
Thanks a lot, my project was run.
If you look at the fixed point code in allegro it's a little... disappointing. For multiplication and division, it converts from fixed to float and then performs the operation and then converts back to fixed. What's the point you ask? Indeed....