How to Import a Project on ESP-IDF using VS Code - vscode-extensions

I have a project I have written, I was already able to compile at work. Now I am trying to compile the same project on my personal comoputer. It gives me a lot of include path errors. I know I have to change some things in the CMake file however I dont know what to change exactly. I have had problems importing projects from Git as well.
The Question is: How can I import and compile an existing ESP IDF project on VS Code?

Related

How do I import the flatlaf library to my project using intellij?

When compiling my main class I get this error:
Main.java:1: error: package com.formdev.flatlaf does not exist
import com.formdev.flatlaf.FlatLightLaf;
I have followed all the steps online, I have gone to project structure, libraries, "+", added the flatlaf.jar file and pressed on apply. I have also tried to revalidate caches. The JDK recognises the import of the library as well as all its functions as they all show up in the suggested and give no errors until you try to compile.
Make sure that you've added the library to the module dependencies.

Using the import statement. Which files is it importing from?

I'm trying to migrate my eclipse install from one workstation to another. I primarily work with Selenium, so I've copied my workspaces, imported the projects and imported the appropriate jars. However, I am still getting a lot of errors including some stating the import statements are failing to find certain packages.
Half of the errors cleared when I finished importing the last of the jars, but it seems like it's missing something. Basically guessing at this point, I right clicked my project and hit "build project", which cleared the import errors, but the rest of my code has errors indicating things are not imported correctly. I have a feeling the build path is still not configured correctly. Is there a way I can look at my old PC and see what files the import statement is looking for?
When you copied the files to another machine, and imported the project, some jars were not properly added to the classpath. So the compiler complained about not being able to find a class/package in an import statement. You can definitely have a look at the old work station, and look at the project imported jars. You can find those by:
Right click on the project in "Project Explorer", and select "Build Path > Configure Build Path".
This will give you an idea about what you are missing.
Alternatively, (if the libraries you are missing are third party), you can google the missing import statement, and get a clue in which jar (library) contains the jar, then download and add it to the classpath of the project.

Adding the I-CUBE-LRWAN library to a STM32CubeMX project

My team and I are currently working on a project that involve a ST board (the STM32L072CZYxx) to create a bidirectionnal GSM-LoRa gateway.
As we've already succeeded in implementing the GSM side of the gateway, we are currently working on the LoRa part of the project. To achieve this, we're trying to use the I-CUBE-LRWAN, but can't figure out how to add this library to the STM32CubeMX project. It seems like, this library can't be added to our project through STM32CubeMX. The only solution we have is to add manually the library to the project but we can't figure out how to do it. We imported the middlewares we needed into the project however, the IDE we use (Atollic TRUEStudio or SW4STM32) detects a lot of errors in the project and we really don't understand why (the source for middlewares were coded by ST, so basically no errors).
I'm guessing that is Murata LoRa Module. First time I tried that I was not able to add library to existing project.
There is some error that occur because of length of path names -on windows- you can copy and paste the project to shorten the path name and then i was able to program the module to use it as AT command slave.
And also there is 3 target project on that project file you need to select the proper target for it.

Having trouble importing RegexKit into an Xcode 4 project

I am using XCode 4, trying to import the RegexKit framework into my project so that I can use regular expressions for some text parsing code. The framework is installed by default into the /Developer/Local/Frameworks folder, and I was able to import it into my project via Project > Build Phases > Link With Binary Libraries and Project > Build Phases > Copy Files (although I cannot drag the added framework into the frameworks folder or it breaks, yay XCode 4...).
The trouble is, now that I seem to have the framework imported, I cannot actually use it in my code. The import statement should be (according to the documentation)
#import <RegexKit/RegexKit.h>
but that code isn't auto-completing and is being flagged as a file not found error. When I begin typing that line, I do get an option to auto-complete
#import "RegexKit.h"
but it too gets a file not found error. What am I doing wrong, this is driving me nuts!?!?!
Okay, I solved it. It turns out that you have to add the framework to the testing target as well (yeah I left out some key info there, sorry. The file in question was actually a test case). I hope this helps someone!

How do I use a dynamically load library in a command line utility? [duplicate]

This question already has answers here:
Closed 13 years ago.
Possible Duplicate:
using frameworks in a command line tool
Hey,
I've written a command line 'foundation tool' that uses the RegexKit.framework extensively. Everything works when run in Xcode but if I compile the release build and try to run it in Terminal I get the following error:
dyld: Library not loaded: #executable_path/../Frameworks/RegexKit.framework/Versions/A/RegexKit
Closer inspection reveals that the RegexKit.framework bundle is sat in the same directory as my executable file... I've done some research and I'm thinking that as command line tools don't use application bundles there's no where for Xcode to copy the framework to. So I'm guessing that I need to compile the framework as a static library and include it in my code... am I right? If so, how do I go about doing this? Is there anything I can do in Terminal to point to the framework externally?
Any help would be very greatly received, I've been banging my head against this for a few days now!
Thanks in advance,
Tom
So... What I did in the end was to recompile the framework with a different Installation Directory (in the Deployment section, under the Build tab in the Target's Info) - I set it to just #executable_path.
I then compiled the framework and replaced the one in my Utilitie's project, I also changed the Copy Files build phase to copy the framework to "Executables" rather than Frameworks.
The good news is that this fixes my original problem - but obviously the framework has to be in the same directory as the executable.
So this got me unstuck but I'd still love to know how to compile RegexKit.framework statically!
You shouldn't be installing the framework in the Executable folder of your bundle. It should be in the Frameworks folder. You need a Copy Files phase in your project that copies the framework and you need to set the Destination to "Frameworks". "Copy only when installing" should be unchecked.
When testing this, you should make sure you perform a clean build. I typically delete the build folder rather than using Xcode's Clean menu option since it's quicker and more comprehensive.
Also: you cannot statically link to a framework. If you want to statically link to something, it needs to be a static library so in this case, you'd need to hack about with RegexKit. Bear in mind that static libraries cannot contain resources, whereas Frameworks, being bundles, can.