Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

General issue / question regarding MacApp availability #64

Open
mathieutozer opened this issue Aug 28, 2023 · 4 comments
Open

General issue / question regarding MacApp availability #64

mathieutozer opened this issue Aug 28, 2023 · 4 comments

Comments

@mathieutozer
Copy link

I'm using MPWVersion ?= 3.4.2 and things have been working well, but I am now discovering that I could be getting my app up off the ground using the MacApp libraries, however they don't appear to be included in that version. I had thought that being the latest version available from the FTP server listed in the docs that it would contain the latest and greatest, but it appears (from the images I have unpacked) MacApp 3.1.1 is the latest version I have at my fingertips (inside E.T.O 15). My question is, is it going to work for me to drop the headers inside the ~/mpw folder and use the 3.4.2 tooling? Am I missing something? I'd really like to be able to use these Application Document and View classes.

@mathieutozer
Copy link
Author

Huh, it looks as though the MacApp library is provided as source and headers, so in theory I could just copy them all into my app, or build the object files myself or something.

@mathieutozer
Copy link
Author

Ok so I am trying to compile the Nothing.cp library using the object files, but I am getting these errors from the linker (?)

File "{MacApp}UFileBasedDocument.cp.o" is neither XCOFF nor PEF

Not really sure what that means or whether there is a different incantation to make it work, here's the full output

make clean; make all
rm -rf bin obj
mkdir -p obj bin
/usr/local/bin/mpw MrCpp Nothing.cpp -o obj/Nothing.ppc.o
/usr/local/bin/mpw  --trace-mpw PPCLink -warn -main __cplusstart obj/Nothing.ppc.o {SharedLibraries}InterfaceLib {SharedLibraries}StdCLib {SharedLibraries}MathLib {PPCLibraries}StdCRuntime.o {PPCLibraries}PPCCRuntime.o {PPCLibraries}MrCPlusLib.o {MacApp}MacAppTypes.cp.o {MacApp}UMacAppGlobals.cp.o {MacApp}UMacAppUtilities.cp.o {MacApp}UErrorMgr.cp.o {MacApp}UApplication.cp.o {MacApp}UView.cp.o {MacApp}UPrinting.cp.o {MacApp}UFileBasedDocument.cp.o -sym off -o bin/Notion.ppc; \
	Rez -rd NotionApp.r -o bin/Notion.ppc -i ~/mpw/Interfaces/RIncludes -append
f005 IOCtl(00f7b800, 00006601, 00000000)
     dup(00)
f005 IOCtl(00f7b814, 00006601, 00000000)
     dup(01)
f005 IOCtl(00f7b828, 00006601, 00000000)
     dup(02)
f005 IOCtl(00f7b828, 00006602, 00fffccc)
     interactive(02)
f004 Write(00f7b828)
     write(0002, 00f7b700, 00000002)
# f004 Write(00f7b828)
     write(0002, 00f7b700, 00000007)
Error: f004 Write(00f7b828)
     write(0002, 00f7b700, 0000003a)
 File "{MacApp}MacAppTypes.cp.o" is neither XCOFF nor PEF
f004 Write(00f7b828)
     write(0002, 00f7b700, 00000002)
# f004 Write(00f7b828)
     write(0002, 00f7b700, 00000007)
Error: f004 Write(00f7b828)
     write(0002, 00f7b700, 0000003d)
 File "{MacApp}UMacAppGlobals.cp.o" is neither XCOFF nor PEF
f004 Write(00f7b828)
     write(0002, 00f7b700, 00000002)
# f004 Write(00f7b828)
     write(0002, 00f7b700, 00000007)
Error: f004 Write(00f7b828)
     write(0002, 00f7b700, 0000003f)
 File "{MacApp}UMacAppUtilities.cp.o" is neither XCOFF nor PEF
f004 Write(00f7b828)
     write(0002, 00f7b700, 00000002)
# f004 Write(00f7b828)
     write(0002, 00f7b700, 00000007)
Error: f004 Write(00f7b828)
     write(0002, 00f7b700, 00000038)
 File "{MacApp}UErrorMgr.cp.o" is neither XCOFF nor PEF
f004 Write(00f7b828)
     write(0002, 00f7b700, 00000002)
# f004 Write(00f7b828)
     write(0002, 00f7b700, 00000007)
Error: f004 Write(00f7b828)
     write(0002, 00f7b700, 0000003b)
 File "{MacApp}UApplication.cp.o" is neither XCOFF nor PEF
f004 Write(00f7b828)
     write(0002, 00f7b700, 00000002)
# f004 Write(00f7b828)
     write(0002, 00f7b700, 00000007)
Error: f004 Write(00f7b828)
     write(0002, 00f7b700, 00000034)
 File "{MacApp}UView.cp.o" is neither XCOFF nor PEF
f004 Write(00f7b828)
     write(0002, 00f7b700, 00000002)
# f004 Write(00f7b828)
     write(0002, 00f7b700, 00000007)
Error: f004 Write(00f7b828)
     write(0002, 00f7b700, 00000038)
 File "{MacApp}UPrinting.cp.o" is neither XCOFF nor PEF
f004 Write(00f7b828)
     write(0002, 00f7b700, 00000002)
# f004 Write(00f7b828)
     write(0002, 00f7b700, 00000007)
Error: f004 Write(00f7b828)
     write(0002, 00f7b700, 00000041)
 File "{MacApp}UFileBasedDocument.cp.o" is neither XCOFF nor PEF
f004 Write(00f7b828)
     write(0002, 00f7b700, 00000002)
# f004 Write(00f7b828)
     write(0002, 00f7b700, 0000000d)
Fatal error: f004 Write(00f7b828)
     write(0002, 00f7b700, 00000001)

f004 Write(00f7b828)
     write(0002, 00f7b700, 00000020)
PPCLink - Execution terminated!
f002 Close(00f7b814)
f002 Close(00f7b828)
f002 Close(00f7b800)
ffff Quit()

@ksherlock
Copy link
Owner

Are you sure those MacApp object files are PPC? You can check with the filetype/creator type or by trying to run DumpXCoff (only works on PPC object files) and DumpOBJ (only works on 68k object files) on them.

$ mpw Files -l  MacAppTypes.*
Name                             Type Crtr  Size      Last-Mod-Date       Creation-Date  
-------------------------------  ---- ---- ------ ------------------- -------------------
MacAppTypes.cp                   TEXT MPS      2K  7/25/1994  1:00 PM  7/25/1994  1:00 PM
MacAppTypes.68k.o                OBJ  MPS      1K   9/2/2023  3:08 PM   9/2/2023  3:07 PM
MacAppTypes.ppc.o                XCOF MPS      2K   9/2/2023 12:46 PM   9/2/2023 12:46 PM

@mathieutozer
Copy link
Author

Yeah it appears I don't have those object files and am unable to compile them myself sadly. What would these MacAppTypes.cp.o be thought? I saw there were sources that referred to 'C Plus' as the language so maybe they are for that. If anyone out there has MacApp object files and would like to share them that would give me a head start! Although I have been having some (slow) success just cobbling things together with sample code + the standard libraries.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants