Waiting for the wind

programming memo in different platforms

「eee pc’s road」分類文章彙整

development for Eee PC

Get Process

發文作者 cotton5415 於 六月 24, 2008

Reference:
Technical Q&A QA1123: Getting List of All Processes on Mac OS X

發表於 Debian's Road, eee pc's road, Fedora Core 6's Road, MAC OS X's Road | 已加上的標籤: , | 張貼留言 »

redirect stdout to a file

發文作者 cotton5415 於 五月 31, 2008

FILE * fp = fopen(“myfile.txt","w+a") ;
int fd= -1;
if ( fp != NULL ) dup2(fd,1) ; // 1 for stdout
if ( fd < 0 ) return false ; // fail
else return true ; // success
close(fd);
fclose(fp);

發表於 Debian's Road, eee pc's road, Embedded system's Road, MAC OS X's Road, network programming | 張貼留言 »

to add a launch icon in EeePC

發文作者 cotton5415 於 五月 21, 2008

reference:

http://www.weekl.net/blog/?p=12

remember to run /opt/xandros/bin/AsusLauncher
but after you reboot, the new setting doesn’t work.
strange!!

發表於 eee pc's road | 張貼留言 »

GTK+ z-order problem

發文作者 cotton5415 於 四月 9, 2008

GTK+ has no the concept of Z-order with widgets, and is not able to track whether a Window is being obscured. But GTK+ can send expose events to widgets that may not currently be visible.

發表於 Debian's Road, eee pc's road, Fedora Core 6's Road | 張貼留言 »

x11 helper functions — blit frames to the screen

發文作者 cotton5415 於 四月 2, 2008

include opengl video

http://www.cs.fsu.edu/~baker/devices/lxr/http/source/xawtv-3.95/x11/blit.c

發表於 Debian's Road, eee pc's road, Fedora Core 6's Road | 張貼留言 »

blit banchmark on each platform

發文作者 cotton5415 於 四月 2, 2008

ref:

http://www.rocklyte.com/news_20030917.html

發表於 Debian's Road, eee pc's road, Embedded system's Road, Evolutionary Music, Fedora Core 6's Road, MAC OS X's Road, Win32's Road | 張貼留言 »

GTK+ important links references

發文作者 cotton5415 於 三月 28, 2008

http://www.gtk.org/documentation.html

發表於 Debian's Road, eee pc's road, Fedora Core 6's Road | 張貼留言 »

2d graphic library for Linux GraphicsMagick

發文作者 cotton5415 於 三月 27, 2008

it’s a branch of imageMagick 5.xxxx
reference:

http://www.graphicsmagick.org/www/api.html

發表於 Debian's Road, eee pc's road, Fedora Core 6's Road, MAC OS X's Road, web programming, Win32's Road | 張貼留言 »

make file link with dynamic and static libraries

發文作者 cotton5415 於 三月 21, 2008

  • to build static library
  • % gcc -c libtest.c -o libtest.o
    % ar rcs libtest.a libtest.o

  • to build dynamic library
  • -fPIC option tells gcc to create position independant code which is necessary for shared libraries

    % gcc -c -fPIC libtest.c -o libtest.o
    % gcc -shared -o libtest.so libtest.o

  • to use static library
  • % gcc -static main.c -L. -ltest -o testStatic

  • to use dynamic library
  • % gcc main.c -L. -ltest -o testDynamic

the source file of application who uses the library ltest, sould be located before -l options
-L<path to search libraries> (no spacing after -L)
-o <output file>
-l<lib_name> (no spacing after -l)

  • in static link, library name is lib.a ex: libtest.a libcheckitout.a or libxxxx.a
  • in dynamic link, library start with lib ex: libtest or libtest.so or lib….
  • gcc [options] -o

    發表於 Debian's Road, eee pc's road, Embedded system's Road, Fedora Core 6's Road, MAC OS X's Road | 張貼留言 »

    to build-up EEE PC’s development environment

    發文作者 cotton5415 於 三月 19, 2008

    1. install debian 4.r3 (2.6.18-6-686) and gtk+2.0 for developing GUI on EEE PC.
    2. write down a helloptg as the sample in GTK
    3. #include <gtk/gtk.h>

      int main(int argc, char**argv)
      {
      GtkWidget *window;
      gtk_init(&argc, &argv);
      window=gtk_window_new(GTK_WINDOW_TOPLEVEL);
      gtk_widget_show(window);
      gtk_main();
      return 0;
      }

    4. compiled by :
    5. % gcc -o hellogtk hellogtk.c `pkg-config –cflags –libs gtk+-2.0`

    6. copy it to EEE PC.
      change mode to 755
      and run it in console.
      It works.

    發表於 Debian's Road, eee pc's road | 張貼留言 »

     
    Follow

    Get every new post delivered to your Inbox.