On Fri, 19 Jun 2015 16:01:09 +0200, José Mejuto <[email protected]> wrote:
>El 19/06/2015 a las 9:50, Bo Berglund escribió: > >> Now I am getting to the real hurdle as follows: >> >> DongleTest.lpr(20,1) Error: Illegal COFF Magic while reading >> SPROMEPS.OBJ >> > >Hello, > >Try this tool: http://www.agner.org/optimize/#objconv > >-- Thanks, I tried the converter but when I entered the command according to the manual I got an error: D:\Internet\Download\FreePascal_Lazarus>objconv -fCOFF SPROMEPS.obj SPROMEPS.coff Error 2004: Unknown command line option: fCOFF Then I tried to use a lowercase version (so NOT according to the manual) and it worked! D:\Internet\Download\FreePascal_Lazarus>objconv -fcoff SPROMEPS.obj SPROMEPS.coff Input file: SPROMEPS.obj, output file: SPROMEPS.coff Converting from OMF32 to COFF32 Warning 1211: 270 comment records ignored 0 Debug sections removed 0 Exception sections removed So now, I changed the line in SPROMEPS.pas from: {$L SPROMEPS.OBJ} { LINK WITH THE SUPERPRO OBJECT FILE } to {$L SPROMEPS.coff} { LINK WITH THE SUPERPRO OBJECT FILE } and the original error disappeared! Instead I now have a series of undefined identifiers to deal with: Compile Project, Target: DongleTest.exe: Exit code 1, Errors: 23, Hints: 2 Spromeps.pas(13,2) Note: Ignored compiler switch "$F" Spromeps.pas(129,4) Hint: Unit "windows" not used in SproMeps DongleTest.lpr(20,1) Error: Undefined symbol: SPROMEPS_RNBOSPROFORMATPACKET$RB_SPRO_APIPACKET_PTR$WORD$$WORD DongleTest.lpr(20,1) Error: Undefined symbol: SPROMEPS_RNBOSPROINITIALIZE$RB_SPRO_APIPACKET_PTR$$WORD DongleTest.lpr(20,1) Error: Undefined symbol: SPROMEPS_RNBOSPROGETFULLSTATUS$RB_SPRO_APIPACKET_PTR$$WORD DongleTest.lpr(20,1) Error: Undefined symbol: SPROMEPS_RNBOSPROGETVERSION$RB_SPRO_APIPACKET_PTR$POINTER$POINTER$POINTER$POINTER$$WORD DongleTest.lpr(20,1) Error: Undefined symbol: SPROMEPS_RNBOSPROFINDFIRSTUNIT$RB_SPRO_APIPACKET_PTR$WORD$$WORD DongleTest.lpr(20,1) Error: Undefined symbol: SPROMEPS_RNBOSPROFINDNEXTUNIT$RB_SPRO_APIPACKET_PTR$$WORD DongleTest.lpr(20,1) Error: Undefined symbol: SPROMEPS_RNBOSPROREAD$RB_SPRO_APIPACKET_PTR$WORD$POINTER$$WORD DongleTest.lpr(20,1) Error: Undefined symbol: SPROMEPS_RNBOSPROEXTENDEDREAD$RB_SPRO_APIPACKET_PTR$WORD$POINTER$POINTER$$WORD DongleTest.lpr(20,1) Error: Undefined symbol: SPROMEPS_RNBOSPROWRITE$RB_SPRO_APIPACKET_PTR$WORD$WORD$WORD$BYTE$$WORD DongleTest.lpr(20,1) Error: Undefined symbol: SPROMEPS_RNBOSPROOVERWRITE$RB_SPRO_APIPACKET_PTR$WORD$WORD$WORD$WORD$WORD$BYTE$$WORD DongleTest.lpr(20,1) Error: Undefined symbol: SPROMEPS_RNBOSPRODECREMENT$RB_SPRO_APIPACKET_PTR$WORD$WORD$$WORD DongleTest.lpr(20,1) Error: Undefined symbol: SPROMEPS_RNBOSPROACTIVATE$RB_SPRO_APIPACKET_PTR$WORD$WORD$WORD$WORD$$WORD DongleTest.lpr(20,1) Error: Undefined symbol: SPROMEPS_RNBOSPROQUERY$RB_SPRO_APIPACKET_PTR$WORD$POINTER$POINTER$POINTER$WORD$$WORD DongleTest.lpr(20,1) Error: Undefined symbol: GetVersion DongleTest.lpr(20,1) Error: Undefined symbol: GetLastError DongleTest.lpr(20,1) Error: Undefined symbol: WriteFile DongleTest.lpr(20,1) Error: Undefined symbol: ReadFile DongleTest.lpr(20,1) Error: Undefined symbol: DeviceIoControl DongleTest.lpr(20,1) Error: Undefined symbol: CloseHandle DongleTest.lpr(20,1) Error: Undefined symbol: GetTickCount DongleTest.lpr(20,1) Error: Undefined symbol: GetPrivateProfileIntA DongleTest.lpr(20,1) Error: Undefined symbol: GetPrivateProfileStringA DongleTest.lpr(20,1) Error: Undefined symbol: CreateFileA PROGRESS! The warning about the $F switch concerns a setting to force far calls, what is the equivalent in FPC? And I am not sure that COFF is the correct file type to link against... Have to look back on all the posts here and find what is recommended. But now is dinner time and I will quit for a while. Thanks to all who provided support to me! -- Bo Berglund Developer in Sweden -- _______________________________________________ Lazarus mailing list [email protected] http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
