Here is my project structure:
As you can see, i dont have any warnings on my files, but the project has the warning icon. How do I find where this warning is placed?
When I have problems like this, I usually bring up the project properties editor, and check things like the build path. y configuration would produce an error for a build path problem rather than a warning, but maybe you have yours set to warning instead, or you have something similar which would be reported somewhere in the project properties.
Related
So I have a library project where I defined a couple of functionblocks and interfaces.
Now I want to use this library in a plc project (in the same twincat solution). So I do the whole save all, rebuild, save and install as a library spiel. If I try to declare a VAR in my MAIN it will result in unknown type errors. I have fiddled around a bit, and when I declare an interface withouth any properties or methods (in the lib) then I it does show up and can be used in the MAIN. But as soon as I add a property or method the class/FB/POU dissapears in the eyes of my MAIN...
I feel like I'm overlooking some option / atribute to help the PLC project to use the lib properly...
What am I missing here?
EDIT:
as you can see in the images, empty blocks are found, adding anything magically makes it dissapear
error
available classes
EDIT 2:
I solved my problem by copying the lib to a new solution. Something in the original project made it be broken. Why it did that is still a mystery...
Try following steps:
clean the solution where you programmed the library.
right click on the project and click check all objects
if this is successfull, install the library again, remove it from the reference section and re-add it.
Then clean again and build all.
In my workspace, I added a playground, tested some code, then deleted the playground after deciding that it wasn't really that useful. Unfortunately, it seems to have left something behind:
/Users/GoldenJoe/Development/Xcode/MyApp/MyApp/MyPlayground.playground:18:11: Expression implicitly coerced from 'URLRequest?' to Any
Searching in Build Settings, I can't find anything related to playgrounds. How can I get rid of these annoying warnings?
i had the same problem and could solve it with cleaning the project --> Xcode > Product > Clean . To avoid these kind of problems I highly recommend you to use version control like GitHub to jump back to older versions of your code.
Unfortunately, had to solve it by opening the .xcworkspace file in a text editor and manually editing out all "MyPlayground" related blocks.
I don't really understand what's hapening but I'm not able to see all my Swift files on Xcode project navigator, but when I open my project directory I see them all, it looks like reference problems.
I'm receiving some invalid redeclaration problems.
Are you using the one of the xcode-beta builds? They seem to have some problems with file handling every now and then. Restarting fixes it for me most of the times.
I am new to Netbeans. Netbeans shows an error as below:
But the error text is: incompatible types: List cannot be converted to Vertex. I'm sure it's referring to the code below it that uses Vertex in many places, but the file is long and I have no idea which line to go to. Is there a way to fix this, or is this a bug, or am I interpreting everything wrongly?
Bug still there, but a workaround is to run the project and the compile error will show up in the output. I'm used to Eclipse where you normally can't run a project with complier errors. But this is a way to find the line.
I just used Xcode's refactoring tool to rename a core data class from Player to Person. After fixing about 100 errors resulting from using dot notation that Xcode missed in the rename, I got to the last one:
Player.m - Lexical or Preprocessor issue - 'Person.h' not found
Player.m no longer exists in the project, and shows up as deleted (empty icon) in the error. Obviously, since I got rid of it, I don't want it to exist anymore!
To fix this, I have tried re-adding an old copy of Player.h and Player.m, and also cleaning. I have checked the Build Phases->Compile Sources section, and Person.m is there, Player.m is not. Person.h does in fact exist.
Not sure if it matters, but I am using mogenerator to generate my core data classes. Also, this is my third xcdatamodel version. Versions 1 and 2 used Player.h.
Here is a screenshot of the error:
Try clean build, if that doesn't work, restart Xcode, if that doesn't, delete the DerivedData directory, maybe even reboot.
Xcode sometimes gets confused.
You can try to do a super clean (not sure what the real term is) by hitting Cmd+Alt+Shift+K. This performs a clean and removes everything from the build folder.
Well I had a very similar problem and solve it removing the missing compile source of my project settings. to do that follow these steps
Click at the project page. This page contains the general settings
of your app
Select Build phases.
In Build Phases section, select compile sources.
If there is missing some class or file or something that needs to be compiled.
Select water mark file and click the minus sign at the bottom of this section.
Just click and the project may run. I hope this help others.