Jason Hamilton | 5 Aug 05:37

Compiling Agar 1.3.2-win32-i386 in MSVS C++ 2008

Hey everybody,

  So I recently downloaded the Agar API and followed the (lengthy) installation 
procedures to the letter.  When I get to the end and try to build a project 
with it, I get 122 unresolved external errors in ag_core.lib and ag_gui.lib, 
but everything compiles fine.  What else do I have to do to get these libraries 
to build?  Any suggestions would be greatly appreciated.

Yours,
Jason
Olivier Boudeville | 1 Aug 18:29

Windows build, C++ interface, string_compat

Hi again,

any news about the Windows build ? With Visual Express 2008 and the Agar
vanilla 2005 project files (converted automatically to 2008), I was
unable with to build Agar 1.3.2 (compilation was failing in Windows
headers), and with a project file I made by myself, compilation and
linking succeeded, a non-empty DLL was produced, but no LIB was
generated. After some study of the project files I was able even to
figure out how they could be generated with either version of Visual
C++. Any hint would help a lot!

In the Agar FAQ, one can see that a "class-based C++ interface is
currently under development". Is it still the case ? If yes, is there a
planned release date ?

Finally, according to the compiler on Linux (gcc 4.2.3), in
agar-1.3.2/include/agar/agar/core/string_compat.h, in function
AG_Strncasecmp(const char *s1, const char *s2, size_t n), line 167,
since size_t is an *unsigned* integral type,  --n >= 0 will always be
true and n < 0 will always be false, in:

    while (--n >= 0 && cm[*us1] == cm[*us2++]) {
        if (*us1++ == '\0')
            return (0);
    }
    return (n < 0 ? 0 : cm[*us1] - cm[*--us2]);

Thanks in advance for any hint,
best regards,

(Continue reading)

Olivier Boudeville | 26 Jul 21:50

Build of Agar 1.3.2 with Visual Express 2008

Hi,

I successfully built Agar 1.3.2 on Linux, now I am trying to do the same
with Visual Express 2008, with no luck. I would like to link dynamically
to Agar (thanks to a DLL).

I can produce the relevant Agar DLL (ex: agar_core.dll) but no LIB file
is produced, despite I really think I correctly setup the project
properties.

One explanation could be that no .lib file is produced because no symbol
is exported from the library. Indeed I was unable to find
__declspec(dllexport) statements in header files. Is it that Agar is
using a .def file ? Or any other approach ?

Thanks in advance for any hint,
best regards,

Olivier.
ADI64 | 20 Jul 11:01

Agar seems to compile without OpenGL [win / msys]

Hey all,

I compiled the agar library under windows with msys ( --enable-threads
--with-freetype --with-gl ).
Configure checked for OpenGL32, found it and said it's working and compiled the
library.
In my project, I use parts of the glview.c example in a c++ project.
The code part is:

--------------------------------
AG_Window *gui;
AG_GLView *glv;
AG_HBox *hb;

....

gui = AG_WindowNew(AG_WINDOW_PLAIN);
hb = AG_HBoxNew(gui, AG_HBOX_EXPAND);
AG_LabelNewString(gui, 0, "Heyho, let's go");
// Create the AG_GLView widget.
glv = AG_GLViewNew(hb, AG_GLVIEW_EXPAND);
--------------------------------

Everything compiles and links fine, but the AG_GLViewNew function seems to make
problems.
The Error output is:

--------------------------------
||=== SDLtest, Debug ===|
obj\Debug\engine.o||In function `_ZN7TEngine14T3D_OpenWindowEiib':|
(Continue reading)

Jason Schmidlapp | 1 Jul 03:14

Linker errors about ctype


I'm working with Agar on the PSP platform.  I have the library building 
successfully, but am running into a problem when I try to link the
Agar library with a simple test application.  I get a number of errors
similar to the following:

/usr/local/pspdev/lib/gcc/psp/4.1.0/../../../../psp/lib/libag_gui.a
  (keymap_ascii.o): In function `EmulateShiftUSKBD':
keymap_ascii.c:(.text+0x300): undefined reference to `__ctype_b_loc'
keymap_ascii.c:(.text+0x410): undefined reference to `__ctype_toupper_loc'

All of the errors relate to ctype - the other Agar symbols link OK.  Has 
anyone run into anything similar before?  The Agar library and the test 
app are being built with exactly the same toolchain and support 
libraries (clib, etc).

Thanks!

--Jason
Jason Schmidlapp | 30 Jun 03:16

Linker errors about ctype


I'm working with Agar on the PSP platform.  The library compiles OK, 
but I get some errors when I go to link it with a simple test 
application  of mine.  Here is an example of the errors I get:

usr/local/pspdev/lib/gcc/psp/4.1.0/../../../../psp/lib    
     /libag_gui.a(keymap_ascii.o):
In function `EmulateShiftUSKBD':
keymap_ascii.c:(.text+0x300): undefined reference to 
    `__ctype_b_loc'
keymap_ascii.c:(.text+0x410): undefined reference to 
    `__ctype_toupper_loc'

It also occurs in text.c and file_dlg.c

These are the only linker errors I get, so I'm assuming that the 
other Agar API calls are being correctly linked.  My test app and 
the Agar library are being built with the same version of the
toolchain, same support libraries, etc. 

Any ideas?  I'm stumped...

Thanks!
Matthew Hagerty | 24 Jun 19:08

Setup for writing an emulator?

Greetings,

I'm starting to evaluate using Agar for an emulator I'm writing for my classic computer of choice (TI-99/4A) and I have a few questions.  I have the CPU almost done and it's time to get it out of command line mode and into a GUI (so I can do the VDP and start having more fun ).

My primary problem right now is that I need a 60Hz VDP interrupt, and also to draw the primary display (the generated 256x192 screen image) at 60 frames per second (as in the original hardware).  There are some other I/O timing signals that need to be accurate as well.

I'm considering Agar because, from what I have read so far, it meets two of the design goals I'm not willing to give up:

1. Cross-platform.  I want the MAC and Unix group to enjoy the emulator as well, not limited to just the Windows bunch.
2. A GUI. 
I'm planning to add things to my emulator like a debugger, memory inspector, disassembler output, virtual file manager, and other such useful developer stuff. All that will require a hefty amount of GUI and dialogs, which is where Agar looks like it will "fit the bill" nicely.

Questions:

1. Should I consider a custom event loop to better control the VDP interrupt?  What about implementing it as a thread?  I'm going to update the emulated video at 60Hz regardless of whether or not the emulated CPU or other parts of the emulator are throttled to the original speed, or running full-out.  This should keep the display stable even if the system is running virtually over-clocked.  Ideally I'd be able to time the VDP display update and interrupt at exactly 16.6ms, but it seems that to get sub-millisecond timing requires OS specific code to the high-resolution timer.  Kind of baffles me that a mode rn 1GHz or faster computer has a hard time providing a reliable timer better than 1ms.  Never understood it.


2. What would be the best type of control (widget) for the virtual video display?  The 256x192 frame will have to be generated pixel-by-pixel, programmatically, using the code I'm writing that emulates the original VDP.  I would also like to allow the user to enlarge the virtual display, so once the 256x192 frame is created, I'll need a simple resize and blit to whatever surface is best suited for this type of updating.

Any insight would be greatly appreciated.

Thanks,
Matthew

_______________________________________________
Agar mailing list
Agar@...
http://libagar.org/lists.html
Ernesto Domato | 5 Jun 01:57

AG_BindGlobalKey doesn't work well on my Gnome session

I was trying the demos with agar and I discovered that for example the ESCAPE key is not working (exiting the application) as it should do on my Gnome session. Anyway, I know that this is not an Agar problem but something with my Gnome session configuration because running the demos on another session of Gnome (with a different user) it works as expected.

Can anyone point me out where to look to solve this problem? :-)

Thanks.
Ernesto

_______________________________________________
Agar mailing list
Agar@...
http://libagar.org/lists.html
Yacine Salmi | 31 May 18:29

Missing AG_InitVideoSDL function

Hello,

I can't seem to locate the AG_InitVideoSDL function specified in the docs
(http://libagar.org/mdoc.cgi?man=AG_Core.3#AG_InitVideoSDL) in any of the
headers of Agar 1.3.2. Am I missing something?
didier | 23 May 09:57

ftol

Hi

yes i added it per default but dont plan to use it so found it strange that 
there is a dis for linux wo opengl link but not on windows.

i have a compile error (when compiling hello tuto) as well with the vc2003 
compiler.
the AG_TableviewRowAdd macro is not supported due to var param ...

as well there is unresolved symbol with _ftol2() which doesnt seem to be 
implemented in none of my sdk  .... how did u compile those libs ? 

thanks
didier | 22 May 21:09

visual studio without opengl

very strange
i am trying to compile the agar hello sample,
but i dont have opengl, i looked in the package available and could not see 
a .zip without gl, without freetype and without thread ...

anyone know where i could find the .zip for windows with no gl ?

Gmane