Skip to main content
added 660 characters in body
Source Link
Cliff B
  • 69.3k
  • 4
  • 33
  • 56

This is always because of the location of the dictionary[EDIT - previous answer deleted, irrelevant]

Haven't seen this in respect to the location of the codea while. The folder dictionaries must beThe problem lies with your return statements in the same directory as the executable code AND the file large mustload function. You are returning 0's and 1's, not true or false. This can be in that directoryconfusing, especially when you confuse it with another programming standard of returning 0 for success and a non-zero for errors.

HaveThe load() function requires returning a bool, not a number, so as best practice, you checked to be absolutely sure that thisshould always return true or false when a bool is all true??? Are you running the correct executablecalled for. (you'reAlways return the correct type from a function, not working multiple versions of yoursomething that has to be cast or interpreted.) The code is returning 0 for success and 1 for failure. Unfortunately, are you0 is always interpreted as false and 1 (or any other non-zero, + or -)? is interpreted as true. This code is (apparently) completing the load function, but returning false, so the code in speller.c sees it as a failure and prints the "could not load" message.

Finally99 times out of 100, this is it possible thata failure to have the dictionary file may have been corrupted? Try downloading it againin the correct place. Your error is the 1 in 100! ;-)

If this answers your question, please click on the check mark to accept. Let's keep up on forum maintenance. ;-)

This is always because of the location of the dictionary in respect to the location of the code. The folder dictionaries must be in the same directory as the executable code AND the file large must be in that directory.

Have you checked to be absolutely sure that this is all true??? Are you running the correct executable (you're not working multiple versions of your code, are you)?

Finally, is it possible that the dictionary file may have been corrupted? Try downloading it again.

[EDIT - previous answer deleted, irrelevant]

Haven't seen this in a while. The problem lies with your return statements in the load function. You are returning 0's and 1's, not true or false. This can be confusing, especially when you confuse it with another programming standard of returning 0 for success and a non-zero for errors.

The load() function requires returning a bool, not a number, so as best practice, you should always return true or false when a bool is called for. (Always return the correct type from a function, not something that has to be cast or interpreted.) The code is returning 0 for success and 1 for failure. Unfortunately, 0 is always interpreted as false and 1 (or any other non-zero, + or -) is interpreted as true. This code is (apparently) completing the load function, but returning false, so the code in speller.c sees it as a failure and prints the "could not load" message.

99 times out of 100, this is a failure to have the dictionary file in the correct place. Your error is the 1 in 100! ;-)

If this answers your question, please click on the check mark to accept. Let's keep up on forum maintenance. ;-)

Source Link
Cliff B
  • 69.3k
  • 4
  • 33
  • 56

This is always because of the location of the dictionary in respect to the location of the code. The folder dictionaries must be in the same directory as the executable code AND the file large must be in that directory.

Have you checked to be absolutely sure that this is all true??? Are you running the correct executable (you're not working multiple versions of your code, are you)?

Finally, is it possible that the dictionary file may have been corrupted? Try downloading it again.