How to access static library from the application in qnx660 - qnx

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)

Related

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.

Delphi 10.x "Cannot resolve unit name" for newly installed library

I encountered the following puzzling situation while installing a third-party library, in this case Virtual Treeview, which I will use as an example herein.
After following the installation procedure from INSTALL.txt, the new components appeared in Delphi's component palette, and can be added to a form.
However, building one of the supplied example projects, in this case "Minimal" fails, saying:
'Cannot resolve unit name "VirtualTrees" at line xxx', which is the uses statement in which VirtualTrees is listed.
Congruent with that symptom, in the source code editor, (uses) VirtualTrees, and subsidiary component declarations, were marked with red squiggles, indicating identifier undeclared or not resolved.
The supplied demo project was set to target Windows 32. But puzzlingly, if I switch the target to Windows 64, it will compile.
Installation consisted of:
Unzip the supplied zip file to wherever you locate source packages.
In Delphi, open the project group: File > Open .... VirtualTreeView.groupproj
Once loaded, in the project tree, right click on VirtualTreesD26.bpl > Install.
Add VirtualTreeView's "Source" folder to the Library Path, using
"Tools > Options > Language > Delphi Options > Library > Library Path > [...]"
What's allowing the IDE to know about the component, but then failure to compile for Windows 32, yet success for Windows 64?
Each target has its own library path. You have added the VT paths to the Win64 target, but need to do the same for the Win32 target.
Alternatively, remove the VT paths from the Win64 target search path, and add them instead to the target that applies to all projects, and then they will be inherited by the other projects.
In the options dialog there is a drop down control that allows you to specify the target to which your settings are to be applied.
The short answer is that the Library Path was not set correctly. And credit to David Heffernan for pointing that out.
But how and why?
The key piece that I missed was that the Library Settings dialog captures different sets of paths applicable to each of the different platform targets. So at the top of the Library Settings dialog there's a "Selected Platform" dropdown that governs which platform the settings beneath will be applied to.
To be able to build a Win 32 VCL application, the Library Path needs to be set specifically for Windows 32, which means setting the Selected Platform dropdown to Windows 32 before performing the step of adding the path to Virtual TreeView's Source directory.
Obvious in retrospect, and perhaps this SO post will help connect "Cannot resolve unit name" to this potential cause.
There are a couple of gotchas to add regarding why this happens.
a) Users coming from older versions of Delphi may be familiar with this Library Settings dialog before it handled multiple platforms, thus not realize that it now has a "Selected Platform" feature.
b) On my installation of Delphi 10.3, which is a fresh one, that "Selected Platform" dropdown reverts to Windows 64 every time you open the Library Settings dialog. It neither coordinates with the platform of the currently open project, nor does it remember what you last set it to, it seems. So it's easy to miss that it's not set to the platform you assumed, unless you know to look explicitly.
It may also be useful to know that while this functionality sets the library path for the entire Delphi installation ("globally"), there are overlapping settings at the project level, accessed as follows (for the example "Minimal" project):
Project tree, ProjectGroup1 > Minimal.exe > Build Configurations > Right-click > (Project options dialog) Building > Delphi Compiler > Target (All configurations, or particular target) > "Search path" slot.
Delphi apparently merges "Search path" with Tools > ... > Library settings > Library path.
Finally, for Virtual Treeview, its maintainer Joachim Marder has added a note to the installation instuctions to avoid the pitfall described here.

XCode framework/library development workflow

I'm new to OSX/iOS development and I'm developing a library project (Cocoa Touch Framework) for iOS. While working on the library I would like to test changes to the code, but because it's a library, I can't run it straight away from XCode and view it's output. What I'm used to do in other platforms, (Windows for example) is to create a another project under the same solution (Visual Studio), add the library to this project and write my test code there. Unfortunately I didn't find a way to do something similar in XCode, my workflow now consists of quitting/opening two different projects, copying frameworks around and re-adding framework dependencies.
Surely there must be a better way to do this...
There are lots of post already in the SO .
But keeping it simple just follow these steps :
1.) Drag and drop Xcode project to your Xcode project 2.) go to build phase and then select your project (which u have imported ) to target. 3.) Search path - > user header search path (select your library) and also enter other linker flag.
Simple !
Is't exactly the same in Xcode :)
If you have a project (without a test build accompanying it) is:
1) See, no test Target :(
2) Click on the target that you want a test environment for (in my case, locates) so it's highlighted.
3) Click on the "edit" menu, then pop down to "Conver to" then "XCTest"
(yet another one of Apple's ambiguous places to hide things!)
Follow the wizard and that'll create you an XCTest build target that can be run on demand and through CI.
Have fun!

How to debug library in Xcode 5?

I am new to Xcode and Mac world. I usually work in VC++ using Visual Studio. As in Visual Studio, we can attach a process to .lib or .dll code, is there any way to attach process and debug library (.a) code in Xcode?
Regards
One way is to add library XCode project inside the application or use the library source files inside the application. This requires the availability of library source files. Also make sure to use debug mode in XCode.
You can use the Menu option File -> Add Files to option to add files to XCode project.
Create an Workspace (https://developer.apple.com/library/ios/featuredarticles/XcodeConcepts/Concept-Workspace.html) and add the Library-Project and your Project to it (Drag & Drop). After some configurations (Youtube is full of tutorials) you can set breakpoints in the library code.

Add project dependencies in Xcode

I am working with the AR Drone to develop new application.
I want to establish a dependency between two projects. So when I compile one, I hope Xcode will help compile the another one automatically. I had searched with Google for this question. The solutions found are quite old and not applicable for Xcode 4.
Right now, I have two project, namely, ARDroneEngine.xcodeproj and FreeFlight.xcodeproj.
ARDroneEngine is a library for FreeFlight. Here comes the screenshot.
If I compile FreeFlight with iPhone / iPad simulator, it is fine since the ARDroneEngine is last compiled with the same setting. This is where the question lies. To test my application, I want to compile and run FreeFlight in my iPhone. So when I change the setting to "FreeFlight > xxx's iPhone" and compile, the error occurs: "Apple Mach-O Linker Error".
I think the problem is rooted from the Target Dependencies between two projects.
A quick workaround will be: Compile the ARDroneEngine again with the new Scheme "ARDroneEngine > xxx's iPhone" and launch FreeFlight in Xcode for my iPhone.
But I want a more complete solution with the dependencies between projects. If more information is required to solve the problem, I can always provide new info.
Thanks,
Steven
Xcode's solution to cases like this is to use a Workspace that encompasses both projects: then, when one project has a target that references the build product of another, it automagically works out the dependencies and builds them in order.
Create a new Workspace (File > New > Workspace); name it and save it anywhere you like (though putting it in a parent folder to both project directories might be a good idea).
Add both projects (drag the xcodeproj files from the Finder into the navigator pane, or use File > Add Files).
Expand the Products group of your library project so you can see the (placeholder for the) built library (libARDroneEngine.a).
Select the app project (FreeFlight) in the navigator and its app target in the editor -- you should be looking at the Summary pane for the target (the one with bundle identifier, deployment info, entitlements, and most importantly, the "Linked Frameworks & Libraries" list).
Drag the library (libARDroneEngine.a) from the navigator (where you made it visible in step 3) into the Linked Frameworks & Libraries list.
That's it! Now you can choose the FreeFlight > xxx scheme and it'll automatically build the library project before building the app.
You can probably get a more complete summary of these instructions (with screenshots and all) in the Xcode help for Workspaces.

Resources