QB64 Phoenix Edition
QB64pe 4.0 on Mac Troubles - Printable Version

+- QB64 Phoenix Edition (https://qb64phoenix.com/forum)
+-- Forum: QB64 Rising (https://qb64phoenix.com/forum/forumdisplay.php?fid=1)
+--- Forum: Code and Stuff (https://qb64phoenix.com/forum/forumdisplay.php?fid=3)
+---- Forum: Help Me! (https://qb64phoenix.com/forum/forumdisplay.php?fid=10)
+---- Thread: QB64pe 4.0 on Mac Troubles (/showthread.php?tid=3326)

Pages: 1 2


QB64pe 4.0 on Mac Troubles - NakedApe - 12-27-2024

[I also posted this in the New Release thread.]. Attn: @a740g     Confused

I'm having a problem with QB64pe 4.0 on the Mac. If I try to run older programs of mine on 4.0, the IDE compiles them, gives no error message and then nothing happens. Nothing. I've tried it with many progs.  

If I open a program that doesn't run and save it with a different name, then sometimes it'll run, but not always. If I try the "bad" progs on version 3.14.1, all is well.

This for example doesn't run unless I rename it.

Code: (Select All)
Option _Explicit
_Title " A Spinning Circle: bplus mod 2 of NakedApe"
Screen _NewImage(600, 400, 32)
Dim As Integer i, start, fini, stepper, top '        Playing with Aspects
Dim As _Unsigned Long col
$Color:32
Dim asp(1 To 90)
i = 1: asp(1) = 1 ' make an array of aspect values Note: asp(i) = Cos(_D2R(i)) will spin on the other axis
While i < 90
    i = i + 1: asp(i) = 1 / Cos(_D2R(i))
Wend
top = i: col = Red: start = 1: fini = top: stepper = 1
Do
    For i = start To fini Step stepper
        Cls
        Circle (_Width / 2, _Height / 2), 100, White, , , asp(i)
        Paint (_Width / 2, _Height / 2), col, White
        If _KeyDown(27) Then System Else _Limit 90
        _Display
    Next
    If start = 1 Then
        start = top: fini = 1: stepper = -1
        If col = Red Then col = Green Else col = Red ' flip colors on odd cycles
    Else
        start = 1: fini = top: stepper = 1
    End If
Loop



RE: QB64pe 4.0 on Mac Troubles - Cybermonkey342 - 12-27-2024

I just copied and pasted the example into QB64pe 4.0. Compiles and starts without any problems on my Mac mini M4 with macOS Sequoia 15.2.
You said you have to rename it. What are you renaming? The source file or the executable?


RE: QB64pe 4.0 on Mac Troubles - NakedApe - 12-27-2024

Hey Cybermonkey342. So I just tried (again) to copy, paste and run the example, but the same thing happened on my M2 Mac mini on Sonoma 14.8.x -- no execution.  I just renamed the source file from inside the IDE and tried it again and --> nothing this time. It's weird, some programs run, some don't. 

I'm updating my OS to 15.2 and will see if that changes anything.  Thanks.


RE: QB64pe 4.0 on Mac Troubles - Jack - 12-27-2024

@NakedApe
I wouldn't use colons or slashes in the file name, Mac OS may have changed on what characters are allowed in file names
Quote:When you use a slash in the file name, the actual file name doesn't contain the slash. Only displayed name (that is, the name you see in the Finder) contains the slash. The actual file name contains a colon [:].

Users have never been allowed to use colon in file names on Mac because it was - and still is - the path separator in HFS paths. So by using the illegal colon in the file name when you enter a slash, the system knows that the slash was entered by the user — and will interpret the colon accordingly.

Slash is the file separator in the Unix (POSIX) paths - which are the primary path types ever since OS X. Even though it's allowed in file names (for the reasons I explained in my post above), forward slash should NEVER be used in file names. Sooner or later it WILL cause problems - as you witness from this thread.

Many software titles may interpret forward slash for what it is - the path separator - which will lead to errors and other major headaches.



RE: QB64pe 4.0 on Mac Troubles - NakedApe - 12-27-2024

Thanks, @Jack. There aren't any colons or slashes in the file names. I just updated to the latest OS, but it made no difference. If I paste to ver 3.14.1 the prog works. If I paste to ver 4.0, it doesn't run. If I go to the source folder and double-click the .command shell or the exe then the program runs just fine. It's just from within the IDE that certain progs don't seem to wanna run. A renamed version of the program just ran for me, but didn't a minute ago. I think I have Gremlins!

Edit: So maybe the IDE is treating my F5 requests like F11s (Make EXECUTABLE only) sometimes? It's not the end of the world, but is strange...


RE: QB64pe 4.0 on Mac Troubles - NakedApe - 12-27-2024

If I type this into the IDE and hit F5, it creates a .command file and an exe called 'untitled' in the QB folder, but doesn't run.

Code: (Select All)
Cls
Print "Hello World!"
Sleep
System
If I save this as hello.bas and then reopen it, it still won't run, but makes a fresh exe each time. Da heck?


RE: QB64pe 4.0 on Mac Troubles - NakedApe - 12-28-2024

Tried to do a fresh install of 4.0 and got this message:

In file included from internal/c/libqb/src/threading.cpp:2:
./internal/c/libqb/include/libqb-common.h:65:18: fatal error: 'cstddef' file not found
   65 | #        include <cstddef>
      |                  ^~~~~~~~~
In file included from internal/c/libqb.cpp:1:
In file included from internal/c/libqb.h:3:
In file included from internal/c/common.h:20:
In file included from internal/c/os.h:2:
./internal/c/libqb/include/libqb-common.h:65:18: fatal error: 'cstddef' file not found
   65 | #        include <cstddef>
      |                  ^~~~~~~~~
1 error generated.
make: *** [internal/c/libqb/src/threading.o] Error 1
make: *** Waiting for unfinished jobs....
In file included from internal/c/qbx.cpp:2:
In file included from ./internal/c/libqb/include/bitops.h:3:
./internal/c/libqb/include/libqb-common.h:65:18: fatal error: 'cstddef' file not found
   65 | #        include <cstddef>
      |                  ^~~~~~~~~
1 error generated.
make: *** [internal/c/libqb_make_00010100.o] Error 1
1 error generated.
make: *** [internal/c/qbx.o] Error 1
Compilation of QB64-PE failed!


RE: QB64pe 4.0 on Mac Troubles - SMcNeill - 12-28-2024

(above post edited by Steve so you can actually read those error messages.)  Wink

Protip:  When pasting text into the forum, use the PASTE AS TEXT option.  It'll get rid of all the crapola which doesn't belong like font and color and size and blah blah blah, which makes it usually try and print at a size 2 font or some such.


RE: QB64pe 4.0 on Mac Troubles - a740g - 12-28-2024

@NakedApe The IDE and the compiler has some issues dealing with file names with spaces and punctuations in file names. I've seen that happening. It seems to happen on Linux as well.

cstddef is a standard library header. Probably your macOS installation or at the very least Xcode installation is corrupt. Just guessing. I'll give this a go and let you know what more I can find.

https://en.cppreference.com/w/cpp/header/cstddef


RE: QB64pe 4.0 on Mac Troubles - a740g - 12-28-2024

@NakedApe v4 does not cause any issues for me in Ventura. I also tried compiling the code you shared in the first post using v4 on macOS and it worked fine. So, I guess it may be an issue with your system's Xcode.


[Image: Screenshot-2024-12-28-at-2-03-34-PM.png]


Note: I saved it using a simple name. We are currently looking into the issue where programs fail to execute if spaces or other characters are in the file name.

Update: Also downloaded and compiled a fresh copy of v4 just to be sure.


[Image: Screenshot-2024-12-28-at-2-18-18-PM.png]