Eclipse does not seem to recognize Native Android code - eclipse

I am trying to learn about native Android, using NDK.
I find some sample projects in NDK folder and on the Internet. After much configuration, they are runnable.
But, my problem is: when I open a .c or .h file in JNI folder with Eclipse (just want to see what it is), Eclipse shows many error in this file. For example, it don't know what is JNIEnv, jobject, jstring.
I haven't made any change in the project, just opening it. Errors mean I can't rerun it again except if I delete it from the workspace then reimport it.

Eclipse does not work well with C/C++ files. At least, for me it did not.
After some search, I have managed to configure Code::Blocks to support NDK, please see this answer to the question:
Need a simple Linux C++ IDE (Android NDK) .

Related

How to migrate eclipse project to atmel-studio?

I want to migrate the project in atmel-studio from eclipse cdt, as I started working on an embedded c/c++ project I understood that atmel-ice is not debugging properly in eclipse it's just helping me to flash firmware nothing more than that. So, Want to migrate my whole project to atmel-studio. So, I could debug it. Looking for help thanks.
As an option, look into the atmel-studio capability of debugging an externally produced elf. The tools I've used (keil, tensilica, IAR) all had ways to make a project that could debug an elf file produced externally. You may lose some magic like source parsing/intellisense or whatever, but I've found source line debugging works just fine.
I've never used Atmel Studio, but in searching the web, I found:
http://ww1.microchip.com/downloads/en/devicedoc/atmel-42167-atmel-studio_user%20guide.pdf
http://atmel-studio-doc.s3-website-us-east-1.amazonaws.com/webhelp/GUID-ECD8A826-B1DA-44FC-BE0B-5A53418A47BD-en-US-5/index.html?GUID-4C53CCC3-659D-4030-A7FD-566B19C87747
Both of which say "File->Open Object file for debugging"

How to convert cocos2d-x android project to c++ in eclipse ADT

Hi I'm fairly new with Eclipse. I'm trying to work on my cocos2d-x project on Eclipse, but for some reason I couldn't convert the android project to a c/c++ project and so I couldn't open the c++ files inside the Classes folders as you can see on the image here.
cocos2d-x: cocos2d-x v3.0 alpha0
eclipse: (ADT)Android Developer Tools - Build: v22.2.1-833290
os: windows 7
What I did:
ran create-multi-platform-projects.py in cmd
opened eclipse(ADT) then File->New->Other->Android Project from Existing Code->browsed to {cocos2d-x v3}/projects/mygame/proj.android
built the project.
tried to convert the project. Right-clicked project->New->Other->Under C/C++ tree, select Convert to a C/C++ project (Adds C/C++ nature)
but then the candidates for conversion is empty, meaning I couldn't convert my project to c++. I have installed the C++ plugins as seen here. Obviously I'm missing something here but I can't figure out what. I've been following tutorials on setting up cocos2d-x android development on eclipse windows os but I'm stuck with the converting to c++ step. Please could someone point out what I'm missing. Thanks in advance.
It will already be having c++ nature, so it wont show you that option (You can verify this by checking if you have C/C++ build in your project properties)...
You can open the cpp files by adding a reference to the source folder, to do so follow the below steps:
Right Click your project and select properties
Goto Resource->Linked Resources
In Path Variables Tab, Click New...
Give some name and choose the folder where you have your source code
It will now show a link to the source code folder in the project
Here are one by one steps, You may setup easily!

Eclipse doesn't recognize lua files after installing the lua plugin

I downloaded Eclipse Classic off of the Eclipse website then the Lua Eclipse IDE plugin. I followed the install instructions but Eclipse doesn't seem to recognize or be able to understand lua files. Can someone help?
Sounds like your file types aren't associated. Click on Window/Preferences and select General/Editors/File Associations.
Add more information
Which installation guide did you follow? (Lua Eclipse Installation?)
Which OS (version)?
Which java version? (Which implementation)
Which eclipse version?
I love these kind of questions because they provide an opportunity to do a test I postponed until now...
So I downloaded the plugin package, and followed the instructions: closed Eclipse, put two jar files in the plugin folder, put the open-ldb.exe elsewhere, restarted Eclipse.
I created a generic project, added a generic file linked to an existing Lua file. When I opened the file, it was automatically identified as such, with a moon icon and correct syntax highlighting.
Using Eclipse 3.5.1 on Windows XP, BTW.
Now, I have an issue, the debugger won't start for me, I get a
Unable to connect to PDA VM
Connection refused: connect
error, not sure why (path to exe file is correct, I have another error when it is wrong).
But at least I have the Lua files recognized without problem.
I think you might want to check that in Preferences > General > Editors > File Associations, *.lua is defined and associated to the Lua editor.
Instead of opening a File you have to do the following:
Open a new LUA project.
Then import using 'File System' all files (resources and LUA files) into the project.
Now you can see and edit the LUA files. Don't know why it doesn't work by simply opening a LUA file directly.

Completely lost with Blackberry JDE for Eclipse

I'm serious. I installed the Blackberry web developer thing for eclipse (being stupid, and not seeing the 'web' part). Then, when I realized my mistake, I went and got the JDE for Eclipse. I went through the install process....open up Eclipse...and I'm lost. I don't know how to run code...or the simulator, or anything.
All the tutorials I'm finding are referencing an older "beta" version of the Eclipse plugin, which apparently had a "Blackberry" menu option. I'm not seeing that.
I found some sample code, which gives the helpful instructions:
"1. Extract HelloWorld_incomplete.zip
2. In the IDE, open the helloworld.jdw workspace
3. Open the helloworld.java source file.
"
...I've never seen a .jdw file before. If I try opening it in Eclipse, I get a not-very-useful text file. Since they say it's a workspace, I try the "Switch Workspace" option in Eclipse, which lets me pick a folder, rather than a file.
I'm pretty sure "Import Project" isn't right, either.
So, I figure I'll deal with that later, so I open up the source code (a standard .java file, with a main, etc). I try running it, but it asks for an Ant build file.
I can run standard Java files just fine (that is, I know Java is in my path).
I don't know if maybe I don't have the Blackberry part right...or if it's on the eclipse side where I'm failing.
Does anyone have any ideas?
-Jenny
Edit: Just to be sure, I tried downloading the plugin through eclipse with their provided link (http://www.blackberry.com/go/eclipseUpdate), but eclipse says that it got a .jar file when it was expecting a .zip file, and so it errored. Can you even unzip a jar file (like Eclipse is trying to do?)
It sounds like you have the wrong package.
I installed it yesterday from the "Download Now" button at http://na.blackberry.com/eng/developers/javaappdev/javaeclipseplug.jsp
and it had both the menu option and the Blackberry project type.
It should have an installer if you get the correct one. I would post a direct link, but RIM likes to ask for your info before allowing the download.
Try installing it to a different directory and using a new workspace. It could be that the old install is interfering somehow.
-Hope that helps
if you want to know step by step to install the jde plugin in eclipse you can visit http://learn.virtue-software.com/2011/05/quick-start-creating-blackberry-application-with-eclipse/

Why am i not able to link my C/C++ libraries with NetBeans?

I've downloaded C/C++ libraries from Cygwin, and set the environment variables according to the instructions here, in NetBeans.
I've also gone through this.
Actually I followed the same steps on a different machine and everything worked out fine.
But on my machine the associations aren't made.
for example: #include<stdio.h> says No such file or directory.
Any idea what the problem might be?
The Cygwin package I downloaded is also fine, I downloaded it twice.
If it's complaining about a #include, that's a compile issue, not a linking issue.
What happens if you create a new C/C++ application project and try to build it?
In the Build node of the project properties, is the correct Tool Collection selected? (Cygwin in your case). And the Tools -> Options, on the C/C++ tab, is that tool collection set up correctly?
You should check whether you have a file c:\cygwin\usr\include\stdio.h.