Path: utzoo!mnetor!uunet!lll-winken!lll-lcc!ames!ll-xn!mit-eddie!uw-beaver!cornell!rochester!PT.CS.CMU.EDU!andrew.cmu.edu!rs4u+ From: rs4u+@andrew.cmu.edu (Richard Siegel) Newsgroups: comp.sys.mac Subject: Re: 4th Dimension Code Resources Message-ID: <8W284Ly00WABcB80uq@andrew.cmu.edu> Date: 4 Feb 88 14:17:59 GMT Organization: Carnegie Mellon University Lines: 25 A very possible cause is that the main() routine is not defined as "pascal". If you're writing code resources, such as HyperCard XCMDs, window or menu definitions, or 4th Dimension externals, the host program expects the code resource main routine to use Pascal calling conventions.. I know nothing about 4D, but suppose it passes an int, a char, and a lonmg to your main routine. In C, your main should be declared as follows: pascal void main(i, c, l) int i; char c; long l; note that if the Pascal interface is to a *procedure*, that is, no return type, you *MUST* declare your main as "pascal void". Otherwise, mayhem results. Hope this helps. --Rich Rich Siegel, THINK Technologies ----------------