Changeset 133
- Timestamp:
- Dec 3, 2006, 9:37:54 AM (19 years ago)
- Location:
- trunk/emx-wrapper
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/emx-wrapper/makefile.emx
r98 r133 10 10 GCCLDFLAGS = -Zmt 11 11 12 OBJDIR = .12 OBJDIR = ./../../../o 13 13 CDIR = . 14 15 GCLIB = -l$(OBJDIR)/gc 14 16 15 17 OBJECTS = voyager-desktop.o … … 19 21 20 22 voyager-desktop.exe: voyager-desktop.c 21 $(CC) -o $@ voyager-desktop.c $(LIBS) $(GC CFLAGS)23 $(CC) -o $@ voyager-desktop.c $(LIBS) $(GCLIB) $(GCCFLAGS) 22 24 23 25 -
trunk/emx-wrapper/voyager-desktop.c
r98 r133 48 48 HMODULE hModule; 49 49 HMODULE hModuleGTK; 50 HMODULE hModuleGC; 50 51 PFN proc; 51 52 53 /* 54 Initialize the garbage collector. 55 */ 56 if((rc=DosLoadModule(uchrError, sizeof(uchrError),"vdesktop.dll", &hModuleGC))!=NO_ERROR) 57 { 58 printf("DosLoadmodule for vdesktop.dll failed with rc=0x%x because of module %s.\n", (int)rc, uchrError); 59 return 1; 60 }; 61 fprintf(stderr, "DLL handle for Vdesktop.dll is: 0x%x\n", (int)hModuleGC); 62 if((rc = DosQueryProcAddr(hModuleGC, /* Handle to module */ 63 0L, /* No ProcName specified */ 64 "initGarbageCollection", /* ProcName (not specified) */ 65 &proc))!=NO_ERROR) /* Address returned 0 */ 66 { 67 fprintf(stderr, "DosQueryProcAddr for initGarbageCollection() failed with rc=0x%x\n",(int) rc); 68 return 1; 69 } 70 fprintf(stderr, " Proc address for initGarbageCollection() is: 0x%x\n", (int)proc); 71 proc(); 72 73 /* 74 Init GTK 75 */ 52 76 if((rc=DosLoadModule(uchrError, sizeof(uchrError),"gtk2.dll", &hModuleGTK))!=NO_ERROR) 53 77 { … … 56 80 }; 57 81 fprintf(stderr, "DLL handle for gtk2.dll is: 0x%x\n", (int) hModuleGTK); 58 if((rc = DosQueryProcAddr(hModuleGTK, /* Handle to module */59 0L,/* No ProcName specified */60 "gtk_init" ,/* ProcName (not specified) */61 &proc))!=NO_ERROR) /* Address returned 82 if((rc = DosQueryProcAddr(hModuleGTK, /* Handle to module */ 83 0L, /* No ProcName specified */ 84 "gtk_init", /* ProcName (not specified) */ 85 &proc))!=NO_ERROR) /* Address returned 0 */ 62 86 { 63 87 fprintf(stderr, "DosQueryProcAddr for gtk_init() failed with rc=0x%x\n",(int) rc); 64 DosFreeModule(hModule );88 DosFreeModule(hModuleGC); 65 89 return 1; 66 90 } … … 78 102 }; 79 103 fprintf(stderr, "DLL handle for Vdesktop.dll is: 0x%x\n", (int)hModule); 80 if((rc = DosQueryProcAddr(hModule, /* Handle to module */81 0L,/* No ProcName specified */82 "main_loop" ,/* ProcName (not specified) */83 &proc))!=NO_ERROR) 104 if((rc = DosQueryProcAddr(hModule, /* Handle to module */ 105 0L, /* No ProcName specified */ 106 "main_loop" , /* ProcName (not specified) */ 107 &proc))!=NO_ERROR) /* Address returned 0 */ 84 108 { 85 109 fprintf(stderr, "DosQueryProcAddr for main_loop() failed with rc=0x%x\n",(int) rc); 86 DosFreeModule(hModule); 110 DosFreeModule(hModuleGTK); 111 DosFreeModule(hModuleGC); 87 112 return 1; 88 113 } … … 97 122 DosFreeModule(hModuleGTK); 98 123 124 DosFreeModule(hModuleGC); 125 99 126 return 0; 100 127 }
Note:
See TracChangeset
for help on using the changeset viewer.