From wxwin-users-request@aiai.ed.ac.uk Tue Aug 8 10:30:56 1995 From: Erwin Giling Organization: TNO-TPD Delft, The Netherlands To: wxwin-users@aiai.ed.ac.uk Date: Tue, 8 Aug 1995 11:03:11 +1 Subject: Compiled 1.63 on DEC-ALPHA/OSF1/motif/cxx Reply-To: giling@tpd.tno.nl Hi all, I've spend some time compiling the wxWindows 1.63 release on a DEC-ALPHA platform, and thought this might be interesting to some of you. I used the cxx compiler version 1.1.11.9 with OSF/1 and motif. Note that in the make.env file I had to add "COMPLIBS=-lc" for the loader to find all symbols. And of course you have to set the right paths to the X environment and the such. The 'hello', 'animate' and 'forms' demo's worked allright as far as I have tested. The following is a log file containing the warnings/errors I encountered plus the changes I've made. Note that some solutions are ad-hoc; I did not really examine the code very well. Furthermore, I did not actually TEST all the modifications. Some code might break at run-time!! Note that the line numbers may not be exact because of some modifications. Oh, and I still cannot find the 'mktemp' object. See below. Here's the log file: ------------------ ./src/base: ------------------ wb_cmdlg.cc:362: error: In this statement, "colourData.GetCustomColour(i)" is not an lvalue, but occurs in a context that requires one. * Solution: code commented out according to (eeeks..) #ifdef __DECCXX cerr << "__FILE__ near line __LINE__ : removed some statements\n"; #else for (i = 0; i < 16; i++) customColours[i] = (wxColour&)colourData.GetCustomColour(i); #endif wx_frac.cc:70: error: In this declaration, "gcvt" is declared with both internal and external linkage. * Solution: removed "inline" directive (better put 'inline' in .h file instead!): #ifdef __DECCXX char* gcvt(double val, int dig, char* buf){ cerr << "__FILE__ near line __LINE__ : code changed\n"; #else inline char* gcvt(double val, int dig, char* buf){ #endif ------------------ ./utils/prologio/src ------------------ read.cc:1315: warning: In this statement, the pointer value "object" is converted to a signed int type that is smaller than a pointer. read.cc:1416: warning: In the initializer for object_int, the pointer value "(type_node->Data())" is converted to a signed int type that is smaller than a pointer * Solution: Replace 'int' by 'size_t'. Note: size_t is defined on ALPHA-OSF/1 as 'unsigned long'. ------------------ ./contrib/wxstring: ------------------ wxstrgnu.cc:1341: error: In the initializer for p, "wxString::Search" is not accessible. wxstrgnu.cc:1344: error: In this statement, "wxString::rep" is not accessible. * Solution: change line around 1330 from #ifndef VMS to #if !defined(VMS) && !defined(__DECCXX) wxregex.cc:68: error: In this statement, "free" is not declared. wxregex.cc:69: error: In this statement, "free" is not declared. wxregex.cc:81: error: In this statement, "malloc" is not declared. wxregex.cc:88: error: In this statement, "malloc" is not declared. * Solution: change line #include to #ifdef __DECCXX #include #else #include #endif wxregex.cc:2292: error: In this statement, "alloca(2*len*sizeof(unsigned char ...))" supplies 1 argument, but 0 are expected. wxregex.cc:2424: error: In this statement, "alloca(2*len*sizeof(unsigned char ...))" supplies 1 argument, but 0 are expected. * Solution: replace (around line 205) line #ifdef sparc with #if defined(sparc) || defined(__DECCXX) and uncomment the line // extern "C" void *__builtin_alloca(...); wxregex.cc:2486: warning: In this statement, the pointer value "*--stackp" is converted to a signed int type that is smaller than a pointer. wxregex.cc:2692: warning: In this statement, the pointer value "*--stackp" is converted to a signed int type that is smaller than a pointer. * Solution: replace macro #define POP_FAILURE_POINT() \ { \ int temp; \ stackp -= 2; /* Remove failure points. */ \ temp = (int) *--stackp; /* How many regs pushed. */ \ temp *= NUM_REG_ITEMS; /* How much to take off the stack. */ \ stackp -= temp; /* Remove the register info. */ \ } by #define POP_FAILURE_POINT() \ { \ size_t temp; \ stackp -= 2; /* Remove failure points. */ \ temp = (size_t) *--stackp; /* How many regs pushed. */ \ temp *= NUM_REG_ITEMS; /* How much to take off the stack. */ \ stackp -= temp; /* Remove the register info. */ \ } wxregex.cc:2701: warning: In this statement, the pointer value "*--stackp" is converted to a signed int type that is smaller than a pointer. * Solution: Uhmm, I do not grasp the code yet, so I left this one in. A long int pointer is converted to int and then to short ???? Well, don't need this code anyway.. ------------------ ./utils/image/src ------------------ wx_24to8.cc:898: error: In this statement, the referenced type of the pointer value "&colors[low]" is "unsigned long", which is not compatible with "const char". * Solution: replace line 898: bcopy(&colors[low], &colors[low+1], (nc - low) * sizeof(unsigned long)); with bcopy((char*) &colors[low], (char*)&colors[low+1], (nc - low) * sizeof(unsigned long)); wx_image.cc:408: error: In this statement, "mktemp" is not declared. wx_image.cc:422: error: In this statement, "mktemp" is not declared. * Solution: strange error. Maybe my compiler is faulty. I can't find the declaration in the system header files, so I added just before the call in line 408: #ifdef __DECCXX char* mktemp(char*); #endif but then the 'mktemp' symbol is unresolved at link time. The compiler produces an executable that runs fine though (after chmod +x). Anybody? ------------------ ./src/x ------------------ wx_canvs.cc:1673: warning: "xrect" on wx_canvs.cc:1624: is uninitialized at this default label. * Solution: ignored wx_gdi.cc:1321: warning: In this statement, the pointer value "image" is converted to an unsigned int type that is smaller than a pointer. wx_gdi.cc:1347: warning: In this statement, the pointer value "insensImage" is converted to an unsigned int type that is smaller than a pointer. wx_gdi.cc:1799: warning: In this statement, the pointer value "image" is converted to an unsigned int type that is smaller than a pointer. wx_gdi.cc:1826: warning: In this statement, the pointer value "image" is converted to an unsigned int type that is smaller than a pointer. wx_gdi.cc:1855: warning: In this statement, the pointer value "insensImage" is converted to an unsigned int type that is smaller than a pointer. * Solution: In all lines replace (unsigned int) with (size_t) wx_dialg.cc:1053: warning: In this statement, the pointer value "wxModalShowingStack.First()->Data()" is converted to a signed int type that is smaller than a pointer. * Solution: In this line, a pointer is converted to (Bool). Ignored. That's all folks! Erwin Giling giling@tpd.tno.nl