g++.exe: #letstr.txt: No such file or directory g++.exe: no input files -first try- - g++

as you know that i'm really a beginner for CodeLite and MinGW, and i don't have any idea how it's works. When i try to build the project, the output said that it's error and i don't know what should i do. I'm using Windows 10.
i simply just follow the steps based on this video for the first try. https://www.youtube.com/watch?v=LGGHxaDxSK4
when i want to apply for some installation, the bar always show up like this
http://sta.sh/015gez4rfjn0
i even try to mark mingw32-gcc-g++
let me show you my output
C:\Windows\system32\cmd.exe /C C:/MinGW/bin/mingw32-make.exe -j4 SHELL=cmd.exe -e -f Makefile
"----------Building project:[ letstr - Debug ]----------"
mingw32-make.exe[1]: Entering directory 'C:/Users/asu/Documents/letstry/letstr'
C:/MinGW/bin/g++.exe -o ./Debug/letstr #"letstr.txt" -L.
g++.exe: #letstr.txt: No such file or directory
g++.exe: no input files
mingw32-make.exe[1]: *** [Debug/letstr] Error 1
letstr.mk:78: recipe for target 'Debug/letstr' failed
mingw32-make.exe[1]: Leaving directory 'C:/Users/asu/Documents/letstry/letstr'
Makefile:4: recipe for target 'All' failed
mingw32-make.exe: *** [All] Error 2
====1 errors, 0 warnings====

g++.exe: #letstr.txt: No such file or directory
i think your destination file incorrect. if you create C program it must be named with .c extension instead of .txt.

Related

Making Cmakelist (ros) failure

After installing ros(melodic version), I followed the below steps one by one.
$ mkdir -p catkin_ws/src
$ cd catkin_ws/src
$ catkin_init_workspace
$ cd ..
$ catkin_make
Then error came up like this
CMake Error at CMakeLists.txt:1:
Parse error. Expected a command name, got unquoted argument with text
"/opt/ros/melodic/share/catkin/cmake/toplevel.cmake".
-- Configuring incomplete, errors occurred!
See also "/home/hangilkim/catkin_ws/build/CMakeFiles/CMakeOutput.log".
See also "/home/hangilkim/catkin_ws/build/CMakeFiles/CMakeError.log".
Makefile:320: recipe for target 'cmake_check_build_system' failed
make: *** [cmake_check_build_system] Error 1
Invoking "make cmake_check_build_system" failed
I found that CMakeLists.txt file in 'home/catkin_ws/src' folder exists clearly, but contain only this message.
/opt/ros/melodic/share/catkin/cmake/toplevel.cmake
How can I solve this problem??
Looks like you are trying to compile an already compiled project. So delete the CMakeLists.txt file in 'home/catkin_ws/src' or for safety measures move it to another folder then run catkin_make command on your terminal.

Using WiringPi C library through SSH on Netbeans

How can I use WiringPi library through SSH on Netbeans? When I run a simple HelloWorld program, it works.
This is the output message:
Copying project files to /root/.netbeans/remote/RASPBERRYPI/win-7pjgqkgjsj4-Windows-x86_64 at root#RASPBERRYPI
Building project files list...
Checking directory structure...
Checking previously uploaded files...
Checking links...
Uploading changed files:
Zipping 10 changed files...
Uploading zip to root#RASPBERRYPI...
Unzipping changed files...
Checking exec permissions...
Uploading changed files finished successfully.
cd '/root/.netbeans/remote/RASPBERRYPI/win-7pjgqkgjsj4-Windows-x86_64/C/Users/Public/Remote Projects/BlinkingLED'
/usr/bin/make -f Makefile CONF=Debug
"/usr/bin/make" -f nbproject/Makefile-Debug.mk QMAKE= SUBPROJECTS= .build-conf
make[1]: Entering directory '/root/.netbeans/remote/RASPBERRYPI/win-7pjgqkgjsj4-Windows-x86_64/C/Users/Public/Remote Projects/BlinkingLED'
"/usr/bin/make" -f nbproject/Makefile-Debug.mk dist/Debug/GNU-Linux/blinkingled
make[2]: Entering directory '/root/.netbeans/remote/RASPBERRYPI/win-7pjgqkgjsj4-Windows-x86_64/C/Users/Public/Remote Projects/BlinkingLED'
mkdir -p build/Debug/GNU-Linux
rm -f "build/Debug/GNU-Linux/main.o.d"
gcc -c -g -std=c11 -MMD -MP -MF "build/Debug/GNU-Linux/main.o.d" -o build/Debug/GNU-Linux/main.o main.c
mkdir -p dist/Debug/GNU-Linux
gcc -o dist/Debug/GNU-Linux/blinkingled build/Debug/GNU-Linux/main.o
build/Debug/GNU-Linux/main.o: In function `main':
/root/.netbeans/remote/RASPBERRYPI/win-7pjgqkgjsj4-Windows-x86_64/C/Users/Public/Remote Projects/BlinkingLED/main.c:24: undefined reference to `wiringPiSetup'
/root/.netbeans/remote/RASPBERRYPI/win-7pjgqkgjsj4-Windows-x86_64/C/Users/Public/Remote Projects/BlinkingLED/main.c:29: undefined reference to `pinMode'
/root/.netbeans/remote/RASPBERRYPI/win-7pjgqkgjsj4-Windows-x86_64/C/Users/Public/Remote Projects/BlinkingLED/main.c:32: undefined reference to `digitalWrite'
/root/.netbeans/remote/RASPBERRYPI/win-7pjgqkgjsj4-Windows-x86_64/C/Users/Public/Remote Projects/BlinkingLED/main.c:34: undefined reference to `delay'
/root/.netbeans/remote/RASPBERRYPI/win-7pjgqkgjsj4-Windows-x86_64/C/Users/Public/Remote Projects/BlinkingLED/main.c:35: undefined reference to `digitalWrite'
/root/.netbeans/remote/RASPBERRYPI/win-7pjgqkgjsj4-Windows-x86_64/C/Users/Public/Remote Projects/BlinkingLED/main.c:37: undefined reference to `delay'
collect2: error: ld returned 1 exit status
nbproject/Makefile-Debug.mk:62: recipe for target 'dist/Debug/GNU-Linux/blinkingled' failed
make[2]: *** [dist/Debug/GNU-Linux/blinkingled] Error 1
make[2]: Leaving directory '/root/.netbeans/remote/RASPBERRYPI/win-7pjgqkgjsj4-Windows-x86_64/C/Users/Public/Remote Projects/BlinkingLED'
nbproject/Makefile-Debug.mk:59: recipe for target '.build-conf' failed
make[1]: *** [.build-conf] Error 2
make[1]: Leaving directory '/root/.netbeans/remote/RASPBERRYPI/win-7pjgqkgjsj4-Windows-x86_64/C/Users/Public/Remote Projects/BlinkingLED'
nbproject/Makefile-impl.mk:39: recipe for target '.build-impl' failed
make: *** [.build-impl] Error 2
This is a quite old post, but since I've had the same problem and I've resolved it I'm now writing down the solution, so if someone needs it, it's ready ;)
The only thing to do is to add some parameters to the compilation command, in particular the path to binaries and includes plus the -lwiringpi option.
To do that in NetBeans, rightclick on the project, then properties. From there, Build->C Compiler.
Now, find the voice Additional Options, open it and copy paste the following:
-I/usr/local/include -L/usr/local/lib -lwiringPi
(that are the paths to the standard installation of wiringPi, if you have changed the location of the library change the paths accordingly)
Now it should work, at least it worked for me.
Hope it helped someone,
Bye
EDIT:
I forgot to add that you must ssh as root user, otherwise wiringPi doesn't work.
For that you must do:
passwd root
to set root password
sudo nano /etc/ssh/sshd_config
And change PermitRootLogin to yes
reboot

How to build hsdis.dll for Windows 32-bit?

I am trying to build hsdis.dll in my laptop 32-bit Windows. I read http://dropzone.nfshost.com/hsdis.htm instructions and got to know that I will have to follow those steps. I saw that I have to use the mingw64-i686-gcc-core. I followed the steps, but have always found this error.
make[2]: i686-w64-mingw32: Command not found
Makefile:246: recipe for target 'libiberty.a' failed
make[2]: *** [libiberty.a] Error 127
make[2]: Leaving directory '/home/User/hsdis/build/Linux-i586/libiberty'
Makefile:8045: recipe for target 'all-libiberty' failed
make[1]: *** [all-libiberty] Error 2
make[1]: Leaving directory '/home/User/hsdis/build/Linux-i586'
Makefile:192: recipe for target 'build/Linux-i586/bfd/libbfd.a' failed
make: *** [build/Linux-i586/bfd/libbfd.a] Error 2
I would also like to know how to use the directive PrintAssembly, because i wanted to see the assembly code, of a Java class.
I have already saw other posts here, but none of them helped.
Thanks in advance
Here are the steps which help me to build it (x64 version, x86 should be almost the same):
download and unpack the latest hsdis sources as described in the building manual from the http://hg.openjdk.java.net/jdk8u/jdk8u/hotspot/tags;
download the latest bintuils-2.26.tar.gz package from the http://mirror.tochlab.net/pub/gnu/binutils/;
copy it to your Cygwin home directory and unpack it from the Cygwin terminal (this is very important, otherwise you may get permission problems):
tar -xzvf ./binutils-2.26.tar.gz
install the following Cygwin packages: mingw64-x86_64-gcc-core for x64 or mingw64-i686-gcc-core for x86, diffutils and make;
go to hsdis directory;
for x64 library build with the command: make OS=Linux MINGW=x86_64-w64-mingw32 'AR=x86_64-w64-mingw32-ar' BINUTILS=~/binutils-2.26 CONFIGURE_ARGS="--host=x86_64-w64-mingw32", for x86 library build with the command: make OS=Linux MINGW=i686-w64-mingw32 'AR=i686-w64-mingw32-ar' BINUTILS=~/binutils-2.26 CONFIGURE_ARGS="--host=i686-w64-mingw32"
if you have errors with undefined references to zlib (i.e. build/Linux-amd64/bfd/libbfd.a(compress.o):compress.c:(.text+0x7e): undefined reference to inflate), modify Makefile in hsdis: find the line $(CC) $(OUTFLAGS) $(CPPFLAGS) $(CFLAGS) $(SOURCE) $(DLDFLAGS) $(LIBRARIES) for the $(TARGET) target and append to the end -lz -L$(TARGET_DIR)/zlib, then run the build command again;
after that you should find the library hsdis-amd64.dll in hsdis\build\Linux-amd64\ for x64, or hsdis-i386.dll in hsdis\build\Linux-i586\ for x86.

Why windres cannot find "wx/msw/wx.rc"?

CodeLit 5.2, Windows 7, wxWidget 2.9.4
C:\Windows\system32\cmd.exe /c "mingw32-make.exe -j 4 -e -f Makefile"
----------Building project:[ CL2a - Debug ]----------
mingw32-make[1]: Entering directory `D:/Exaos/Workspace/ms-win/CL2a'
windres -i "D:/Exaos/Workspace/ms-win/CL2a/win_resources.rc" --use-temp-file --define __WXMSW__ --define _UNICODE --include-dir C:\Apps\wxWidgets-2.9.5\lib\gcc_dll\mswu --include-dir C:\Apps\wxWidgets-2.9.5\include --define WXUSINGDLL -o ./Debug/win_resources.rc.o
D:/Exaos/Workspace/ms-win/CL2a/win_resources.rc:1:24: fatal error: wx/msw/wx.rc: No such file or directory
compilation terminated.
c:\Apps\MinGW-4.7.1\bin\windres.exe: c:\Apps\MinGW-4.7.1\bin\gcc exited with status 1
mingw32-make[1]: *** [Debug/win_resources.rc.o] Error 1
mingw32-make.exe: *** [All] Error 2
CL2a.mk:124: recipe for target `Debug/win_resources.rc.o' failed
mingw32-make[1]: Leaving directory `D:/Exaos/Workspace/ms-win/CL2a'
Makefile:4: recipe for target `All' failed
1 errors, 0 warnings
I'm sure that the wx.rc is there.
First a small correction: why can't windres find wx/msw/wx.rc
Now, at the top you wrote that you are using wx294, however winders is searching for the file under C:\Apps\wxWidgets-2.9.5 - is this path exists?
To control the search path generated by codelite you should edit the WXWIN environment variable to point to the correct wxWidgets installation folder, this can be done from:
Settings -> environment variables
(Codelite is using wx-config.exe tool to generate the flags for windres )
Eran

How do I set up wxWidgets for Windows and CodeLite?

I'm trying out a new setup. I'm on a 32-bit Windows 8 Pro laptop. I've downloaded MinGW-builds' GCC 4.8.1. I used it to compile LLVM & CLang (3.4+ from a SVN copy of the trunk). Both of those are in my PATH.
I've downloaded CodeLite 5.2, which came with a copy of MinGW/GCC 4.7.1. I got the pure console tutorial example working, but I can't get the wxWidgets example working. (It's the Quick Start.) I downloaded & installed wxWidgets. (Always a good first step.) I built it with MinGW-4.8.1. I've read the error notes and added two (first local, now system) environment variables: WXWIN at "C:\wxWidgets-2.9.5" and WXCFG at "..\build\msw\gcc_mswud". (I initially thought WXCFG would be an absolute path, but it's based off of "%WXWIN%\lib\".) I moved my MinGW and LLVM builds out of "C:\Program Files" to "C:\" to avoid having a space in their paths.
Here's the (still) error output when I build with F7:
C:\WINDOWS\system32\cmd.exe /c "mingw32-make.exe -j 2 -e -f Makefile"
"----------Building project:[ Test1_2 - Debug ]----------"
Please use the --wxcfg flag (as in wx-config --wxcfg=gcc_dll\mswud)
or set the environment variable WXCFG (as in WXCFG=gcc_dll\mswud)
to specify which configuration exactly you want to use.
Please use the --wxcfg flag (as in wx-config --wxcfg=gcc_dll\mswud)
or set the environment variable WXCFG (as in WXCFG=gcc_dll\mswud)
to specify which configuration exactly you want to use.
Please use the --wxcfg flag (as in wx-config --wxcfg=gcc_dll\mswud)
or set the environment variable WXCFG (as in WXCFG=gcc_dll\mswud)
to specify which configuration exactly you want to use.
Please use the --wxcfg flag (as in wx-config --wxcfg=gcc_dll\mswud)
or set the environment variable WXCFG (as in WXCFG=gcc_dll\mswud)
to specify which configuration exactly you want to use.
mingw32-make.exe[1]: Entering directory `C:/Users/Daryle/Documents/CodeLite/Test1/Test1_2'
g++: error: wx-config: No such file or directory
g++: error: Error:: Invalid argument
g++: error: No: No such file or directory
g++: error: valid: No such file or directory
g++: error: setup.h: No such file or directory
g++: error: of: No such file or directory
g++: error: wxWidgets: No such file or directory
g++: error: has: No such file or directory
g++: error: been: No such file or directory
g++: error: found: No such file or directory
g++: error: at: No such file or directory
g++: error: location:: Invalid argument
g++: error: C:\wxWidgets-2.9.5\lib\..\build\msw\gcc_mswud\wx\setup.h: No such file or directory
g++: error: wx-config: No such file or directory
g++: error: Error:: Invalid argument
g++: error: No: No such file or directory
g++: error: valid: No such file or directory
g++: error: setup.h: No such file or directory
g++: error: of: No such file or directory
g++: error: wxWidgets: No such file or directory
g++: error: has: No such file or directory
g++: error: been: No such file or directory
g++: error: found: No such file or directory
g++: error: at: No such file or directory
g++: error: location:: Invalid argument
g++: error: C:\wxWidgets-2.9.5\lib\..\build\msw\gcc_mswud\wx\setup.h: No such file or directory
mingw32-make.exe[1]: *** [Debug/test1_2_frame.o.d] Error 1
mingw32-make.exe[1]: *** Waiting for unfinished jobs....
mingw32-make.exe[1]: *** [Debug/test1_2_app.o.d] Error 1
Test1_2.mk:102: recipe for target `Debug/test1_2_frame.o.d' failed
Test1_2.mk:94: recipe for target `Debug/test1_2_app.o.d' failed
mingw32-make.exe[1]: Leaving directory `C:/Users/Daryle/Documents/CodeLite/Test1/Test1_2'
mingw32-make.exe: *** [All] Error 2
Makefile:4: recipe for target `All' failed
0 errors, 0 warnings
At some point, a compiler step spewed out an error message and the next step interpreted it as actual parameters! (Should have sent the error on stderr instead of stdout?)
Update
After moving on to my actual work, I got errors and noticed that CodeLite is still using the MinGW 4.7.1 that came with the CodeLite download instead of using the 4.8.1 I downloaded. I probably messed things up by changing the search directories to my 4.8.1. I think I'm going to erase everything and start over....
wx-config.exe tool for Windows uses 2 environment variables:
WXCFG and WXWIN
You need to provide them so wx-config.exe will be able to locate wx-config files.
The recommended way is to set them within the IDE and not system wide.
To do this, from within the main menu, go to:
Settings -> Environment Variables
and add 2 entries:
WXWIN=\Path\to\wxWidgets\Folder
WXCFG=gcc_dll\mswu
Also, you mentioned that codelite is using GCC4.7.1 and not your 4.8.1. You should know that when working with GCC on Windows you should have all your components built with the same GCC version. so make sure that you don't use wxWidgets that we (codelite team) provide
since it was built with GCC4.7.1 or you might get some weird crashes.
To force codelite to use another GCC, simply alter the PATH from within codelite:
Settings -> Environment variables
PATH=\Path\To\MinGW-4.8.1\bin;$PATH
Eran
The error message seems to indicate that WXCFG environment variable is not set, did you relaunch the IDE after setting it? Remember that editing environment variables doesn't change them for the already running processes.