Hi. The code looks fine. Can you try compiling with Visual Studio 2005?
AG_TAILQ_HEAD() is a simple macro that takes two arguments and expands
to a struct. The only explanations I can see for those errors is either
a serious compiler bug, or something in your system headers somehow
redefining "AG_TAILQ_HEAD" which seems unlikely.
On Tue, Sep 09, 2008 at 04:30:17PM +0000, Raiker wrote:
> Following the instructions i downloaded SDL, Freetype, Pthreads and Agar,
> added
> the include and lib directories of each to the VC compiler options but when i
> compile the hello world example included on AGAR 1.3.2 i get this:
>
> --------------------Configuration: ADACII - Win32 Debug--------------------
> Compiling...
> ADACII.cpp
> e:\projects\tools & apis\agar-1.3.2\include\agar\core\object.h(82) : warning
> C4003: not enough actual parameters for macro 'AG_TAILQ_HEAD'
> e:\projects\tools & apis\agar-1.3.2\include\agar\core\object.h(83) : warning
> C4003: not enough actual parameters for macro 'AG_TAILQ_HEAD'
> e:\projects\tools & apis\agar-1.3.2\include\agar\core\object.h(84) : warning
> C4003: not enough actual parameters for macro 'AG_TAILQ_HEAD'
> e:\projects\tools & apis\agar-1.3.2\include\agar\core\object.h(86) : warning
> C4003: not enough actual parameters for macro 'AG_TAILQ_HEAD'
> e:\projects\tools & apis\agar-1.3.2\include\agar\gui\view.h(339) : warning
> C4244: '=' : conversion from 'unsigned __int32' to 'unsigned __int8', possible
> loss of data
> e:\projects\tools & apis\agar-1.3.2\include\agar\gui\view.h(340) : warning
> C4244: '=' : conversion from 'unsigned __int32' to 'unsigned __int8', possible
> loss of data
> e:\projects\tools & apis\agar-1.3.2\include\agar\gui\view.h(341) : warning
> C4244: '=' : conversion from 'unsigned __int32' to 'unsigned __int8', possible
> loss of data
> e:\projects\tools & apis\agar-1.3.2\include\agar\gui\view.h(345) : warning
> C4244: '=' : conversion from 'unsigned __int32' to 'unsigned __int16',
> possible
> loss of data
> e:\projects\tools & apis\agar-1.3.2\include\agar\gui\view.h(348) : warning
> C4244: '=' : conversion from 'unsigned __int32' to 'unsigned __int8', possible
> loss of data
> e:\projects\tools & apis\agar-1.3.2\include\agar\gui\widget.h(141) : warning
> C4003: not enough actual parameters for macro 'AG_SLIST_HEAD'
> e:\projects\tools & apis\agar-1.3.2\include\agar\gui\widget.h(142) : warning
> C4003: not enough actual parameters for macro 'AG_SLIST_HEAD'
> e:\projects\tools & apis\agar-1.3.2\include\agar\gui\window.h(75) : warning
> C4003: not enough actual parameters for macro 'AG_TAILQ_HEAD'
> e:\projects\tools & apis\agar-1.3.2\include\agar\gui\window.h(75) : error
> C2580:
> redefinition of class name 'ag_window'
> e:\projects\tools & apis\agar-1.3.2\include\agar\gui\window.h(75) :
> see
> declaration of 'ag_window'
> e:\projects\tools & apis\agar-1.3.2\include\agar\gui\window.h(75) : error
> C2649:
> 'ag_window' : is not a 'struct'
> e:\projects\tools & apis\agar-1.3.2\include\agar\gui\label.h(54) : warning
> C4003: not enough actual parameters for macro 'AG_SLIST_HEAD'
> e:\projects\tools & apis\agar-1.3.2\include\agar\gui\tlist.h(78) : warning
> C4003: not enough actual parameters for macro 'AG_TAILQ_HEAD'
> e:\projects\tools & apis\agar-1.3.2\include\agar\gui\file_dlg.h(58) : warning
> C4003: not enough actual parameters for macro 'AG_TAILQ_HEAD'
> e:\projects\tools & apis\agar-1.3.2\include\agar\gui\file_dlg.h(89) : warning
> C4003: not enough actual parameters for macro 'AG_TAILQ_HEAD'
> e:\projects\tools & apis\agar-1.3.2\include\agar\gui\graph.h(78) : warning
> C4003: not enough actual parameters for macro 'AG_TAILQ_HEAD'
> e:\projects\tools & apis\agar-1.3.2\include\agar\gui\graph.h(79) : warning
> C4003: not enough actual parameters for macro 'AG_TAILQ_HEAD'
> e:\projects\tools & apis\agar-1.3.2\include\agar\gui\notebook.h(49) : warning
> C4003: not enough actual parameters for macro 'AG_TAILQ_HEAD'
> e:\projects\tools & apis\agar-1.3.2\include\agar\gui\table.h(143) : warning
> C4003: not enough actual parameters for macro 'AG_SLIST_HEAD'
> e:\projects\tools & apis\agar-1.3.2\include\agar\gui\tableview.h(188) : error
> C2010: '.' : unexpected in macro formal parameter list
> e:\projects\tools & apis\agar-1.3.2\include\agar\gui\tableview.h(188) : error
> C2010: '.' : unexpected in macro formal parameter list
> e:\projects\tools & apis\agar-1.3.2\include\agar\gui\tableview.h(188) : error
> C2010: '.' : unexpected in macro formal parameter list
> Error executing cl.exe.
> Creating browse info file...
>
> ADACII.exe - 5 error(s), 20 warning(s)
>
> i'm not used to windows programming, i'm a microcontroller guy mostly, but
> this
> reads like a compiling order problem or a missing include?
> this is the code i compile:
>
> // ADACII.cpp : Defines the entry point for the console application.
> //
>
> #include "ADACII.h"
> #include <agar/core.h>
> #include <agar/gui.h>
>
> int main(int argc, char *argv[])
> {
> AG_Window *win;
>
> if (AG_InitCore("hello", 0) == -1 ||
> AG_InitVideo(320, 240, 32, AG_VIDEO_RESIZABLE) == -1)
> return (1);
>
> win = AG_WindowNew(0);
> AG_LabelNewStatic(win, 0, "Hello, world!");
> AG_WindowShow(win);
>
> AG_EventLoop();
> return (0);
> }
>
> Dont know what else i could give you to try and locate the problem.
> System specs:
> Visual C++ 6.0
> Windows 2003 Server SDK feb (last sdk to support vc6)
> Windows XP SP3 just installed and patched
> Know that i remember i havent copied the dll's to the system folder yet, but
> that should appear after compiling...
>
> Thanks for any help!
>
> _______________________________________________
> Agar mailing list
> [email protected]
> http://libagar.org/lists.html
_______________________________________________
Agar mailing list
[email protected]
http://libagar.org/lists.html