Error User32 and search for the occurence in code

When the (below) error message appears, you cannot go to the code with a double click, butr have to search for user32…

Linking Executable
ld: framework not found User32

Look for a windows declare referencing User32.
You have to put an #if around to check for TargetWindows.

2 Likes

Thank you Christian.

I already correct the error.

But the point still exist: with common error, a duble clck in the error entry display the offending code. In that case, you have to isu a Search.

There was only one error to be found.

That error occurs in a process external to Xojo. What do you expect them to be able to do?

User32 is a Windows call
Not sure what you would expect if you do not include compiler directives such as #if

If you are compiling on macOS and trying to call Windows API you have to use protection for failure just as @Christian_Schmitz suggested

I should include that whatever platform you are building on you must include compiler guards

For instance calling Windows API from a macOS will never happen so include guards as #if

Same goes for Linux and macOS

Hope that helps

1 Like

When Xojo reach, an error, it will report it.

Then, you can click on that error line to display the offending code.

That is what I reported and that is what is missing.

Also, in a prior Xojo version that code worked fine; else I do what I do; that code is called from a:

#If TargetWin32

Block and does not report any error in that older Xojo.

Is it so hard to understand ?

apparently, yes, this is hard.

Once more:

I got an error compilng an old code to run on current version:

Linking Executable
ld: framework not found User32

Usually, a double click n the error lines display the offending code.

But not in that case.

To go to the offending code, I had to issue a Search for User32.

That method is called from a #If TargetWin32 block.
And I am not complaining about this change.

7 days to go to summer.

While this is true, it’d be nice to have a visual indicator telling whether double-click is available.

That was true for Xojo errors, not for declares. In older versions, you wouldn’t see the error until you actually tried to run the program. At least now, you get a heads up when you build the project.