Apache OpenOffice (AOO) Bugzilla – Issue 64628
"Could not find 16-bit type, add support for your architecture"
Last modified: 2006-06-09 12:36:09 UTC
"Could not find 16-bit type, add support for your architecture" This error appears in the OpenOffice.org_2.0_SDK\include\sal\types.h(77) when I am trying to compile Quantlib.org QuantlibAddins for OO Calc. I understand from OO forums http://www.oooforum.org/forum/viewtopic.phtml?p=138694 and http://www.oooforum.org/forum/viewtopic.phtml?t=23772 this has been seen before but only in OO version 2.0.2 Is this a bug or is it a problems with MSVC (7.1 is my version)? thankyou joe my makefile is # QuantLibAddin\Addins\Calc\Makefile.msdev.debug COMPONENT_NAME=QuantLibAddin !IF "$(CLVER)" == "" DLL_NAME=$(COMPONENT_NAME)-vc6-mt-gd-0_3_12 !ELSE DLL_NAME=$(COMPONENT_NAME)-vc$(CLVER)-mt-gd-0_3_12 !ENDIF #added by joe byers to overide above DLL_NAME=$(COMPONENT_NAME)-vc71-mt-gd-0_3_12 DLL_DIR=dll IDL_DIR=$(OFFICE_SDK_PATH)\idl !IF "$(BOOST_DIR)" == "" BOOST_DIR="C:\boost_1_31_0" !ENDIF DKREGISTRYNAME="$(OFFICE_PROGRAM_PATH)\types.rdb" #changed MCVSDIR to MSVC_DIR by joe byers !IF "$(MSVC_DIR)" == "" MSVC_DIR=C:\Program Files\Microsoft Visual Studio\VC98 !ELSE MSVC_DIR=$(MSVC_DIR) !ENDIF !IF "$(CLVER)" == "" INT_DIR=build\vc6\DebugMTDLL !ELSE INT_DIR=build\vc$(CLVER)\DebugMTDLL !ENDIF #added by joe byers to overide above INT_DIR=build\vc71\DebugMTDLL FLAG1=$(INT_DIR)\$(COMPONENT_NAME).flag1 FLAG2=$(INT_DIR)\$(COMPONENT_NAME).flag2 FLAG3=$(INT_DIR)\$(COMPONENT_NAME).flag3 FLAG4=$(INT_DIR)\$(COMPONENT_NAME).flag4 FLAG5=$(INT_DIR)\$(COMPONENT_NAME).flag5 FLAG6=$(INT_DIR)\$(COMPONENT_NAME).flag6 URD_FILE=$(COMPONENT_NAME).urd RDB_FILE=$(DLL_NAME).rdb DLL_FILE=$(DLL_NAME).dll CC="$(MSVC_DIR)\BIN\CL" # modified by joe byers to default VC71 env var CC="$(MSVC_DIR)\CL" # /nolog enough said /MDd multithread debug /w3 warning level /Gm minimu rebuild, #/GR enable runtime type info /zi edit and continue /od disabled optimization #/GZ __stdcall same as RTC1 #/GX exception handling default on CC_FLAGS=/nologo /MDd /W3 /Gm /GR /GX /Zi /Od /GZ CC_INCLUDES=-I. -I..\.. -I"$(QL_DIR)" -I"$(OBJECT_HANDLER_DIR)" \ -I"$(OFFICE_SDK_PATH)\include" -I"$(BOOST_DIR)" # preprocessor defines some inherited CC_DEFINES=/DWIN32 /D_DEBUG /D_WINDOWS /D_MBCS /D_USRDLL # modified CC_defines from fatal error c1189 CC_DEFINES=/D_WIN32 /D_DEBUG /D_WINDOWS /D_MBCS /D_USRDLL /D_WNT /D_WINNT /D_CPPU_ENV=msci #-DWIN32 -DWNT -DCPPU_ENV=msci #/YX autogenerate precompiler /fp precompiler header file #/fo object file name /fd program database file name #/c suppress comment strip CC_FLAGS2=/Fp"$(INT_DIR)\$(COMPONENT_NAME).pch" /YX /Fo"$(INT_DIR)\\" /Fd"$(INT_DIR)\\" /FD /c CPP_PROJ=$(CC_FLAGS) $(CC_INCLUDES) $(CC_DEFINES) $(CC_FLAGS2) OBJECTS= \ "$(INT_DIR)\basic.obj" \ "$(INT_DIR)\calcutils.obj" \ "$(INT_DIR)\capfloor.obj" \ "$(INT_DIR)\couponvectors.obj" \ "$(INT_DIR)\funcdef.obj" \ "$(INT_DIR)\instruments.obj" \ "$(INT_DIR)\interpolation.obj" \ "$(INT_DIR)\ohfunctions.obj" \ "$(INT_DIR)\options.obj" \ "$(INT_DIR)\processes.obj" \ "$(INT_DIR)\qladdin.obj" \ "$(INT_DIR)\schedule.obj" \ "$(INT_DIR)\session.obj" \ "$(INT_DIR)\shortratemodels.obj" \ "$(INT_DIR)\simpleswap.obj" \ "$(INT_DIR)\swap.obj" \ "$(INT_DIR)\termstructures.obj" \ "$(INT_DIR)\utilities.obj" \ "$(INT_DIR)\volatilities.obj" \ "$(INT_DIR)\xibor.obj" LINK="$(MSVC_DIR)\BIN\LINK" /nologo LFLAGS=msvcrtd.lib msvcprtd.lib kernel32.lib wsock32.lib \ oldnames.lib netapi32.lib advapi32.lib gdi32.lib comdlg32.lib \ comctl32.lib user32.lib winspool.lib shell32.lib ole32.lib \ oleaut32.lib uuid.lib odbc32.lib odbccp32.lib \ icppu.lib icppuhelper.lib isal.lib log4cxxs-vc6-mt-gd.lib \ /nologo /dll /pdb:$(INT_DIR)\$(COMPONENT_NAME).pdb /debug /machine:I386 \ /def:.\$(COMPONENT_NAME).def /out:$(DLL_FILE) \ /pdbtype:sept /libpath:. /libpath:..\..\lib /libpath:"$(OFFICE_SDK_PATH)\windows\lib" \ /libpath:"$(QL_DIR)\lib" /libpath:"$(OBJECT_HANDLER_DIR)\lib" \ /libpath:"$(LOG4CXX_DIR)\msvc\Lib" !IF "$(OS)" == "Windows_NT" NULL= !ELSE NULL=nul !ENDIF TYPES = -Tcom.sun.star.sheet.XAddIn \ -Tcom.sun.star.lang.XServiceName \ -Tcom.sun.star.lang.XServiceInfo \ -Tcom.sun.star.uno.XWeak \ -Tcom.sun.star.lang.XSingleServiceFactory \ -Tcom.sun.star.lang.XMultiServiceFactory \ -Tcom.sun.star.uno.XAggregation \ -Tcom.sun.star.lang.XTypeProvider \ -Tcom.sun.star.uno.XComponentContext \ -Tcom.sun.star.lang.XSingleComponentFactory \ -Tcom.sun.star.registry.XRegistryKey # \ #-Tcom.sun.star.sheet.addin.XQL ALL : $(FLAG6) # this copy gets around problems with spaces in pathnames $(URD_FILE) : $(COMPONENT_NAME).idl copy $(COMPONENT_NAME).idl $(TEMP) idlc -I$(IDL_DIR) "$(TEMP)\$(COMPONENT_NAME).idl" "$(INT_DIR)" : if not exist "$(INT_DIR)/$(NULL)" mkdir "$(INT_DIR)" "$(DLL_DIR)" : if not exist "$(DLL_DIR)/$(NULL)" mkdir "$(DLL_DIR)" $(FLAG1) : $(URD_FILE) $(INT_DIR) regmerge $(RDB_FILE) /UCR $(URD_FILE) echo flagged > $@ $(FLAG2) : $(FLAG1) cppumaker -BUCR $(TYPES) $(DKREGISTRYNAME) $(RDB_FILE) echo flagged > $@ $(OBJECTS) : $(FLAG2) .cpp{$(INT_DIR)}.obj: $(CC) $(CPP_PROJ) $< $(FLAG3) : $(FLAG1) $(OBJECTS) $(LINK) $(LFLAGS) $(OBJECTS) echo flagged > $@ $(FLAG4) : $(FLAG3) regcomp -register -r $(RDB_FILE) -c $(DLL_FILE) echo flagged > $@ $(FLAG5) : $(FLAG4) $(DLL_DIR) move $(DLL_NAME).* $(DLL_DIR) echo flagged > $@ $(FLAG6) : $(FLAG5) copy $(DLL_DIR)\$(RDB_FILE) "$(OFFICE_PROGRAM_PATH)" copy $(DLL_DIR)\$(DLL_FILE) "$(OFFICE_PROGRAM_PATH)" echo flagged > $@ CLEAN : -@ if EXIST com rmdir /q /s com -@ if EXIST "$(INT_DIR)\*" del /f /q "$(INT_DIR)\*" -@ if EXIST "$(DLL_DIR)\*" del /f /q "$(DLL_DIR)\*" -@ if EXIST $(URD_FILE) del /f /q $(URD_FILE)
I've never done OOo stuff on Windows, but this looks evil CC_DEFINES=/DWIN32 /D_DEBUG /D_WINDOWS /D_MBCS /D_USRDLL # modified CC_defines from fatal error c1189 CC_DEFINES=/D_WIN32 /D_DEBUG /D_WINDOWS /D_MBCS /D_USRDLL /D_WNT /D_WINNT /D_CPPU_ENV=msci #-DWIN32 -DWNT -DCPPU_ENV=msci For your particular error, the lack of /DWNT seems to be the cause of the problem.
I am working off the QuantlibAddins Makefile that was developed for VC6. You are correct, the DWNT was required because that is what OO uses in their included scripts instead of WIN32 WINDOWS or WINNT. If one reviews the types.h file there is a FIXME for windows around the WNT and UNX defines. I wish I knew more about this stuff. Thank you
KR->JWBOSU: If I understand correctly, this error occurs when compiling a third party component (quantlib.org). Adding some defines (/D_WNT /D_WINNT /D_CPPU_ENV=msci) to the makefile solves problem, right?
kr, That is correct, adding the correct compiler flags in VC7.1 corrected the problem when compiling this third party addin. The compiler flags are being incorporated into the new version of QuantLibAddinCalc (the OO addin) version 3.13. This can be found at quantlib.org. But, version 3.13 is still in development and not available to everyone. Joe
Joe, I am going to close this, as this is clearly out of our scope.
KR, Thank you for you help. The comment to add DWNT was a great help. I do understand that this is a little on the edge of OO scope, but it did apply. Especially since there is very little documentation on the compiler flags required for UNO and OO addins. At least that I could find. I would like you to change the resolution from invalid to something related to UNO/OO compiler flags. Again, thank you very much Joe
Joe, could you write a new issue and assign it to Heiner (HR) or Ause (HJL)? The title probably should be something like "Documentation of Platform Defines (WNT, UNX, ...) Missing" Please add me to the CC: list. Thanks Kay
.