Beginner on Mac - t3make error

Hello all,

I wonder if anyone can help me with a makefile error (or a make error, at least).

I’m just experimenting with TADS programming on Mac, seeing how it compares to Inform. I’ve done a little C programming, so the idea of a C-like language appeals to me.

I’m following the instructions for Mac users in the Quick Start document on the TADS bookshelf. I’ve laid out the directories as described, and cd’ed to the project directory in the terminal as described, and run the make command as described, and received this error message:

t3make -d -f TadsExperiment                                                      1 ↵
TADS Compiler 3.1.3  Copyright 1999, 2012 Michael J. Roberts
Error: Invalid option: "-lib adv3/adv3"
(Type "t3make -help" for a summary of the command syntax)

It seems that t3make can see and read my makefile, but doesn’t like what if finds there.

This is the contents of my makefile, copied from the Quick Start document with the name of my own game file substituted:

     -D LANGUAGE=en_us
     -Fy obj -Fo obj
     -o TadsExperiment.t3
     -lib system
     -lib adv3/adv3
     -source TadsExperiment

Am I misunderstanding something, or is there a real problem here?


It should be working. Can you upload the makefile somewhere, as-is without copy&pasting from it?

Is it possible that your adv3 library isn’t in a folder also called adv3? or that the makefile is not in the directory where the adv3 folder is located? The error message makes me suspect that the path to adv3 is not correct.

If that’s the case, that’s a pretty horrible error message.

Let’s wait for gairlochan’s answer. But I have one hypothesis. Consider the way how command line parameters are passed to the programs in typical operating systems. The shell interpreter takes whole command line and separates it into an individual parts on every space character (respecting any shell escape sequences, quotes and such). Then it creates an array of parameters including name of the command as zeroth entry and passes it as argv variable into typical main function. TADS 3 makefile is not a command line directly, but it behaves this way.

The above error message is generated by following piece of code:

bad_option: /* invalid - describe the problem */ printf("Error: Invalid option: \"%s\"\n" "(Type \"t3make -help\" for a summary of the " "command syntax)\n", argv[curarg]);
See the argv[curarg] argument. Normally it should print one command line parameter into the error message, but it actually prints “-lib adv3/adv3”. That means in my opinion that the space is not an ordinary space with ASCII code 32, but rather some random typographical Unicode space character sourced probably by copy and paste from some web page or PDF document which has these produced by some authoring programs in hope to create better looking typography and silently making the code invalid in an invisible way. Such space is not recognized as a space which would create a boundary between two parameters, but rather taken as a literal part of one parameter. The compiler probably gets [’-lib adv3/adv3’] instead of [’-lib’, ‘adv3/adv3’].

I’ve attached the makefile to this answer (at least I hope I have).

Thanks, Lachlan

P.S. It doesn’t seem to attach. I can choose the file, but when I click ‘add the file’, there’s a brief progress bar and then my file gets deselected (i.e. ‘choose file’ no longer has the filename after it.). Sorry …

Anyway, it’s looking as if I need to instal the adv3 library somewhere. I’m going digging in the docs to find out where.

Phew! With Inform7 I just ran the installer and was writing a game within a few minutes, no bother.

Hello Jim,
It’s wherever the FrobTADS installer put it, wherever that is. Spotlight can’t find it, Finder can’t either, and neither can Quicksilver or Path Finder. I’m now wondering if it was even installed. I just ran the installer and assumed it knew what it was doing…

Should this library really be in the same folder as the makefile? The makefile and source file are in the same folder, but the instructions didn’t say anything about putting the library folder in there too. They didn’t even mention it.

p.s. When you say ‘directory’, do you mean the same as ‘folder’?

Any ideas?
Best, Lachlan

P.S. No thanks to Spotlight/Finder et al, I’ve found the adv3 library where I should have looked for it in the first place, i.e. where the FrobTADS installer put it, inside the /usr/local/share/frobtads directory; specifically, inside the /usr/local/share/frobtads/tads3/lib/adv3 directory (at least, if about 40 files with a .t filetype constitute a library; I wouldn’t know).

There are no docs that I can find on the TADS site which deal with this at all. The installation instructions, such as they are, don’t make any mention of the adv3 library at all one way or the other. However, this is clearly where they’re meant to be, and as the installer put them there, I’m reluctant to move them unless I’m sure it’s necessary. All of this (FrobTADS, t3make, adv3 etc) came in the same package with the one installer, so they surely must know about each other, yes? So what is t3make complaining about?

Suggestions, Guesses anyone?

Best, Lachlan

Hello Tomas,

I copied those code blocks from the TADS Quick Start document on this page:
… so they should have been all right. But just to make sure, I opened the makefile in Vim and also in BBEdit and they all seemed all right, but I went and backspaced over them and recreated them as spaces with the spacebar, so they definitely are now.

I ran the command again, with this result:

t3make -d -f TadsExperiment
TADS Compiler 3.1.3  Copyright 1999, 2012 Michael J. Roberts
        Files to build: 45
        symbol_export TadsExperiment.t -> obj/TadsExperiment.t3s
TadsExperiment.t(5): error: symbol "initialPlayerChar\ufffd\ufffd" contains non-ASCII character (U+fffd)
TadsExperiment.t(5): error: symbol "\ufffd\ufffdme" contains non-ASCII character (U+fffd)
TadsExperiment.t(5): error: symbol "initialPlayerChar\ufffd\ufffd" contains non-ASCII character (U+fffd)
TadsExperiment.t(5): error: symbol "\ufffd\ufffdme" contains non-ASCII character (U+fffd)
Errors:   4
Warnings: 0

… which tells me that the makefile’s probably all right now, but the source file has non-ascii characters. So, I do the same thing with the source file, and Vim shows up this (see just after initialPlayerChar):

     #include <adv3.h>
     #include <en_us.h>
     gameMain: GameMainDef
       initialPlayerChar[34m| =[34m| me
     versionInfo: GameID
       name = 'TadsExperiment'
       byline = 'by Lachlan Baird-Mackenzie'
       authorEmail = 'Lachlan Baird-Mackenzie <>'
       desc = 'This is an example of how to start a new TADS game project. '
       version = '1'
       IFID = 'b8563851-6257-77c3-04ee-278ceaeb48ac'
     firstRoom: Room 'Starting Room'
       "This is the boring starting room."
     +me: Actor

Now it compiles perfectly! After all that, it was just a few rogue characters. Those files looked fine in Path Finder’s text reader app, so I’ll know not to trust it as a pure text editor in future, and use Vim or BBEdit.

So thank you all; the problem seems to be solved.

Best, Lachlan

And the winner is… Non-breaking space alias U+00A0 alias  !

It turns out that Quick start guide (and also HTML version of Getting Started in TADS 3) have quite a lot of   entities in its HTML code even in code examples which are meant to be copied by users into their own source codes. It could be bug having nonbreaking spaces in the documentation, but I’m not that sure. When I copy and paste from the guides using Firefox on Linux and kwrite text editor, this nonbreaking space is automatically converted into an ordinary space. That means that Firefox uses this information to properly laid out a webpage, but once transferred through clipboard it is replaced with an ordinary space so in my setup it is not a problem.

Do someone know what is the expected behavior? Is Lachlan’s browser an exception and majority of web browsers transforms space in which case there is nothing wrong with the documentation, or is copying nbsp as is a common behavior and the documentation should be cleaned up?

Nope, you didn’t.

But the problem must be because of copy&paste from the documentation which contains non-ASCII spaces. It’s strange that your editor would not convert these to ASCII spaces when pasting.

Maybe you can pester the author of that editor about it? Or maybe it has some configuration option for this.

I think nbsp in code sections of the docs as a bug in the docs.

I’ve been bitten by this too, in linux.