mirror of https://github.com/BOINC/boinc.git
*** empty log message ***
svn path=/trunk/boinc_samples/; revision=9878
This commit is contained in:
parent
c02ae8269c
commit
c1c89facff
|
@ -27,3 +27,11 @@ David 12 Apr 2006
|
|||
upper_case.C
|
||||
win_build/
|
||||
upper_case.vcproj
|
||||
|
||||
David 13 Apr 2006
|
||||
- got graphics to work under Linux; added a Makefile
|
||||
|
||||
uppercase/
|
||||
Makefile (new)
|
||||
README (new)
|
||||
upper_case.C
|
||||
|
|
|
@ -0,0 +1,41 @@
|
|||
# This should work on Linux. Modify as needed for other platforms.
|
||||
|
||||
# Do this first:
|
||||
# ln -s `g++ -print-file-name=libstdc++.a`
|
||||
# This creates a symbolic link to the C++ library,
|
||||
# which is linked statically
|
||||
|
||||
CXXFLAGS = -g \
|
||||
-I ../../boinc \
|
||||
-I ../../boinc/lib \
|
||||
-I ../../boinc/api \
|
||||
-L ../../boinc/api \
|
||||
-L ../../boinc/lib \
|
||||
-L /usr/X11R6/lib \
|
||||
-L.
|
||||
|
||||
LIBGLUT = /usr/local/lib/libglut.a
|
||||
LIBGLU = /usr/X11R6/lib/libGLU.a
|
||||
LIBJPEG = /usr/lib/libjpeg.a
|
||||
|
||||
PROGS = upper_case upper_case.so
|
||||
|
||||
all: $(PROGS)
|
||||
|
||||
clean:
|
||||
rm $(PROGS)
|
||||
|
||||
# the -Wl,--export-dynamic causes the main program's symbols
|
||||
# to be exported to the graphics library
|
||||
|
||||
upper_case: upper_case.o
|
||||
g++ $(CXXFLAGS) -Wl,--export-dynamic -o upper_case upper_case.o libstdc++.a -pthread -lboinc_api -lboinc -lboinc_graphics_lib -ldl
|
||||
|
||||
upper_case.so: uc_graphics.o
|
||||
g++ $(CXXFLAGS) -o upper_case.so \
|
||||
-shared -fPIC -pthread \
|
||||
uc_graphics.o \
|
||||
libstdc++.a \
|
||||
-lboinc_graphics_impl -lboinc \
|
||||
$(LIBGLUT) $(LIBGLU) $(LIBJPEG) \
|
||||
-lGL -lX11 -lXmu -lm \
|
|
@ -0,0 +1,5 @@
|
|||
The graphics should show a bouncing ball.
|
||||
|
||||
If you want a logo, put a file "logo.jpg" in this directory.
|
||||
|
||||
If you want text, copy Helvetica.txf to this directory.
|
|
@ -45,6 +45,7 @@
|
|||
|
||||
#ifdef BOINC_APP_GRAPHICS
|
||||
#include "graphics_api.h"
|
||||
#include "graphics_lib.h"
|
||||
#endif
|
||||
|
||||
#include "diagnostics.h"
|
||||
|
@ -227,7 +228,13 @@ int main(int argc, char **argv) {
|
|||
fprintf(stderr, "APP: upper_case: starting, argc %d\n", argc);
|
||||
|
||||
#ifdef BOINC_APP_GRAPHICS
|
||||
#if defined(_WIN32) || defined(__APPLE__)
|
||||
retval = boinc_init_graphics(worker);
|
||||
#else
|
||||
setbuf(stderr, 0);
|
||||
fprintf(stderr, "About to call graphics init\n");
|
||||
retval = boinc_init_graphics_lib(worker, argv[0]);
|
||||
#endif
|
||||
if (retval) exit(retval);
|
||||
#else
|
||||
retval = boinc_init();
|
||||
|
|
Loading…
Reference in New Issue