Skip to content

Troubleshooting

Gavin Fielder edited this page Jun 16, 2019 · 11 revisions

I tried making and it says make: *** [../libftprintf.a] Error...

This means you have an error in your own makefile. Does your own makefile compile properly?

Alternatively, if you did not put the pft folder into the root directory of your project, then see Nonstandard Installation.

I tried making and it says duplicate symbol

Is the symbol it says is duplicate is _main? If so, it means you have a main function in your source code that your makefile is compiling and including in the library. Make sure your library does not include a main, and that you are compiling your library with the -c flag and then using the ar command to package a static library.

I tried making and got a bunch of "undefined symbol" errors

Are these your libft functions? If so, you probably need to follow the Installation Direcitions in order to include your libft.a separately from libftprintf.a

Help! Wildcard search isn't working!

For almost all shell terminals, the * needs to be escaped--usually, putting a string in double quotes is sufficient, but some terminals still treat it as a shell * even then. You can either escape it manually '\*', or, to make this feature compatible with all shells, I've made any character not valid for a C function name (alphanumeric + underscore) is now considered a wildcard. This means instead of \*, you can also use @, or anything else your terminal doesn't recognize as a special character. The same is true for the enable-test and disable-test scripts.

My test results show the same string and the same return value. Why am I failing this test?

Some text editors don't show you nonprintable characters. Open results.txt in vim first. If it still shows identical in vim, contact me.

Why does my test history keep disappearing?

It's a precautionary measure (Click here for why). To disable it completely you can open options-config.ini and set REMOVE_HISTORY_WHEN_TESTS_NEW to 0, or if you want a safer version intended to only remove when tests are added, you can set ENABLE_DISABLE_TOUCHES_TEST_HISTORY to 1.

I'm trying to write my own tests but the compiler doesn't find the 'test' function

The test function doesn't exist. The error is that the regex isn't matching properly in the create_index.php script. The regex it tries to match is \stest\(, so it needs a whitespace character before test and no space between test and (.

Other Issues

If something goes wrong--slack me @gfielder. I like testing, like people using good testing, and want to make this easier to use, so don't hesitate to contact me. And if you think it's a bug, let me know so I can fix it.