I copied some .cn1lib files into my lib directory and refreshed it. But i'm not able to use these libraries.I am using Eclipse ide. What should i do ?
Is it related to codename one plugin for eclipse or specific to ide?
Check that you downloaded a valid file, the cn1lib should be a zip file. Its easy to verify it by copying it to the side, renaming it to .zip and checking that you can open it.
Also make sure you pressed the Refresh Libs option in the menu and not something else.
Related
I have a file ("static.zip") in the root directory of my react-native project that I'm trying to access it via the react-native-fs library. Given this example, I thought it would be as easy as this on iOS:
sourcePath = `${MainBundlePath}/static.zip`
RNFS.readFile(sourcePath)
However, the file does not exist on that path. When I look inside at the contents of the MainBundlePath directory, I don't see any assets in there. I also tried adding static.zip to my Xcode project, but that didn't seem to do the trick either.
Adding the zip file to my Xcode target got this to work, at least on iOS. I was unable to implement a require() solution I found here: React-Native: How to open locally bundled binary file
You should manually put the file in to iOS Resource by Xcode and Android Asset by Android Studio, then use this package to load file path https://www.npmjs.com/package/react-native-file-asset
I installed the braintree, and other, extension into my project in NetBeans. I no longer want to use the extension. There does not seem to be a way to remove the extension using the Settings tool. Removing the libraries from the project does not seem to remove the extension.
Remove the files with the name of the extension (cn1lib and the ver file) from the lib directory (you can see it in the files tab)
Open Codename One Settings -> Build Hints and remove the ios.* and android.* entries you didn't add manually
Right click project and select Codename One -> Refresh Client Libs
Was able to successfully resolve the problem using the supplied solution. I was not correctly removing the files from the project library.
I have downloaded and installed some cn1lib files, like the BarScanner or DropBox libraries. I copied the files into the "lib" folder in NB and refreshed.
But now I wanted to try the Connectivity library and there is no "cn1lib" file. Only these 3 files:
I read on a blog post that we can create the files using NB, but there are no walkthru tutorials anywhere
Question
Can anyone explain how we should do it? (please don't skip steps. I am not a professional programmer)
The cn1lib file should be in the dist directory of the library project since its the result of building the library project.
I am using Windows 10 and Eclipse Mars edition 32 bit. Programming in C
I am trying to learn C from a Lynda.com course C Essential Training. The course provides a zipped directory with many .c and files and a few others like .h files as you can see below.
However in the video he managed to get each .c file and related source code into its own directory structure.
I've tried numerous type of imports and I also used a batch file to put each .c file in its own folder and tried importing that. I was able to get the Eclipse IDE project window to look like the instructors, but as soon as I tried to compile individual .c programs the project kept looking in the primary workspace folder which for me is C:\Source\Testing\workspace and error'd out.
Is there an import option to create this type of subdirectory structure automatically? I want to go through the tutorial and build and execute each .c file individually. However what I have had to do is put the .c file into a single folder build it and run it one at a time. I then have to delete the source and debug folder and start over for each lesson. There must be a better way.
Eclipse workspace is streigh connected to FS.
This means that your workspace in Eclipse is a folder on your hard disk or where it is stored.
What you can simply do is to create a new folder using right-click-popup-menu within Eclipse Project Explorer and then copy/move files into the new folder.
Or you can create a new folder into your workspace directory and copy/move file inside, then you must refresh Eclipse workspace.
I have a project which I try to compile with Eclipse-CDT. The project depends on a library with header files and source files. How can I configure the project in Eclipse such that it will compile the needed source files from the library with the project?
With a makefile I use:
SRC+=lib_source.c
You can add linked source file.
Choose project properties and in the left panel choose c++ general.
Under it choose path and symbols.
Now in the right panel tabs choose source location and add linked source folder.
Include you need to define in "include" (under c++ build you will find settings)
Another approach is to use the operating system to add your libraries to the project. Eclipse then treats all source files (including library files) as part of the project, and therefore compiles any that need it even if they are in the libraries. This set-up allows keeping the library sources in a separate git repository from the project source code. You can record the git commit of a library to provide library version control so that improving the library in one project does not break all the others. The setup relies on the operating system's capability to link directories in a way that is entirely transparent to eclipse--in windows using the mklink command.
In windows the steps are
put your library files in a clean workspace not mixed with .git (you can have .git in the parent directory as egit sets it up)
use cmd window in administrator mode to add a link from your project directory to your library directory.
from eclipse press F5 t make sure your project matches what is on disk, then set up git to ignore your library directory.
set up your library file properties for read only access unless you are still tweaking that library.
set up your project include path to include the project sub-directory in your project.
I can't remember why I abandoned eclipse linked directories; i think it was that the includes kept breaking. The mklink approach has worked flawlessly so far.
I have a pdf tutorial of how to set this up--but I'm new to the forum and don't see how to attach a file.