wxWidgets-2.9.4\include and \lib\gcc_lib\mswu No such file or directory error on CodeBlocks - c++

I'm trying to learn C++ programming with wxWidgets and CodeBlocks (with MinGW) and earlier today I succeeded in installing the software (after some trouble) to my Windows 7 computer with the guidance given to me in this post:
wxWidget 2.8.12 not working in Codeblocks
Later on the same day, I did the exact same steps on another Windows 7 machine and after creating a wxWidgets project and trying to compile and run it I got the following errors:
\wxWidgets-2.9.4\include: No such file or directory
\wxWidgets-2.9.4\lib\gcc_lib\mswu: No such file or directory
I have checked and these folders really do exist on those locations...so what seems to be the problem here again?...on the earlier post user asanth kumar guided me that if the steps given in the guide don't get the job done, then I'm missing an important compiler search path in my build options.
Ok, so what do I do? Where do I enter the search path? What is the search path, etc. I'm very new with wxWidgets and CodeBlocks so I don't know very much terminology. If anyone should know what to do, could you please give me like step by step instruction what to do e.g. like Click Project --> Build options --> ... and so on
I have used the latest CodeBlocks (12.11) and wxWidgets (2.9.4) installers
Thank you for any help :)
UPDATE:
here is the build log: (I'm using CodeBlocks 12.11 and wxWidgets 2.9.4)
-------------- Build: Debug in TEST (compiler: GNU GCC Compiler)---------------
windres.exe -I"C:\Users\Jonne\Omat ohjelmat\wxWidgets-2.9.4\include" -I"C:\Users\Jonne\Omat ohjelmat\wxWidgets-2.9.4\lib\gcc_lib\mswu" -J rc -O coff -i C:\Users\Jonne\DOCUME~1\CODEBL~1\TEST\resource.rc -o obj\Debug\resource.res
gcc: error: ohjelmat\wxWidgets-2.9.4\include: No such file or directory
gcc: error: ohjelmat\wxWidgets-2.9.4\lib\gcc_lib\mswu: No such file or directory
windres.exe: preprocessing failed.
Process terminated with status 1 (0 minutes, 0 seconds)
3 errors, 0 warnings (0 minutes, 0 seconds)
Here is also a picture where you can see Build options, global variables and build log on my CodeBlocks:
NOTICE FUTURE READERS: Install wxWidgets to a directory without whitespace in the path name. The problems in this post was because the directory path had spaces in it

When you create a wxWidgets project.Have you did this?
File->New->Project->wxWidgets Project->Click Go->Click on Next->click on the suitable wxWidgets 2...version->click Next->Give project Name->Click on Next->Click on Next
After that the Following below Screen comes in the Wizard. Give the wxWidgets Location(Path where You installed the wxWidgets 2.9.4)
After that click on Finish.
For Environment Variable Path Setting
Follow the Below Steps:
Right click on MyComputer->Click on Advanced Systems settings->click on Environment Variables->click on New->Give variable name=Path and variable value="C:\Program Files (x86)\CodeBlocks\MinGW\bin" -> click ok
`
Try The Following Steps.It will work.
Updates about Build settings:

I am having the same problem as this and I somehow solved my problem.
I transfer my wxWidget folder to another location path that don't have white space name on it's path. For example above, "C:\Users\Jonne*Omat ohjelmat*\wxWidgets-2.9.4\include"
the path has white space between Omat ohjelmat. Try transfering it where the path contains no white spaces. For me, I put it on C:\wxWidgets-3.1.2

Related

Codeblocks C 'Hello World' : Does not run, No such file or directory [duplicate]

I'm new to programming so I feel there is something simple I'm missing here.
I'm using the latest version of Mac and I've just installed Code::Blocks along with Xcode so I can use the gcc compiler.
I created a new "console application" project and the code for a hello world program shows up.
I built this code and it gave me 0 errors and 0 warnings so I thought it was off to a good start.
But when I go to run this code all I get is the following in my Terminal window:
*/Applications/CodeBlocks.app/Contents/MacOS/cb_console_runner DYLD_LIBRARY_PATH=$DYLD_LIBRARY_PATH:. /Users/Ryan/Documents/C++ book stuff/SayHello/bin/Debug/SayHello
Ryan-McMullens-iMac:~ Ryan$ /Applications/CodeBlocks.app/Contents/MacOS/cb_console_runner DYLD_LIBRARY_PATH=$DYLD_LIBRARY_PATH:. /Users/Ryan/Documents/C++ book stuff/SayHello/bin/Debug/SayHello
sh: /Users/Ryan/Documents/C++: No such file or directory
Process returned 127 (0x7F) execution time : 0.003 s
Press ENTER to continue.*
I've checked to make sure its using the gcc compiler. I've also tried creating a C++ directory in my documents folder but that didn't help.
Like I said, I feel like I'm just missing a step somewhere so any help would be really appreciated!
Thanks!
Try avoiding using '+' and spaces in the name of directories.
Many program don't handle escaping of pathnames when running external tools like compiler, linker or when calling the final executable.
Remove spaces from your path. It seems that codeblocks does not quote the paths, so every space will be introducing a new command or parameter. The problem here is this part:
C++ book
because it has a whitespace.

LNK1181 error when compiling V8 engine on Win10

I'm following this guide on building V8 but I am hitting some issues on the compilation step. I am running Windows 10 x64. I am trying to compile with options to embed the engine also.
Running the following command:
ninja -C out.gn/x64.release
Gives me this error:
ninja: Entering directory `out.gn/x64.release'
[1/471] LINK mksnapshot.exe mksnapshot.exe.pdb
FAILED: mksnapshot.exe mksnapshot.exe.pdb
C:/Workspace/depot_tools/win_tools-2_7_6_bin/python/bin/python.exe ../../build/toolchain/win/tool_wrapper.py link-wrapper environment.x64 False link.exe /nologo /OUT:./mksnapshot.exe /PDB:./mksnapshot.exe.pdb #./mksnapshot.exe.rsp
LINK : fatal error LNK1181: cannot open input file 'comdlg32.lib'
ninja: build stopped: subcommand failed.
Now I believe I have narrowed down the error to looking for the .lib files in the wrong directory. I have (had) multiple versions installed, so there were multiple folders in my Windows Kit install.
Windows Kits/10/Lib/10.0.16299.0
Windows Kits/10/Lib/10.0.15xxx.0
If I dragged and dropped the comdlg32.lib file from 10.0.16299.0 into the 10.0.15xxx.0 directory then the error changed to a LNK1181 error with a different input file. I did this a few times but I was unsure if this was going to cause issues with different versions and there was probably going to be a lot.
I uninstalled the 10.0.15xxx.0 version which left behind the folder I mentioned, so I removed that and after doing so I have started getting the LNK1181 error with a different input file (advapi32.lib I assume the very first file it can't find). This is how I came to the conclusion about the path being incorrect.
So I have tried a few things to change the path (I hoped just uninstalling the old version would fix it) such as:
Uninstalling the old version.
Going through registry entries to see if I can find an install path or something using that path, which I didn't. I did notice that there was still installation and data in the registry for the 10.0.15xxx.0 install, I might try deleting that from the registry directly as a last resort?
I have tried to explicitly set the path by setting <TargetUniversalCRTVersion>10.0.16299.0</TargetUniversalCRTVersion> in this file: C:\Program Files (x86)\Windows Kits\10\DesignTime\CommonConfiguration\Neutral\uCRT.props
I have never used Ninja before so I tried looking for a way to set some kind of lib-path in the command but couldn't really find anything.
I looked through the python scripts being executed to try and locate something to do with the libs path but couldn't see anything.
I would be grateful for any help and suggestions. Thanks.
You can try to compile v8 using Visual Studio as explained here: https://chromium.googlesource.com/chromium/src/+/master/docs/windows_build_instructions.md#using-the-visual-studio-ide
By running the following commands:
$ gn gen --ide=vs out.gn/x64.release
$ cd out.gn/x64.release
$ msbuild all.sln
You can see a full example here: https://github.com/phpv8/v8js/issues/272#issuecomment-262848754
Apparently this method is not officially supported anymore, but I had the same problem as you have and this solved the issue for me.
Note that after this I had another issue, the unit tests failed to be compiled due to a linking error, but I had the necessary libraries to use v8. So there may be deeper problem that is causing all of this that I'm missing.
Edit:
Also, you could try to set the following parameters with gn args:
visual_studio_path = "..."
visual_studio_version = "2017"
wdk_path = "..."
windows_sdk_path = "C:\Program Files (x86)\Windows Kits\10"
To set those parameters, do:
gn args out.gn/x64.release
This will open a text editor where you can write the extra parameters you are interested in.
To see the full list of parameters you can specify:
gn args --list out.gn/x64.release
I was following this guide https://medium.com/dailyjs/how-to-build-v8-on-windows-and-not-go-mad-6347c69aacd4 and also ran into the error
LINK1181: cannot open input file 'advapi32.lib'
I'm pretty sure it was because I had the wrong versions of the Windows 10 SDK. Similar to you I had versions:
Windows Kits/10/Lib/10.0.10240.0
Windows Kits/10/Lib/10.0.16299.0
But according to https://chromium.googlesource.com/chromium/src/+/master/docs/windows_build_instructions.md#Setting-up-Windows (Which I think is relevant) you need version 10.0.15063.0
After installing version 10.0.15063.0 (with the visual studio installer) to
Windows Kits/10/Lib/10.0.15063.0
I was able to continue with the build.

Code::Blocks isn't executing properly

I'm new to programming so I feel there is something simple I'm missing here.
I'm using the latest version of Mac and I've just installed Code::Blocks along with Xcode so I can use the gcc compiler.
I created a new "console application" project and the code for a hello world program shows up.
I built this code and it gave me 0 errors and 0 warnings so I thought it was off to a good start.
But when I go to run this code all I get is the following in my Terminal window:
*/Applications/CodeBlocks.app/Contents/MacOS/cb_console_runner DYLD_LIBRARY_PATH=$DYLD_LIBRARY_PATH:. /Users/Ryan/Documents/C++ book stuff/SayHello/bin/Debug/SayHello
Ryan-McMullens-iMac:~ Ryan$ /Applications/CodeBlocks.app/Contents/MacOS/cb_console_runner DYLD_LIBRARY_PATH=$DYLD_LIBRARY_PATH:. /Users/Ryan/Documents/C++ book stuff/SayHello/bin/Debug/SayHello
sh: /Users/Ryan/Documents/C++: No such file or directory
Process returned 127 (0x7F) execution time : 0.003 s
Press ENTER to continue.*
I've checked to make sure its using the gcc compiler. I've also tried creating a C++ directory in my documents folder but that didn't help.
Like I said, I feel like I'm just missing a step somewhere so any help would be really appreciated!
Thanks!
Try avoiding using '+' and spaces in the name of directories.
Many program don't handle escaping of pathnames when running external tools like compiler, linker or when calling the final executable.
Remove spaces from your path. It seems that codeblocks does not quote the paths, so every space will be introducing a new command or parameter. The problem here is this part:
C++ book
because it has a whitespace.

gdbinit "no such file or directory" Eclipse c

I'm using Xming to connect to a Linux (enterprise edition) server on which I'm trying to debug a C++ project in Eclipse Galileo. The following errors occurred:
Reading symbols from ../workspace/myfile ..(no debugging symbols found) ... done.
.gdbinit : No such file or directory
Setting environment variable "LS_COLORS " to null value
(.gdbinit is on the server (in root), my account has rights)
If i try to run gmake on the same file from the terminal I get the following error :
gmake ** No rule to make target /workspace/myfile' . Stop.
//I have exported the path (including the library path), and gmake exists.
My project has 3 subprojects (proj1 , proj2 and proj 3). In order to debug proj3 I have to build projs 1 and 2 . I created make targets for projects 1 and 2, and I obtained .so files for which i made softlinks to corresponding files in my_project/libs folder.
My Eclipse debug configuration is as follows (tab order):
Main
  Project: My Project
  Build Configuration: UseActive
  C++ Application: path to my project/myproject
  Environment: path to libs on server (my user rights)
Debugger
  Debugger: gdb/mi
  (Checked) Stop startup at main
  GDB debugger: gdb
  GDB command line .gdbinit
  GDB command set: standard
  Protocol mi
Project Properties:
  Builders CDT Builder
  Scanner Configuration Builder
  C/C++ Build
  Build command gmake -k
Behaviour
  build incremental build : all ( sometimes i get the error no rule for make all)
  Clean: clean
  Discovery options:
    (Checked) Automatic discovery path
    (checked) Report path detection problems
    Discovery profile GCC per project
    (checked ) Enable build output
    Compile invocation comand gcc
    Toolchain
    No toolchain
    Correct builder GNU make builder
This Eclipse debug configuration works on another account (on the same server using the same Eclipse). The gdbinit and gmake files are on the server and work, I'm not supposed to update the versions (this was one solution I found online).
Has anyone seen this error before? Does anyone have a clue what I'm doing wrong?

dev c++ compiler error

i am getting this error at compile (actually this is a very simple project and the syntax is absolutely ok)
E:\proj1\Makefile.win [Build Error] [main.o] Error 1
this is my compiler log (dev c++ v 4.9.9.2)
Compiler: Default compiler
Building Makefile: "E:\proj1\Makefile.win"
Executing make...
make.exe -f "E:\proj1\Makefile.win" all
g++.exe -c main.cpp -o main.o -I"C:/Dev-Cpp/lib/gcc/mingw32/3.4.2/include" -I"C:/Dev-Cpp/include/c++/3.4.2/backward" -I"C:/Dev-Cpp/include/c++/3.4.2/mingw32" -I"C:/Dev-Cpp/include/c++/3.4.2" -I"C:/Dev-Cpp/include"
'C:\Users\r' is not recognized as an internal or external command,
operable program or batch file.
The system cannot find the path specified.
make.exe: *** [main.o] Error 1
Execution terminated
my user path is 'c:\Users\r&d', i think the '&' is makeing trouble in compile process , does anybody has any idea ?, i can not reinstall windows because i have got many softwares installed on my current windows and it is very time consuming to me, how can i fix this /
r&d is definitely a problem. Try surrounding it with quotes: "c:\users\r&d" and hope for the best. If it doesn't work, change the folder to something without an ampersand (you don't need to reinstall Windows for that, just create another user).
You can try creating another user without the ampersand, and then copying your profile to it to keep all your settings and application preferences, as well as documents.
You might want to try another build enviroment, like code:blocks which has its own internal build system. You probably want make sure you are using the latest gcc mingw compiler and build system from mingw(use their installer, I think it was http://sourceforge.net/projects/mingw/files/Installer/mingw-get-inst/mingw-get-inst-20120426/ ), and even if you don't go with code::blocks, make sure you are using the new branch of devc++ that was forked and still being developed. One last thing is if you go with code::blocks, use a nightly build in the forum, http://forums.codeblocks.org/index.php/board,20.0.html as they are much more up to date.
The escape character in Windows is ^. So try
C:\Users\r^&d