Aws Cloud9 for C++ - c++

Why can't I run my C++ code by creating another folder. The moment I store my c++ file in a folder , the complier states no such file is in directory. But i can run my java file from other folders. Anyone ?
This is the error I get running from the run configuration
But the same file can be compiled and run through the terminal.
the program can be run through the terminal

Related

Remote gdb with Eclipse Oxygen 3a

I've read several guides/stackoverflows but not found a similar situation/solution.
I have my remote ssh working (can browse files).
I don't get why I need a local Windows application (although I have a compiled .exe it's not the version I want to debug which is only on the Linux server).
When I try and launch a remote debug session it immediately fails with
Exception occurred during launch
Reason:
Error during file upload.
and below in the details
Could not write file: <my windows exe path>
Permission denied
...
The aforementioned file is writable and in any event I also started eclipse as administrator just in case.
In any event the .exe is irrelevant. I just want to debug code remotely.
(I know all about gdbserver...happy to manually kick that off if need be....don't think I'm there yet though)
Below is the options page I'm presented with:
Had the same experience on TI Code Composer Studio Version: 9.3.0.00012.
This seems to happen while uploading the cross compiled binary from host to target. If you set the check box "Skip download to target path" the error should disappear.
I propose to workaround the upload.
Setup a web server on the host, the line python.exe -m http.server --directory \source\hello\Debug\ would be sufficient
Run wget on the target, see screenshot

Executing a python script from SQL Server Agent

Python script not running from SQL Server Agent
the python script makes use of the requests library (installed)
when i run from CMD :
python "C:\Program Files (x86)\Python37-32\main.py"
this works fine.
when i run it from SQL agent as an Operating System (CmdExec) all i get is "System cannot find the file specified"
i have set the enviorment paths.
I have created a proxy account (sys admin)
i have copied the requests library so its in the same folder as Python.
nothing is working
37 failed attempts today , and counting !
can anyone assist>
python "C:\Program Files (x86)\Python37-32\main.py"
i managed to get it working.
manually moved some libraries around in python.

Reading Files when application launch at startup

I recently created a c++ program for windows that when is launched, it reads some files that store the user configurations, if it is the first time the program runs, it store the options the user set and create the files. When I am debugging it in visual studio it works as expected.
So I proceded to create a setup for installation, I used Inno Setup. My program requiered to start at launch so I use the following code, this is from the inno website http://www.jrsoftware.org/iskb.php?startwithwindows. My problem is that when the programs start at launch these files are not read or created, but if I close the program and I launch the program using the desktop Icon it reads and creates de files.
So my question is there something in the Inno script that allows it to read the files? could be a problem with the fstream class?, could there be a code solution
Thanks in advance.
I followed Michael advice and I used the APPDATA folder with Roaming subfolder, and now the program read the config files and run as expected, thanks for the help!!.
From above comments, you say you are storing the configuration files in the same folder as the .exe, and your application is able to create the files when run from Visual Studio, but not when installed to the "Program Files (x86)" folder or C:/ root.
It sounds like you are running into UAC (User Access Control) permissions issues. The "Program Files (x86)" folder at least, and I believe C:/ (root) as well, require administrator privileges to write. This was not the case with Windows XP and older; it is with modern versions. You may be running Visual Studio as administrator and not know it, and allowing administrator privileges when you install, but the application is not then run as administrator so it cannot write to those locations.
Try running your (installed) application as administrator (right-click the file and select "Run as administrator"). If it works, there you go: you either have to run it as administrator always if you want it to be able to store configuration files in the same directory as the .exe, or else (much better solution) store your configuration files in an appropriately-named subdirectory of %APPDATA%, which the user running your application will always be able to write to without administrator privileges.

Apex (apex.run) installation issues

I want to install Apex (similar to the Serverless Framework) on a Windows 7 machine. I have followed the steps for installation at apex.run. After installing the binary file downloaded from apex.run, it shows the usage commands.
But when I try to run any command, its giving me error saying
apex is not recognized as internal or external command, operable program or batch file.
I have also setup AWS CLI configuration and it works.
What might be the problem?
I used windows (32-bit) also. for AWS & apex both, after installation, I had to update the environment variables before it worked everywhere.. previously they both worked only from the folder in which they were installed.
go to start menu
write 'edit environment variables for your account' (without the quotes of course)
select the path variable and enter the location(s) of the AWS.EXE file and the APEX.EXE file at the end of your existing PATH variable
C:\Ruby24\bin;C:\Program Files\Amazon\AWSCLI;C:\apex_1.0.0-rc2_windows_386
close all command prompts windows
open a new cmd window
now 'apex init' or 'apex deploy' etc should run as intended

How to Build Cpp code on jenkins?

I am executing a batch file in Jenkins for building a cpp code and i have a command in between to build the executable like "g++ sourcefile.cpp -o executablefile" and it gives error 'g++' is not recognized as an internal or external command.How to Resolve this??
When Jenkins is run as a service on a Windows machine it runs under the System account, not a user account (or your account). Therefore, you need to make sure that everything you need to setup for paths (etc.) is either done for the system account or included as part of your "Windows Batch Script" in Jenkins. (I actually use this method myself for several projects.)
To test if the System Account can do the compile, you need to open a CMD prompt as the System Account. This question should help you with taht: How Do You Run CMD under System Account.
Install GCC and bintools
Set the environment variable: PATH of your system to the folder that contains gcc.exe, g++.exe
done!