ns3 waf configure headers not found - ns-3

I have a version of ns-3.26 installed on my VM. Its working fine.
However now I need to use very old code and since I dont want to break anything, I downloaded ns-3.26 again and wanted to build it.
But the waf configure gives me for this version a lot of missing headers:
Checking for header stdint.h : not found
Checking for header inttypes.h : not found
Checking for header sys/inttypes.h : not found
Checking for header sys/types.h : not found
Checking for header sys/stat.h : not found
Checking for header dirent.h : not found
Checking for header stdlib.h : not found
Checking for header signal.h : not found
In the first version it does find all headers. I am totally confused by that and have no idea how to tackle this problem. What could be the reason for that and how can I solve it?
// EDIT: I am forced to this version of ns3

So the problem was, that waf was trying to link a shared library I used but the file it tried to link was corrupt. Therefore all the mini compilations waf performs to check for missing headers failed and the header was shown as not found. That ofc yields the wrong environment variables.
I copied the shared library again which made it work. However, it can happen that your so file is a symbolic link which breaks under circumstances. In this case you need to create a new link with the same name which points to the correct so file.

Related

Create-react-app doesn't support relay compiler's --artifactDirectory option

In the relay docs, they nudge you to use the --artifactDirectory option for the relay compiler. This causes all the generated files to be placed in a single directory, which sounds like a very good idea to me! However, using this option causes a bunch of errors like this:
Failed to compile
./src/path/to/component/Component.tsx
Module not found: Can't resolve './__generated__/Component_field.graphql' in '/Users/me/path/to/project/src/path/to/component'
How do I use relay-compiler's --artifactDirectory option in create-react-app?
You can't. babel-plugin-relay/macro (or babel-plugin-relay) needs to be configured with the same option, or it will look for the generated files in a ./__generated__/ directory next to the source file. There is a description of how to do that in this stackoverflow answer, but configuring babel-plugin-macros is not possible in create-react-app.

How to properly add System Header Search Paths in Xcode

I'm having a problem getting the 'System Header Search Paths' in build settings to work in Xcode and allow me to use #import <Core/CoreBlocks.h> rather than a local copy and #import "CoreBlocks.h"
First I need to "frame" the problem.
I have built a framework that I use across many if not all my projects. This is Core.framework . Inside the framework is the requisite "Headers" directory and within that 40 other headers, all of which are included in the 41'st header Core.h
I drop the Core.framework into another project and the other project headers or source files then import:
#import <Core/Core.h>
and get all the functionality of the 40 modules in the framework. Works fine.
BUT, what I need is a simple way to run the 40 modules of Core.framework outside the framework construct, as a separate build or project, with just the source and breakpoints, so I can debug and enhance it.
I try to define the framework's source directory as a search path for the other project:
yet the compiler complains about the inability to find the headers in the source code:
is all I get for all of the imports even though they all reside in the lower Core directory below that path:
~/Development/Projects/Core/Core/Core/NSRange+Core.h
And that's where I'm at a loss. What am I doing wrong?
Found out why... Xcode for some reason can't use the *nix home directory notation in a pathname.
In other words while:
~/Development/Projects/Core/Core
does not work, the expanded equivalent:
/Users/BC/Development/Projects/Core/Core
does work in the Xcode system header search paths, yet it is not obvious as to why...

Xcode static file headers not being copied

I've been refactoring an existing app so that some of the objective-c can be re-used in a new app by creating a static library. I've never done this before so I followed the raywenderlich tutorial here
It all works OK except I don't get any header files in the products folder (as per the tutorial) This means that when I link the projects the compiler complains that the header files aren't found. My built project and the output folder are shown in the screen shot below:
I'm sure its something simple but I can't work out what I'm missing - any ideas would be appreciated

iOS UI Test Project 'MailCore/MailCore.h' file not found

I did a
git clone https://github.com/MailCore/mailcore2.git
I open the
iOS UI Test.xcodeproj
I run the Build
I get the error
'MailCore/MailCore.h' file not found
I cannot understand why that is happening.
What should I do to get this to build?
Some other sources I have found and followed their instructions are below. None of which fixed this problem.
https://github.com/MailCore/mailcore2/issues/316
https://github.com/MailCore/MailCore/issues/19
https://github.com/MailCore/mailcore2/issues/276
I also was able to open the
mailcore2.xcodeproj
and successfully build each of the targets. Which is interesting that I can do that but cannot build the test project independently.
I also followed the video and read me instructions to add to an existing project and was able to build until I added the
#import <MailCore/MailCore.h>
to one of my files.
UPDATE:
The above process I initiated on my iMac.
On my MacBook Pro after I cloned mailcore2 I opened
mailcore2.xcodeproj
first then did the build on each of the targets.
Then I closed that project.
Opened the iOS UI Test.xcodeproj and did a build on that.
This was successful.
However, I still want to know what would cause the problem with the "file not found"
UPDATE 2:
I removed to trash all mailcore2 code from my iMac.
I created different locations in Finder for doing another clone of mailcore2.
I did the git clone.
I opened mailcore2.xcodeproj
I followed the exact same process of building each target like I did on my MacBook
I then opened the iOS UI Test.xcodeproj and did a build.
I get the same problem of
'MailCore/MailCore.h' file not found
Makes no sense to me how it works on macbook but not on iMac.
You can add in target dependency static mailcore ios(mailcore2).
and add the framework libmailcore-ios.a
Its working.
What I finally did was drop mailcore2 into an existing app I already had started.
To do this I did the following:
I removed all traces of mailcore2
I again followed the instructions in the README and the video help.
This time I followed some instructions from
https://github.com/MailCore/mailcore2/issues/276
The instructions in that link says to add the following to Library Search Path:
$(PROJECT_DIR)/mailcore2/Externals/ctemplate-ios/lib
$(PROJECT_DIR)/mailcore2/build-mac/build/Debug-iphonesimulator
And the Header Search Path to
$(PROJECT_DIR)/mailcore2/build-mac/build/Debug-iphonesimulator/include - recursively
But, that did not work for me. I had to add the HARD CODED PATH to each of those 3 folders.
After doing a clean and build I was then able to add the
#import <MailCore/MailCore.h>
Now it BUILDs completely without error for me.
I will go back and try to add proper relative paths to each of those Search Paths.
Hopefully this helps somebody else with same issue.
FWIW
Had same problem, spend hours trying - nothing worked, not ever hardcoding paths.
Then I stumbled on one issue:
if in XCode\Preferences\Locations I go to Derived Data - Advanced and set it to different locations it always reverts it to Unique, when I go back and check it.
Then I went in File\Project Setting to Derived Data - Advanced and there it was set to Unique. I changed it there to Default and now it does not have that issue anymore!
I delete Derived data, clean project and Start build (Ctrl+B) and I can see now how Build is being created in derived data w/o problems. And that what mailcore needs to function.
And, I checked - no need for hardcoded paths either!
Hope it helps somebody.
PS Another feature maybe useful too - XCode\Preferences\Continue building after error though it did not matter in my case

"Installing" CoreAudio headers on Mac OSX

I've been at this for a few days now and I can safely say I'm stumped and haven't made progress on my own. I'm attempting to compile a project included in the XCode documentation (SinSynth) but every time I attempt to build it, I get errors upon errors about missing header files. "Okay," I thought enthusiastically, "Take a deep breath and let's use this as an opportunity to better learn XCode."
I looked at the paths the compiler told me it was looking for the headers in, added them, and then got more warnings because files needed to reference one another in the same folder (This files were not the missing header files - they were other files included that had definitions and what looked like boiler plate code). At this point I was a bit confused as to why the headers weren't installed in the first place. I uninstalled and reinstalled XCode but still had the same errors.
My question is where do I need to put the header files and cpp files included in the Audio Tools for Mac download? This is my first time having to break open XCode and add content, and thus far I've found no newbie-friendly tutorials to help me with this. To say it bluntly, I'm confused! What should I do?