Unknown type name 'intmax_t' - objective-c

I'm having some serious problems compiling. I'm on Xcode 5. Everything was working, now it's not.
It won't compile my .pch file. I've tried a new .pch file to no avail.
I get hundreds of errors, starting with: Unknown type name 'intmax_t'
Has anyone experienced this and got any pointers to where I might start figuring out why it's doing this? It's got to be a setting in my project file somewhere

that error comes from "stdint.h" not being in your project. (that's where it's defined). Since that's a core library, it must be that a path has changed some how. This could happen if you moved your project, renamed the folder, or installed a new version of Xcode and the path is not updated. It could also happen if the compiler settings were changed. for example, see this question
Xcode 4: "error: unknown type name 'BOOL'; did you mean 'BOOL'?"
as you can see, his compiler was switched on him and he had to change it back. So you might be using a different compiler without realizing it, so it's looking for the libraries somewhere else. That you give you some clues. Let me know what you find

I found the issue to be:
Always Search User Paths: This was set to Yes.
User Header Search Paths: "$(SRCROOT)/" (recursive)
I removed these and all is well again.

Related

Quiz App will not load after importing files

I am creating a simple quiz app as I am learning React Native. I created a Folder to store all the components I will need.
However, I have this error:
Does anybody know why this error is coming up? I am not sure why it has "data" in small caps since I have it in VS code as uppercase d. This is a strange error I have never seen before. Any leads would be appreciated.
So here is what I think could be happening:
In your Quiz.js file - You might have imported and tried to use a node module that is not installed
Even though your folder has a "D" for data - You might have had the path to it( at least in one file) as a small cap
You could be calling referencing a path to a file that is completely outside the scope of your project.
I have never seen exactly this type of error before, but it looks similar to the ones I have seen when I have made mistakes like the ones I mentioned above.

Xamarin: Any universal fix for ContentPage/StackLayout/AnyControl was not found

Sometimes I get an error that Nothing in the Xaml-file is not found. This sometimes is fixed by restarting VS, Restore NuGetPackages, re-installing xamarin.forms nuget in combination with clean and removing obj-folders. But this is getting rather tiresome, and non of that works now.
The type 'StackLayout' was not found. Verify that you are not missing
an assembly reference and that all referenced assemblies have been
built.
Is there any universal fix on this or perhaps get a more accurate error message?
As I understand, this has been a problem for a long time with Xamarin forms
Seems to work reasonably well if you make sure the xaml-fileĀ“s Build Action is "Embedded resource" and not for example "Page". You can at least build, but you still get Intellisense-errors when you look at the pages
Many thanks in advance

Redefinition of enumerator / Semantic issue

I've got serious issues with XCode right now and i cant really figure out what to do, or even whats wrong.
The project i'm working on was working perfectly yesterday, but today when i started it i got like 20 "Redefinition of enumerator" errors, and to the point where "Too many errors emitted. Stopping now".
The wierd part is that ALL my backups of the project does this aswell. Even the ones from 2,3 or 4 days ago which hasnt been altered.
No other project seems to be affected by this.
I've tried Cleaning the build, removing Derived data, checking for duplicate files somehow (even though that shouldnt be possible), all linker seems to be in order. Anyone got any tips for me?
Thank you!
you should import
#import "Facebook.h"
instead
#import <FacebookSDK/FacebookSDK.h>
I just had this exact problem about "Redefinition of enumerator" errors coming out of nowhere.
The problem was that accidentally (maybe some unintended drag with the mouse) I had copied one of the project directories into some other, thus duplicating it.
On the other hand I use git and generally was using 'git status -uno' which hides untracked files.
So I was not seeing the untracked duplicated directory that was duplicating enums in the project, from my perspective I had a clean HEAD with weird errors :S
Lesson learned: use .gitignore rather than '-uno' option
This issue still happens in 2019 smh.
If you get this go check File->Workspace Settings and set build system to Legacy Build System. This should fix the issue.
I had the same error and was really stuck. But found that the project folder nam had white spaces. I changed that and the error went off!
Eg: Changed folder name My Project to MyProject
For anyone has the same problem, who pulled out hair for hours/days.
Let's double check and remove redundant Header Search Paths, delete Derived Data if needed.
After that, the issue will be resolved.

INotifyPropertyChanged.PropertyChanged implemented and not implemented; Visual Studio build error

I'm seeing a strange build bug a lot. Sometimes after typing some code we receive the following build error.
Class 'clsX' must implement 'Event PropertyChanged(sender As Object, e As PropertyChangedEventArgs)' for interface System.ComponentModel.INotifyPropertyChanged'.
And
'PropertyChanged' cannot implement 'PropertyChanged' because there is no matching event on interface 'System.ComponentModel.INotifyPropertyChanged'.
Those error should never go together! Usually we can just ignore the exception and build the solution but often enough this bug stops our build. (this happens a lot using Edit and Continue which is annoying)
We're using Vb.net and c# mixed in one big solution.
Removing the PropertyChanged event and retyping the same code! sometimes fixes this.
Question:
Has anyone else seen this problem and has some suggestions how to prevent his?
We're using a code generator that causes this error to surface but just editing some files manually triggers this exception too. This error occur's on multiple machines using various setups.
Someone had the same exact issue discussed here. It sounds like there is an issue with this build picking up an old version of a binary. I would try the following in order:
Verify all assembly references use project references where possible within the Visual Studio solution.
Disable build parallelization in case there is some weird file locking issue with concurrent project builds. Go to Tools -> Options, Projects and Solutions -> Build and Run, then set "maximum number of parrellel project builds" to 1. Not the best solution but it may help narrow down the problem.
Disable the Hosting Process in case it's locking some file causing an assembly to not get rebuilt correctly. For C# project go to Project Properties, Debug tab, and uncheck "Enable the Visual Studio hosting process". For VB.NET project you'll need to Unload Project, Edit the project file, and add <UseVSHostingProcess>false</UseVSHostingProcess> to the PropertyGroup of each configuration. Again, not the best solution but you probably won't notice a difference.
Lastly, try doing a Clean + Build to try and resolve the issue when it occurs (I know this is not a fix but it's easy enough to do), also Rebuild may be slightly different than Clean + Build so try the latter if the former doesn't work.
As I can not comment due to lack of appropriate points.
But I would like to share one of my experience:
In an aspx.cs page I was working, used to compile fine and some time gave mysterious error of a variable not defined or function not defined or sometime variable or the function defined two times. I changed possibly each and every variable and function name but there seemed no effect , but after entering a simple space or a new line at any place in the file used to solve the compile error. At one time I tried to save the file (in a different encoding as i am used to experiments) and found that the file was not saving in the correct encoding (i.e. the ansi encoding because the file had a unicode character ), I removed the unicode character and that compile error didn't bothered me again.
This unicode character problem could be (not a hard and fast rule) there so you could check it.
Nuke & restore using source control (TFS instructions here):
Make sure you have everything checked in
Exit Visual Studio
Rename the project directory to .Bak (effectively deleting it)
Reopen Visual Studio and in source control:
Get Specific Version
check 'Overwrite... not checked out' and 'Overwrite ... even if local version matches'
Re-open project
Another problem: Make sure some source files are not newer than the current date (or your date is set back). Often this happens in apps where you are doing logic that requires certain things to happen differently on certain dates. You change your clock to test it, make a revision to the source with the date advanced, set the date back, and viola, rebuild does not rebuild that file.
You say 'typing it in again' - can you try just saving? After 40 years since MULTIX the .net build still decides what has changed by checking the file timestamp.
good luck!
When you get the error, is it always on the VB calling C# side, or vice-versa, or does it work both ways?
If the answer is either of the first two situations, try building the "callee" project within the solution before building the "caller" project to see if it stops the situation.
Also, just in case it may jog something for you to think about, does this error crop up when you change a VB file or a C# file, or is there no correllation?
Oh, and sorry this looks like an answer instead of a comment, I cannot post comments yet (need 50 rep).

Bizarre VB6 Make Problem - Previously working identical code won't recompile

I've got a really strange error and any light that anyone can shed on this would be greatly appreciated.
I made some changes to some VB6 source which builds a COM object. The automated build which builds our app returned an error. No problem I thought--I'll just back out my changes. Well backing out my changes isn't making the problem go away.
Specifically when I attempt to build the app via a .vbg file, with a command line like path\to\vb6\vb6 ProjectFile.vbg /make
I get a message
"Compile Error in File '', Line : Object library
invalid or contains references to object definitions that could not be
found."
As I said, I reverted the source code so I'm really stumped as to why this error is still occurring. Any VB6 gurus around who might be able to point me at an answer?
I can post the exact code in question but the fact that it was building correctly, stopped building correctly and now refuses to build correctly makes me think this is not a problem with my code but rather some problem in the environment. Like something got put in the registry as a result of the previous build error.
Any tips, hints, or suggestions greatly welcome. I realize my question is a bit sketchy but I'm not even sure what's important to include and what isn't.
EDIT 1:
Thanks for the excellent suggestions guys. I think it is something to do with VB6 doing some sort of auto-registration.
Just to add a bit more detail: this problem does not occur when I build the referenced vbp file from the IDE. It only happens on the make on the .vbg which contains the vbp. Also the build tool in question automatically pulls latest source and the error happens on both my local box and the dedicated build box.
EDIT 2:
Hi again all,
The release engineering fellow figured out how to get this to build in his build environment so it's currently ok. Once we're past this crunch, I'll try to interrogate him about what he did and share the details with everyone.
Thanks again for all the great suggestions. This is what's so great about SO; that is, I asked about a 10-year-old technology and I got several great and on-point ideas.
Make sure that the VBG and all the VBP's got rolled back as well. That error is consistent with a project trying to reference a CLSID that is no longer valid for the dependency. Have you tried loading up the project group and building from the IDE, if that works and you save and check in all the changes to the group and project files, you might be fixed up.
I'm guessing the fact that you mention that it was a COM component might be the source of the problem. If any of the public method's or properties have changed then I seem to remember that VB6 will change the interface GUIDs and auto register the new ones.
My suggestion would be to check the registry to look for any mention of the component name, make a note of any associated CLSIDs, back up the registry, and then delete the references.
As cmsjr mentions it could also be a bad CLSID reference in your .vbp files.
The other option is that the failure has caused a problem with some .tlb (type library) or olb (object library) files.
The best thing to do is move all your compatibility DLL to a separate and combined directory. The reason for this is control over what VB6 is using to check for binary compatibility. In addition the Typelibs that are generated IMPORT the references. So if you using Binary DLL Ver 10 for compatibility however the import is pulling in Binary DLL Ver 9 you will have issues. By keeping all the libraries in a single folder and pointing your projects to the DLLs in that folder you ensure that the respective TypeLib Import the correct version.
Finally if you have multiple levels of DLL reference each other. You may run into mysterious error where the VB6 is unable to compile using binary compatibility. In such cases you need to compile the lowest DLL in the hierarchy (Utility DLL perhaps) copy it over into the compatibility folders. Work your way up the chain until everything compiles in one shot again.
This is because if have DLL A reference DLL B which Reference DLL C. VB6 will get sometimes get confused if you make a change to A and C. will compile fine but A will not until the compatibility libraries are updated.
Hunt down and delete any .obj and .exp files that may be lying around from the previous failed build.
You will have to open the project & re-type in the lines that you changed.
Save the project alongwith VBG and re-compile after that.
I think that will fix it.
EDIT: The idea is that the cls/bas file remember the class (CLSID) that you used. So, if you change the references but don't change the lines in the cls/bas - it is a mismatch of type (what was referenced vs what is typed in cls/bas file).