How can I install libraries in atom?

#1

I want to install the SDL 2.0 library in atom but I coldn’t figure out how.
Any help is much appreciated :slight_smile: thank you!

#2

Atom is not an IDE and does not have native support for libraries from any language, so there is no installing them. You just have to include them in a folder somewhere and point to them in your code.

#3

i downloaded SDL externally but how do i use it. when i simply put #include<SDL.h>. i get error message saying file not found.

#4

That’s not an issue with Atom. Your C compiler determines what directories are searched for library and include files. You may need to add a flag to your compile command: -I <directory containing SDL.h>

#5

@alflanagan could you please describe everything I’ll need to right pls? Sry I’m completely new to coding.
Thanks in advance :pray:

#6

That’s a very broad question. You should provide more details about your personal situation and what you’re looking to achieve.

#7

I have the mks gen l with the tmc2130, I want to include the library I downloaded for tmc, I read the question above and your answer but I’m a little confused

#8

It might be wise to take a step back and think about what information we need to know to help you. From Googling “tmc2130”, I can surmise that you are using a stepper motor, and tmc is the library? Are you writing code for an Arduino? If so, do you have a package that you use to allow Atom to interact with your board?

#9

Yes that’s correct, I’m trying to contact an Arduino board to a 3d printer with those stepper drivers, the marlin software I’m using needs a library which I downloaded from GitHub but don’t know how to include it

#10

Yes I do, it’s already running but the current received by the motors is too low because I’m missing this library

#11

@Of3d:
Hello.

Your progress might be better with PlatformIO.

My investigation was only on the surface and not with actual hardware. But a library import was handled impressively well with a library manager which is part of their add-on.

A problem though - PlatformIO now prefers Microsoft’s Visual Studio Code (vsCode) more than Github’s Atom. I have loaded their add-on to vsCode and I am positively surprised on what is offered.

Short version - go to platformio.org and do some small study on what they offer. Consider using vsCode. Consider seriously to asking questions on PlatformIO’s forum.

Regards.

#12

I’m opening Platformio in side Atom, I’ve followed few guides, the only thing I’m missing is to include a library (which I downloaded) I don’t know what line or lines should I right in code

#13

That’s purely a PlatformIO question, and not something we can answer here.

  • You want to know how to change the editor text colour? We have your answer.
  • You want to know how to import a library in a language? You’ll need to ask people who know and use that language.
1 Like
#14

Right, sorry then

#15

https://docs.platformio.org/en/latest/librarymanager/index.html

https://community.platformio.org/t/help-platformio-libraries-for-dummies/7027
(the title of the post is not aimed at you! :blush:)

1 Like
#16

The syntax for include statements absolutely doesn’t change while you’re working in the same language. What you need to study and learn is where your chosen compiler stores libraries and/or how to run the library manager. I haven’t used it, but it looks like PlatformIO has a pretty good manager and you should use that.