How to make atom the default program when opening .cpp files? - default

I just started using ubuntu 16.04 and I want to make atom my default program when working with .cpp files but I don't know how to yet. For example when I click on a .cpp file in one of my folders I want it to open with atom instead of with gedit.

Open any directory with the file type .cpp in the file explorer, right click on the file and go to properties, there you will find a tab open with. In that tab choose the application you want to open that type of files and hit "Set as Default".

Related

How can I restore the old STM32 files to new

There is a TrueStudio project which is written in 2014. How can I use this project? I can show main.c file on STM32IDE but IDE can not see headers and another files. All file locations are different. Is there a program for this?
There is a very simple way.
Create new project for your uC
Delete source files
Paste in the project explorer files from your old project:
3.a in windows explorer copy the whole project tree to the clipboard
3.b paste it into project explorer.

C Code How to add sounds to .exe using resource folder?

I am using windows, codeblocks. I have managed to include an icon for the exectable using a .rc file and including it there using this line of code:
MAINICON ICON "trees_XZ1_icon.ico"
How to do in the same manner with a .wav file (sound)?

How to use C file in Ubuntu

I'm trying to get this https://github.com/TheCacophonyProject/voice_scrubbing working on my ubuntu. I've managed to 'make' the thing using
make
Go me!
But I don't know how to insert any files into it.
I'm pretty sure the app takes a .wav file and edits that file inplace.
So could I get some help with doing this?
All the best
Edit:
Here's my directory contents. I want to find a way of using that mute_low(.exe) file:
notebook#heyfinn:~/Cacophony/voice_scrubbing$ ls
Makefile mute_low.c README.md wavefile.h
mute_low mute_low.o wavefile.c wavefile.o
And here's the file contents on Jupyter notebooks to explain why I think there is an .exe file there:
On Linux you do not have .exe files. But instead files are marked with execute permission.
If you look at your Makefile, you can see it defines the TARGET=mute_low.
This is your executable.
You can run it as
./mute_low # in the same directory where you did make
If for some reason it doesn't execute and you get errors like
./mute_low - Not an executable
you can make it an executable as
chmod +x mute_low
Finally it would need the file name of the .wav file and you can provide that as
./mute_low filename.wav

CodeLite static library does not find include file

I've created a simple project to learn how to create a static library. I've created a new workspace in CodeLite and a new project and a new static library.
In the static library I've got, inside a "include" folder a .h file called helloworld.h and inside a "src" folder a .c file called helloworld.c. The output files are generated in a folder inside the workspace in a folder called lib (../lib).
Inside the same workspace I have a project with a file .c where the helloworld is called with #include "helloworld.h". Finally, the settings of the project are:
linker menu:
Libraries search path: ../lib
Libraries:
General Menu:
When I compile the project I got the following error:
fatal error: 'helloworld.h' file not found
The only way that the project compiles without problems is to get the relative path to the file within the include parameter:
#include "../HelloWorldLib/include/helloworld.h"
I wonder if there is a way to work without having to add the path to the file. I'm using CodeLite in MAC OS 10.9.5. The same problem occurs in Ubuntu.
My teacher explained that this does not occur in CodeLite Windows, but he doesn't know what could be happening in Mac. Moreover, it should not be necessary to use the path within the include parameter.
If you go to the "Compiler" tab instead of the "Linker" tab, try adding your 'include' directory under the "Include Paths" option.

Running Executable

I have an executable that is generated using VC++. The VC++ project includes some of the dlls and when I tried double clicking the exe, it is asking for the path of the dll's.
Is it possible to place the generic dll's into a common folder, open the exe file using the batch file and provide the reference path of the dll's??
See this link for information on DLL search order on Windows.
Quick and incomplete summary:
The directory where the executable module for the current process is located.
The current directory.
The Windows system directory.
The Windows directory.
The directories listed in the PATH environment variable.
Note: The LIBPATH environment variable is not used.
EDIT
To address the comment about having the external DLLs copied locally:
After adding the files to your project, right-click one, select Properties. In the General section, change Item Type to Custom Build Tool. Now in the new section Custom Build Tool, change the Command Line to copy that particular file to the output directory.
You can also do all the necessary file copying in the Pre/Post-build steps of the project.

Resources