QB64.org Forum

QB64 Team Software => InForm Discussion => Topic started by: johnno56 on August 30, 2018, 05:42:22 pm

Title: Library not found
Post by: johnno56 on August 30, 2018, 05:42:22 pm
I have just recently installed InForm and tested the 'Calculator' program. Was not able to run it as an error prevented it from doing so. It is my opinion that the problem is not caused by the Calculator program. I also found an online tutorial for Tic-Tac-Toe (which explained everything very well) to the point where it creates the '.BAS' file. I get the same error. I'm going to guess that it's a 'Linux thing'. But I could be wrong.

Could someone please look into this and let me know if it's me? Thank you.

J

ps: I have tried to use the full path to the files and I still get the error. All libraries are in the right place and 'exist'. The 'InForm' folder is in the qb64 folder.
Title: Re: Library not found
Post by: FellippeHeitor on August 30, 2018, 06:01:59 pm
falcon.h must be in QB64's folder.
Title: Re: Library not found
Post by: johnno56 on August 30, 2018, 06:27:28 pm
The file is already there. File placed during extraction into qb64 folder.
Title: Re: Library not found
Post by: TerryRitchie on August 30, 2018, 08:33:37 pm
Try changing InForm\InForm.ui to InForm/InForm.ui
Title: Re: Library not found
Post by: FellippeHeitor on August 30, 2018, 09:04:11 pm
Try changing InForm\InForm.ui to InForm/InForm.ui

The IDE is actually pointing to an error in line 14 inside InForm.ui, which means it was found despite the mix of \ and /.

Line 14 of InForm.ui is actually referencing the falcon library. If it's sitting next to the qb64 binary it should definitely be found;

What distribution is this, johnno56?

Another thing to test: can you copy the DECLARE LIBRARY block that begins on line 14 in InForm.ui and paste it into a new blank program? Does that give an error as well?
Title: Re: Library not found
Post by: johnno56 on August 30, 2018, 09:51:27 pm
Terry,

I spotted the 'mix' of / and \ earlier and had already tried to reference the library with the full path. But thanks for the suggestion.

Fillippe,

Copied and pasted the 'declare library "falcon"' block to a new program. It immediately stated 'Library not found'

J
Title: Re: Library not found
Post by: FellippeHeitor on August 30, 2018, 10:05:11 pm
What about what linux distro you're using?

Is it 32 or 64 bit?

Is this the latest dev build of QB64?

Too many questions, I know. Just trying to get a general picture.

Copied and pasted the 'declare library "falcon"' block to a new program. It immediately stated 'Library not found'

Something else entirely must be wrong in this case.
Title: Re: Library not found
Post by: johnno56 on August 30, 2018, 10:09:24 pm
Ah yes. Forgot about the OS. Sorry. I was typing while you were posting...

I use 64bit Linux Mint. I was using the dev build... But how can I tell if it is the latest? There does not seem to be an 'about'...

Applied the full path to "falcon". The library error disappeared but was immediately replaced by a syntax error of line 240 of InForm.ui..  '__UI_ThemeSetup'.  I searched InForm.ui but this was the 'only' reference to '__UI_ThemeSetup'....

I hope this helps...

J
Title: Re: Library not found
Post by: FellippeHeitor on August 30, 2018, 10:13:10 pm
Help->About. Latest is "From git 6cb81e1".

What is the full path of falcon at this point?

When you fix the error in InForm.ui, close it. You don't use it directly, as it'll be $INCLUDEd in the programs you generate with InForm. The "missing" procedure is in yet another module.
Title: Re: Library not found
Post by: johnno56 on August 30, 2018, 10:22:22 pm
Was not running with the latest build. In the process of downloading and installing. Will get back to you when done...

J
Title: Re: Library not found
Post by: johnno56 on August 30, 2018, 10:42:53 pm
It looks like "I" may have been the cause of most of the problems....

Fresh download and install of both current dev of qb64 and InForm... Then it twigged... I have the current stable qb64 and dev builds in separate directories. My desktop shortcut accesses qb64-dev BUT inform was installed into the stable build... Library error has gone but still does not run...

The calculator program loaded without error but failed with a C++ Compilation error. No line number given. I will attempt to attach the compilelog file...

It is not my intent to cause so much trouble for you... my apologies.

J
Title: Re: Library not found
Post by: FellippeHeitor on August 30, 2018, 10:47:59 pm
No trouble at all. I want you to have the smoothest experience with InForm. Let's keep going. I await the compilation log.

Edit: See it there. Let me read it.
Title: Re: Library not found
Post by: FellippeHeitor on August 30, 2018, 10:49:26 pm
OK, now your problem is not with InForm anymore, it's with Terry's calculator as it has a call to Windows's API.

Just remove the DECLARE LIBRARY block you'll find in Calculator.bas and replace the contents of SUB ALERT() with a single BEEP. Or even better replace it with:

Code: QB64: [Select]
  1. $IF WIN THEN
  2.         FUNCTION PlaySound (pszSound AS STRING, BYVAL hmod AS INTEGER, BYVAL fdwSound AS INTEGER)
  3.     END DECLARE
  4.  
  5. ': Program procedures: ------------------------------------------------------------------------------------------------
  6.  
  7. '----------------------------------------------------------------------------------------------------------------------
  8. SUB ALERT () '                                                                                                  ALERT()
  9.     '------------------------------------------------------------------------------------------------------------------
  10.  
  11.     ' Plays Windows default sounds
  12.     ' Sounds can be invoked using the following strings:
  13.     ' "SystemDefault","SystemExclamation","SystemExit","SystemHand","SystemQuestion","SystemStart","SystemWelcome"
  14.  
  15.     $IF WIN THEN
  16.         s = PlaySound("SystemDefault" + CHR$(0), 0, 65537) '                play Windows default system sound
  17.     $ELSE
  18.         BEEP
  19.     $END IF
Title: Re: Library not found
Post by: johnno56 on August 30, 2018, 11:02:57 pm
Cool...  I now have a fully functioning calculator!!!  Many thanks for the time and effort provided. Much appreciated.

J
Title: Re: Library not found
Post by: FellippeHeitor on August 30, 2018, 11:06:38 pm
My pleasure.
Title: Re: Library not found
Post by: johnno56 on August 31, 2018, 12:03:25 am
... by the way... I then followed the video tutorial for 'Tic Tac Toe' and it ran without issue... Cool. Video presenter was very clear and explained everything. Clever guy that one...

Just curious... I'm going to assume that Tic Tac Toe ran without issue because it was compiled on my machine. Does this mean, if I want to run other 'users' programs, I could have some minor issues? If that is the case, then would it not be prudent, for users to include OS detection and modify their code accordingly? Just a thought.
Title: Re: Library not found
Post by: FellippeHeitor on August 31, 2018, 12:10:01 am
Video presenter was very clear and explained everything. Clever guy that one...

Thanks! *blushes*
Title: Re: Library not found
Post by: TerryRitchie on August 31, 2018, 12:45:20 am
Just curious... I'm going to assume that Tic Tac Toe ran without issue because it was compiled on my machine. Does this mean, if I want to run other 'users' programs, I could have some minor issues? If that is the case, then would it not be prudent, for users to include OS detection and modify their code accordingly? Just a thought.

That's going to be a hard sell because most people don't have both platforms (Linux and Windows) to test their code on and most are not going to be knowledgeable enough to set up a Linux machine with QB64.

My personal thinking is if I ever create software with QB64 that is good enough to distribute to a large audience, and that audience is big enough to include Linux users, then I'll take the time to program in cross-platform features then.

Don't get me wrong, I love Linux. I have a Mint box sitting next to me on my desk that I use all the time. I wish more people would take the time to learn and use Linux.
Title: Re: Library not found
Post by: johnno56 on August 31, 2018, 02:19:09 am
I have been using Linux now for 13 years and have been amazed by the advances that it has made. But, as you say, the audience is large and, in comparison, non-windows users would make up a row or two at the back of the theatre...  It's understandable that the emphasis of programs would cater to the greater numbers. But when an application is said to be able to run on Windows, Mac and Linux, one would expect that the programs that it creates would be coded to run on Windows, Mac and Linux. Just a thought.

I think Linux is great. I've been a Mint user for the past 5 years...  Now it's time to fire up the coffee machine...
Title: Re: Library not found
Post by: TerryRitchie on August 31, 2018, 03:13:03 am
What would be ideal is the way GLBasic does it. You write the code and then at compile time choose your platform to compile for.
Title: Re: Library not found
Post by: johnno56 on August 31, 2018, 05:54:18 am
Just jumped onto the glbasic forum and the developer(s) have suggested that the current version (v15) may be the last. The future of glbasic (mac and linux) will eventually be 'ditched' and concentrate on Windows, HTML5 and Steam...