New to Android, trying to follow the training tutorials step by step, but riddled with errors, what a mess!
First stumbling block on:
http://developer.android.com/tools/support-library/setup.html
The instruction to add the library reads:
Quote:
"Add the library to your application project:
In the Project Explorer, right-click your project and select Properties.
In the category panel on the left side of the dialog, select Android.
In the Library pane, click the Add button.
..."
There is no Add button to be found in the Libraries pane in the Java Build Path, but several Add Jar, Add library and other buttons, none of which will solve the errors in Mainactivity.java.
After looking around I found that opening the Projects pane and use the Add button there resolved the errors and I could run the app. However getting problems in the next steps...
Related
I had to do my homework with c programming in codelite. Just like codeBlock and Dev-C++ which give user to run multiple console program in the same folder, however, when I run it on codelite it fail.
I have create different workspace folder or even different project.But when I try to build it, only the first c file get to build but not later created c file.
May anyone please help me on this issues?I just want to rum multiple program in codelite just like code block.
Hitting F7, builds the active project (the project with a bold text in the workspace tree view).
To change the active project:
Double click a project, or:
Right click a project and select Make active
To build all the projects in a single click (Default key: F7):
Add new project to the workspace
Right click it and select Build Order
In the dialog that pops up, click on the checkbox near each project
Build the dummy project (make it active as described above) and hit F7
OR, build the entire workspace (Ctrl-Shift-B):
From the menu bar select Build -> Build Workspace (default key bindings: Ctrl-Shift-B)
To execute a project (default key binding: Ctrl-F5):
Make the project active by double clicking it
Hit Ctrl-F5
NOTE:
All keybindings can be changed from Settings -> Keyboard shortcuts
HTH,
Eran
Id like to know the process to link the Wincap library and use it in my c++ project im developing in Code Blocks.
After struggling to do this myself I figured that I should post my solution here.
You will need to download the developer version of WinPCap and unzip it somewhere, lets say "C:\WpdPack_4_1_2".
In Code::Blocks, you need to add the "Include" sub directory to the search directories. To do this, go to settings->compiler and click on the "Search directories" tab. For the "Compiler" "Linker" and "Resource compiler" tabs you need to add the search path. Using the location above as an example, it would be C:\WpdPack_4_1_2\WpdPack\Include.
Once these have been added, click "OK" to return to the main screen.
Then, you need to add the library file to your project build settings. To do this, right click on your bolded project name on the left side and choose "Build options". Under the "Linker settings" tab add the path to the "libwpcap.a" file.
For example, it would be C:\WpdPack_4_1_2\WpdPack\Lib\libwpcap.a.
After I did this, the example programs compiled fine. Make sure to add the #include "pcap.h" in your program to use the library.
I am facing some problems regarding eclipse for c/c++. I am trying to create a new project, I provide the code, and after running the code I get this error:
The program file specified in the launch configuration does not exist
C:\Users\elisabeth\workspace\mm\Debug\mm.exe not found
Please notice that I am working with spice toolkit; I set the path for the "include" files and the libraries, but still I can not have a result.
What causes this error and how can I resolve it?
Right click on your project --> Properties
Run/Debug settings
Delete whatever is set as "launch configuration for '........'
Project --> Clean
Project --> Build Project
You can create a run configuration. Go to Run > Run Configurations. Click New button, fill C/C++ Application field, i.e., insert path to your executable. The new configuration will appear in the list which appears when you click to the arrow next to run button.
Of course this assumes your can build without problems, otherwise you won't see an executable to point to.
You can clean the project, build it again and run it as a local C/C++ application. Simplified steps as follows,
Right click on the project
Clean Project
Again Right click on the project
Build Project
Again Right click on the project
Run As ->
Local C/C++ Application
As the error reads:
C:\Users\elisabeth\workspace\mm\Debug\mm.exe not found
First of all you need to check whether there is an executable "mm.exe" in your Debug folder. (Of course, it is not there and that is why the error)
Go to Project > Clean
and you should see some files being deleted from your Debug folder
Go to Project > Build Project
and you should see some new files being generated e.g. mm.d, mm.o, mm. This "mm" is probably the executable you're looking for
Now that you know what your executable is, you should tell eclipse what file to execute instead of mm.exe. Go to Project properties and in run debug settings create a new configuration (or edit an existing configuration, if there is one already). In this configuration, in main tab, in C/C++ Application specify a full path to "mm". Which, in your case is - "C:\Users\elisabeth\workspace\mm\Debug\mm"
A better way to do this in eclipse is:
${project_loc}/"your folder"/"your executable file"
e.g.${project_loc}/Debug/mm
what worked for me is file->refresh
then do the Debug configuration again by choosing the right c/c++ binary again.
Avoid troubles with configuration by going into Project properties > C/C++ build > Refresh Policy and specify your project folder. The configuration option "Search project" will show a correct folder then and you will see whatever you build there - Debug, Release or both. You don't want to specify the folder using Browse option every time you import project or switch configurations.
As this is the first SO discussion that appears for this topic on Google and none of the answers solved the problem my students were having, I would like to mention the solution we eventually found from this answer:
Open project properties (Right click on your project, choose Properties on the menu)
C/C++ Build -> Settings
Click on Binary Parsers tab and check PE Windows Parser
Keep clicking Move Up until it is at the top
This had been set to Elf, even though we were using a freshly downloaded Windows version of Eclipse.
sometime missed closing curly brace can be part of a problem. Make sure prototype your function at the beginning of the file. Then right click your project in the left side bar. click clean project. then click build project and finally run project
I encountered similar issues and their related problems a few days ago. Finally, I found out that, just because I had moved my project folder (workspace folder of Eclipse) to another place so Eclipse could not find what its need as usual.
Solution: I just set the workspace to my new place (Hey Eclipse, my workspace now is here) :
Menu "File" -> "Switch workspace" -> "Other..." -> click "Browse..." button and point to new place then click "Select Folder" button and click "Launch" button.
Nice day.
I have a few c++ Xcode 3 projects which I need to move to Xcode 4. I have done this by simply renaming the Xcode 3 folder, loading the Xcode 3 project in Xcode 4 and then hitting the modernize button. In the case of some of these projects I cannot build them because the Xcode 4 "Build" and "Clean" menu options are disabled (they are all static libraries so there is no question of running them). I have added some of these ported Xcode 4 projects into an Xcode 4 workspace where they build fine as part of building the entire workspace contents. None the less I will probably need to build these projects independently as well. Any ideas?
Thanks,
Barrie
I was getting the same problem with an Xcode 3.2 project when loaded into Xcode 4.2. What solved it for me was changing the "Schemes", which is Xcode 4.2 for "Project Settings." They seem to interpret the settings files a bit differently.
Go to Menu: Product -> Edit Schemes. Note which library is selected in the pulldown menu along the top of the new dialog. You'll probably need make this change for each library. Mine defaulted to all boxes checked & I left it like that.
Click to see Scheme build panel
Along the left column, expand the "Build" block. Select "Build" from Pre-Actions, Build, Post-Actions. Now in the larger right block, you'll see a build target (possibly in red, mine all were).
Click the "+" button at the bottom of this block; it should bring up a list of targets. Select the one you want to build for this library and click "Add". Now you can select the old invalid target and click the "-" button at the bottom to remove it. Click "OK".
After fixing one of these targets, "Build" and "Clean" should become enabled when that fixed library is selected as your current scheme in the upper-left of the main window.
If you have a master project, you want each sub-project set up as a dependency of the master project too. Xcode 4.2 also missed this from the Xcode 3.2 project.
On the main window, bring up the Project Navigator (leftmost icon above left column) and select your master project. To the right, select the target. To the right of that, on the top select "Build Phases." You should get a list below that for your current dependencies. Click the "+" button at the bottom again to add the targets from each project.
Click to see Target dependencies dialog
How do you add Lapack libraries to Code::Blocks IDE on Windows?.
The files I have are these: (Victor's Compiled binary libraries for Windows on this page:
http://www.stanford.edu/~vkl/code/libs.html)
lapack_win32.a
lapack_win32.def
lapack_win32.dll
lapack_win32.exp
lapack_win32.lib
How would look like a simple example in C/C++ using the dynamic library?
Do I use #include <lapack>? or how?
First assuming you have installed these libraries in C:\LapackLib.
Click on the Settings Menu and then select the Compiler menu item.
From the Compiler Settings Dialog select the Directories Tab.
Click the Add button.
In the window that pops up type in your library path in this example it is C:\LapackLib\.
Select the Linker tab
Repeat steps 3 and 4, then press the Ok button to close the Compiler Settings Dialog
Right click on your project name from the Treeview on the left hand side of the screen, it will in bold.
From the popup menu select the Build Options menu item
Select the Linker tab
From the Link Libraries window, click on the Add button. Select the path to your library from the File Dialog, in this case it is C:\LapackLib\lapack_win32.lib. Then press the Ok Button.
In your source code add the relevant include declaration
e.g. #include <lapack> or #include "lapack.h"
For further information see the following tutorial or the CodeBlocks manual.