Ada - GNAT GPS IDE not binding and linking - binding

I'm trying to learn Ada from Wikibooks. I've downloaded and installed GNAT GPL 2011, created a project in the GPS IDE which comes with it and written an example hello world programme.
The problem I have is that the GPS IDE doesn't bind and link my programme. From here I've found out that gnatbind and gnatlink must be run after gcc. If I do it manually from the command line, the build succeeds and an executable file is correctly generated. But if I click "Build All" in GPS all I get is
gnatmake -d -PD:\path\to\project.gpr
gcc -c -I- -gnatA D:\path\to\hello.adb
[2011-06-23 13:05:17] process terminated successfully (elapsed time: 00.35s)
and only *.o and *.ali files are generated.
How do I make GPS bind and link my app?

In the Project menu, select "Edit Project Properties". Click the "Main Files" tab. Click the "Add" button.
You'll see a list of the files in your project.
Click the checkbox of the file that contains your main procedure. Just highlighting the line with the filename isn't enough, you have to check the box.
"Okay" your way out of the dialogs.
Now you can build by pressing F4, clicking Build/Project/Build All, or clicking on whichever of those icons is the "Build All" one.

You have to tell GPS (or rather gnatmake), which file should be considered the main routine.
This is done in the gpr-file with for Main use ("foo.adb"); or via the project properties in the tab "Main files".

Click F4.
That should be the shortcut to "Build Main Number 1". Check your shortcuts in Edit/Key shortcuts/Build
Good luck!

Related

How to export/get xxx.framework by using Xcode 11.4?

Before Xcode 11.4 I built project and I also could found xxx.framework in the path of xxx/Build/Products/Debug-iphoneos.
After using Xcode 11.4, I can't found any xxx.framework in that path.
I have seen the link, How to archive/export Framework in Xcode? I follow the step to get the framework but Xcode 11.4 doesn't.
Does anybody know how to get the framework by using Xcode 11.4?
Here's two methods.
Method 1 (The method you say is not working for you but most popular):
Clean your framework (Not necessary but good practice)
Shift + Command + K or Product > Clean Build Folder (Some ask: where is this Product. Just hover your mouse at the top of the screen whilst in Xcode, you'll see it there.)
Build your framework
Command + B or Product > Build
Export/Extract/Copy your framework
On the left panel of Xcode (Where you see all your folders and swift files), expand the folder that's named Products (tap on the little white arrow next to the folder Products to expand it and see its contents.)
Once you expanded the Products folder, you should see a very good looking framework staring right at you. The name should look something like this YourProjectName.framework
Now to finally answer your question - HOW TO EXPORT THE FRAMEWORK...well right click on the framework (the YourProjectName.framework) and click on Show in Finder.
Once you clicked on Show in Finder, you'll see your YourProjectName.framework folder. Yes yes, it looks like a normal folder. That's because it is. Everyone just makes it sound fancy.
And there you go. You can then just drag that fancy-ish YourProjectName.framework folder into you project.
Method 2 (Here I'll assume you already read method 1 so I'll explain with less detail):
Clean your framework (Not necessary but good practice)
Archive your framework
Product > Archive (Don't be surprised if you wait a couple of seconds for it to archive.)
Once it's done archiving. You'll see it opens a new Xcode like window. If you don't see this window, it means you were busy with other stuff on your mac at the time it finished. Don't worry haha, just look around on your mac until you find it. If you still don't find it, chances are the archiving failed. If it failed, Xcode will give you an error log. Read it, fix it, try archiving again.
Once it finished archiving and you see the Xcode-like window. Your archive will be highlighted. It just shows its selected.
Export/Extract/Copy your framework
Right click on the archive and say Show in Finder
The finder will open and have your archive selected.
Right click on that archive and select Show Package Contents
The finder will open your archives contents.
Navigate to your framework which is located under Products > Library > Frameworks
There you'll find your YourProjectName.framework folder. select that folder and drag it into your project.
If none of the above methods worked for you, I guess it opens the opportunity for you to find another way. When you do, come back to this answer and add your method so we all can learn.

Vivado: after Tools->Create-and-Package-New-IP what to do components.xml output?

Let's suppose you have a non-axi bus RTL core of verilog or vhdl files, and add them to your vivado project, and sucessfully compile the rtl source files using synthesis and taking care cancel and not run implementation stage.
Now I try to package all the verilog or vhdl into an vivado user IP using the vivado menu:
Tools->Create-and-Package-new-ip
Packaging Options: Package your current project using the project as source for creating a new IP definition
All it does is create a directory with a copy of all by verilog or vhdl source files in a directory with a "component.xml" file.
How to even use this component.xml file???
I create a new project... there's no where to even load the "component.xml" file into vivado so i can find the IP core in the IP integrator menu when making a block design??
I want to create IP cores have them nicely wrapped in separate vivado project, and then import them into a freash new project that contains only a block design. vivado seems to not like this flow... any ideas how to do this?
(I don't know... I just think there's something half-baked about the way this works in vivado...)
I just found out I need additional step for it to be seen in current project:
1. Goto Sources window
2. click Hierachy tab
3. select click IP-XACT->component.xml
4. double click IP-XACT->component.xml
5. scroll to bottom of "Package IP" window
6. click "Re-Package IP" button
7. Now it will show up under: IP Catalog->UserIP->corename
Still not sure how to get this to show up in a new project.
I found out how to import an already created components.xml into a clean project:
In vivado:
1. File->Open-IP-XACT
2. Select components.xml
3. This will open Package IP directory
4. In this window under "Review and Package" scroll to bottom
of Review and package window and click "Package-IP"
Now it will show up under: IP Catalog->UserIP->corename
One would think this would show up under the "+" button for adding "things" to your project... but no... its under File->OPEN-IP-XACT menu.

Is it possible to script adding a directory of source files into an Xcode project for compile?

As part of our Unity build process we drag and drop a directory of C source files which are generated by the Unity IDE into our iOS Xcode project. We want Xcode to "Create groups" for the files because the header files don't seem to be recognized by the compiler when using "Create folder references".
I'm wondering if there's a way to script this so we don't have to manually drag the directories into Xcode each time. Adding a "Copy Files" build phase only seems to work if I choose "Create folder references". When I choose "Create groups", the "Copy Files" section remains empty. Is this a bug in Xcode or am I doing something wrong? I'm using Xcode 9.1.
I know Apple recommends creating a framework rather than copying in a directory of source files. The reason we can't do that is because we're relying on the Unity build process which gives us a bunch of C source files.
In Xcode, you can manage your build process under the "Build Phases" tab when you select your app target. These tasks are executed on each build of your app, unless specified otherwise by some phases (for example: you can choose to run a phase only when the app installs for the first time).
Click the + button and you can add a "Copy files phase" that will copy your selected files into the app. When adding the files you'll be able to select if added folders will create groups or folder references.
You can also add a custom "Run script phase" and write some bash code to do whatever you like, or even run an external script that will do more complex work.
Xcode makes it possible to script adding resource files such as images to the project file using the "Build Phases" tab however this does not work for source code files that need to be recognized at compile time. Luckily I managed to come across a nice community-developed Python script which does allow us to do this.
https://github.com/kronenthaler/mod-pbxproj
With this script we can make all sorts of modifications to the project file including adding or deleting files.
See this link for a full list of available operations:
https://github.com/kronenthaler/mod-pbxproj/wiki
xcode->Build Phases-> click (+) button -> New Copy Files Phase / New Run Script Phase

How to access static library from the application in qnx660

I have installed qnx660 in Ubuntu 14.04.
1-I have created a test project hello world for application.In Build variant option i have selected x86 variant. While building the project there is no error message in the console. After building the project in side the work space for x86 its creating both o and o-g folder. But when trying to run project as C/C++ QNX Application some error like "must select a target". So please suggest me how to resolve this issue.
2- I have created two project one for application and second for shared library. From application i want to access API which have to define in the library. But i am not able to write anything because there is no .c file to write. In library project only Makefile and comman.mk is available. So please help me to solve the issue.
Right click on your project.....then Properties -> Qnx c/c++ project -> Build variants TAB. You must check platform and build variant (release or debug) . Please, see image
then open Debug Dialog and choose Qnx target. Press bug image and choose "Open Debug Dialog"
In the Debug dialog choose Main tab and in the bottom you must choose Qnx Target. I attach screenshot.
For your second question.....simply Right click on your progect , then New->Header File (or Source File)

Link the open file to file system tree in c9 IDE

In C9 IDE, when I open a file, is it possible to expand the file system tree to that file.
I need something similar to "Link with Editor" button of Eclipse.
Yes, use Cmd-Shift-L on a mac (I think it's Ctrl-Shift-L on win/linux). There's also a setting to do this automatically as a tab becomes active. You can also right click on a tab and choose "reveal in file tree"

Resources