Alleggl Teething Troubles
govind

After successfully(!) installing Allegro and AllegroGL with commands "vcvars32.bat", "mingw32-make DEBUGMODE=1" AND "mingw32-make install DEBUGMODE=1" calls, building the very first tutorial "agl01.cpp" 8-)in vc++6 gives the following error-log:
"Output Window
Linking...
agl01.obj : error LNK2001: unresolved external symbol __imp__glClearColor@16
agl01.obj : error LNK2001: unresolved external symbol __imp__set_gfx_mode
agl01.obj : error LNK2001: unresolved external symbol __imp__install_keyboard
agl01.obj : error LNK2001: unresolved external symbol _install_allegro_gl
agl01.obj : error LNK2001: unresolved external symbol __imp__install_allegro
agl01.obj : error LNK2001: unresolved external symbol __imp__readkey
agl01.obj : error LNK2001: unresolved external symbol __imp__glClear@4
agl01.obj : error LNK2001: unresolved external symbol __imp___WinMain
LIBCD.lib(crt0.obj) : error LNK2001: unresolved external symbol _main
Debug/agl01.exe : fatal error LNK1120: 9 unresolved externals
Error executing link.exe.
Results
agl01.exe - 10 error(s), 0 warning(s)"
These unresolved external symbol errors are beyond me.
Thanks for any help.
Moe8-)

the_y_man

you probably forgot to link the lib

Goodbytes

What libraries are you linking with? The agl, alleg, opengl32 and glu32 libraries are required to compile AllegroGL programs.

govind

Thanks to your valuable suggestions, I have now linked alleg.lib, agl.lib, openl32.lib and glu32.lib and as a result the whole bunch of errors has now shrunk to the following, just two which I am unable to eliminate:

"Output Window

Linking...
LIBCD.lib(crt0.obj) : error LNK2001: unresolved external symbol _main
Debug/agl01.exe : fatal error LNK1120: 1 unresolved externals
Error executing link.exe.

Results
agl01.exe - 2 error(s), 0 warning(s)"

Looking forward to your further help.
Thanks.
Moe

Bob

Make sure your project is a Windows Application and not a Windows Console Application.

govind

Thaks Bob. Now I get "0" warnings and "0" errors as indicated below:
Output Window
Linking...
Results
agl01.exe - 0 error(s), 0 warning(s)

However, on clicking agl01.exe icon in debug folder, I do not see anything.
I can mail the agl01.exe folder if that will help in diagnosis.
Thanks.
Moe

Zaphos

As in, you see an empty window?
If yes, try the code here:
http://www.allegro.cc/forums/view_thread.php?_id=217716#post_217838 And tell us if that works ...

govind

I have just tried the code from the suggested site but it produces the same execute file which on clicking flicks and disappears. I forgot to mention that even though I am building the project as "Windows Application", what I get as an end product is a "Console execute" file with rectangular icon!!! This is the first time I am seeing this phenomenon.
Thanks for your help which has made me come so far.
Moe
P.S. I also get this message from the debugger:
LIBCD.lib(wincrt0.obj) : error LNK2001: unresolved external symbol _WinMain@16
And also:
LINK : warning LNK4098: defaultlib "LIBC" conflicts with use of other libs; use /NODEFAULTLIB:library
These however disappear on recompiling the source
file and rebuilding the execute file.

Thread #229577. Printed from Allegro.cc