I have a freshly downloaded Visual Studio C++ 2010 Express and wxWidgets 2.9.1. The build folder under wx\build\msw has solution files for VC++ versions 6 through 9 (2008).
I tried to open the latest solution, wx_vc9.sln. It converted all the projects with a bunch of warnings. When I try to build every project gets the error:
C:\Program Files
(x86)\MSBuild\Microsoft.Cpp\v4.0\Microsoft.CppCommon.targets(151,5):
error MSB6001: Invalid command line
switch for "cmd.exe". The path is not
of a legal form.
Trying to open the previous version of the solution, wx_vc8.sln, generates the same conversion warnings and the same build errors.
I Googled for some hints and found a suggestion to start with the .dsw file. I opened wx.dsw and it generated an error for each of the project files:
D:\3rdParty\wx\build\msw\wx_wxregex.dsp
: error : Project upgrade failed.
Finally in desperation I tried nmake /f makefile.vc and was greeted with yet another error:
NMAKE : fatal error U1077: 'cl' :
return code '0xc0000135'
Anybody have any hints? Thanks.
There are two ways of solving this, firstly if you update to a more recent version of the wxWidgets SVN trunk this is fixed (and so it will be fixed in 2.9.2 when it is released). If you don't want to work from trunk of wait for 2.9.2 then if you do a find and replace over all .vcxproj files and replace
>$(INTDIR) $(OUTDIR);%(AdditionalInputs)
with
>%(FullPath);%(AdditionalInputs)
it should then compile fine.
For future reference, trust me people, avoid all nonsense and start up your Visual Studio 2010 Command Prompt and navigate to [wxwidgets directory]\build\msw
Then compile using the makefile with the following command :
nmake -f makefile.vc BUILD=release MONOLITHIC=0 SHARED=0 UNICODE=1
Of course change the options as needed.
You will be saving a lot of trouble this way, this is the way I did.
The Key to Compilation using Visual C++ 2010 Express and wxWidgets 2.9.3 is to keep Pressing F7 Again-and-Again-and-again.... till you you get '0 Failed' Message below. Because many Projects have dependencies which are not satisfied immediately, so it is necessary to keep compiling with 'F7' till all are satisfied.
Download wxWidgets. I downloaded the .7-Zip File (only 12 MB ! ), and installed it at C:\wxWidgets The Structure should be like so that you see the following Folders like C:\wxWidgets\lib and C:\wxWidgets\build etc etc...
Basically the process should be to go to C:\wxWidgets\build\msw , and open wx_vc9 Solution File for VC-2008, and convert it to VC-2010 when asked. Then Choose 'DLL-Release Win32' on Top, and Press F7. Wait for Compilation to take place and see the Message. Then keep Pressing F7 again and again till you get '0 Failed' Message below. Then you would want to Compile 'DLL-Debug' Release in the same manner.
The compiled DLL Files can then be found at C:\wxWidgets\lib\vc_dll. Now, To Add vc_dll Folder to your PATH, Right-Click on My-Computer -> Properties -> Advanced System Settings -> Environment-Variables -> User-Variables. Search for 'Path' -> 'Edit', and then Just Append ;C:\wxWidgets\lib\vc_dll to the End.
This makes running your compiled Application easier, as your .EXE can now easily find DLLs.
When you are packaging, then you obviously need to bundle specific Release-DLL'S along.
Then you can compile the Samples located at C:\wxWidgets\samples.
I just go to individual Project Folder, like for e.g. C:\wxWidgets\samples\drawing, and Open drawing_vc9 Project, then Convert it as Prompted, and then hit F7 to create Release Version. Now if you go inside C:\wxWidgets\samples\drawing\vc_mswudll\ Folder, you have your 'drawing.exe' ready-to-be-run !
Have fun !
Use the wx.dsw, took me a while to finally get it but it'll build fine after that. I also suggest using one of the sample projects such as 'minimal' as the base and just fix all the config paths to match what you want to build (as manually setting up I encountered issues).
If you already used the wx_vc9 (like you said you did) you are probably best off just deleting all of wx and restarting with it and using wx.dsw like I said above.
Related
I am trying to statically build Qt using Visual Studio 2013
To do so, I'm following the instructions provided by the official website
1) ActivePerl 5.20 is downloaded, installed and added to the PATH.
2) The archive for qt-everywhere-enterprise-src-5.3.1 is downloaded and unzipped in C:\Qt\Entreprise_2
3) I open msvc 2013 command prompt, and change directory to: C:\Qt\Entreprise_2\qt-everywhere-enterprise-src-5.3.1
4) From here, I add 2 new elements to the path:
SET PATH=C:\Qt\Entreprise_2\qt-everywhere-enterprise-src-5.3.1\qtbase\bin;C:\Qt\Entreprise_2\qt-everywhere-enterprise-src-5.3.1\gnuwin32\bin;%PATH%
5) I define the QMAKESPEC in order to use msvc: SET QMAKESPEC=win32-msvc2013.
6) finally, I launch the compilation:
configure -commercial -nomake tests -nomake examples -debug -static
If I skip part 5), I instead receive the
I receive the answer:
"QMAKESPEC environment variable is set to "win32-msvc2013" which is not a supported platform"
If I skip step 6, I obtain instead:
"Unable to detect the platform from environment. Use -platform commandlineargument or set the QMAKESPEC environment variable and run configure again"
However, according to Qt support center:
1) "win32-msvc2013" is the correct QMAKESPEC to use with Visual Studio
2) If we use Visual Studio Command prompt (as I did) instead of the normal one, setting QMAKESPEC is optionnal anywey, as visual studio is supposed to set the correct parameters at the beginning
So, does anyone have any idea about how I could resolve these errors?
Incidentally does anyone knows what defines a Qmakespec as corresponding to a "supported platform"?
Had the same problem, first go look in the mkspecs folder (from the archive) and make sure your platform is there, might not be supported or look here:
http://doc.qt.io/QtSupportedPlatforms/index.html
If your platform is supported and you have it in your extracted mkspecs folder, then no clue what your problem is?!?
Apparently, a good part of the files inside the mkspec folder either failed to copy when I extracted the archive, or were destroyed afterward. Most likely the latter, as it would appears that every time I try to launch a compilation some source file are erased.
The solution I found is to recreate the source file from the archive before every compilation.
My problem is that code::blocks error message tells me that it can't find file executable in the search path for gnc gcc compiler. Although, I don't know what that means. Also I typed out some code:
#include <iostream>
using namespace std;
int main(void) {
cout <<"Hello World" <<endl;
return 0;
}
I can't build it or run in code::blocks. What do I need to do?
I went on line but I got some answers that are way over my head. I was able to use code::blocks once before I installed Visual studios express 2013. Visual studios didn't work right either. It kept asking me to repair or uninstall every time I tried to open it. So I deleted it along with code::blocks. Now that I re-installed code::blocks I still can't get to work right.
This problem with compilers is taking up all my time and I can't practice learning programming because I can't get any compiler to work right. I need some help, please.
I'm guessing you've installed Code::Blocks but not installed or set up GCC yet. I'm assuming you're on Windows, based on your comments about Visual Studio; if you're on a different platform, the steps for setting up GCC should be similar but not identical.
First you'll need to download GCC. There are lots and lots of different builds; personally, I use the 64-bit build of TDM-GCC. The setup for this might be a bit more complex than you'd care for, so you can go for the 32-bit version or just grab a preconfigured Code::Blocks/TDM-GCC setup here.
Once your setup is done, go ahead and launch Code::Blocks. You don't need to create a project or write any code yet; we're just here to set stuff up or double-check your setup, depending on how you opted to install GCC.
Go into the Settings menu, then select Global compiler settings in the sidebar, and select the Toolchain executables tab. Make sure the Compiler's installation directory textbox matches the folder you installed GCC into. For me, this is C:\TDM-GCC-64. Your path will vary, and this is completely fine; just make sure the path in the textbox is the same as the path you installed to. Pay careful attention to the warning note Code::Blocks shows: this folder must have a bin subfolder which will contain all the relevant GCC executables. If you look into the folder the textbox shows and there isn't a bin subfolder there, you probably have the wrong installation folder specified.
Now, in that same Toolchain executables screen, go through the individual Program Files boxes one by one and verify that the filenames shown in each are correct. You'll want some variation of the following:
C compiler: gcc.exe (mine shows x86_64-w64-mingw32-gcc.exe)
C++ compiler: g++.exe (mine shows x86_64-w64-mingw32-g++.exe)
Linker for dynamic libs: g++.exe (mine shows x86_64-w64-mingw32-g++.exe)
Linker for static libs: gcc-ar.exe (mine shows x86_64-w64-mingw32-gcc-ar.exe)
Debugger: GDB/CDB debugger: Default
Resource compiler: windres.exe (mine shows windres.exe)
Make program: make.exe (mine shows mingw32-make.exe)
Again, note that all of these files are in the bin subfolder of the folder shown in the Compiler installation folder box - if you can't find these files, you probably have the wrong folder specified. It's okay if the filenames aren't a perfect match, though; different GCC builds might have differently prefixed filenames, as you can see from my setup.
Once you're done with all that, go ahead and click OK. You can restart Code::Blocks if you'd like, just to confirm the changes will stick even if there's a crash (I've had occasional glitches where Code::Blocks will crash and forget any settings changed since the last launch).
Now, you should be all set. Go ahead and try your little section of code again. You'll want int main(void) to be int main(), but everything else looks good. Try building and running it and see what happens. It should run successfully.
Just open your setting->compiler and click on the reset defaults and it will start work.
* How to Download and install CodeBlocks.* ( I have already downloaded )
***How to solve the CodeBlocks environment error.
Go to "Settings"----"Compiler"----"Selected compiler"( GNU GCC Compiler ).
Then, Selected "Toolchain executables".
Now, "( C:\Program Files (x86)\CodeBlocks\MinGW )"
See Video : https://youtu.be/Tb1VnXs60Lg
I had also found this error but I have solved this problem by easy steps. If you want to solve this problem follow these steps:
Step 1: First start code block
Step 2: Go to menu bar and click on the Setting menu
Step 3: After that click on the Compiler option
Step 4: Now, a pop up window will be opened. In this window, select "GNU GCC COMPILER"
Step 5: Now go to the toolchain executables tab and select the compiler installation directory like (C:\Program Files (x86)\CodeBlocks\MinGW\bin)
Step 6: Click on the Ok.
Now you can remove this error by follow these steps. Sometimes you don't need to select bin folder. You need to select only (C:\Program Files (x86)\CodeBlocks\MinGW) this path but some system doesn't work this path. That's why you have to select path from C:/ to bin folder.
Thank you.
For that you need to install binary of GNU GCC compiler, which comes with MinGW package. You can download MinGW( and put it under C:/ ) and later you have to download gnu -c, c++ related Binaries, so select required package and install them(in the MinGW ). Then in the Code::Blocks, go to Setting, Compiler, ToolChain Executable. In that you will find Path, there set C:/MinGW.
Then mentioned error will be vanished.
Uninstall/Remove your current codeblocks compiler.
Install codeblocks using this link that contains GCC compiler files: http://sourceforge.net/projects/codeblocks/files/Binaries/13.12/Windows/codeblocks-13.12mingw-setup-TDM-GCC-481.exe.
Now go to : Settings > Compiler.... > ToolChain Executables Tab
CLICK on Auto-detect button and then click OK button. Now just restart CodeBlocks and start writing your codes and use the Build and run option. It will RUN normally.
Fistly, Code Blocks is not a compiler. It is just an integrated development environment.
So, you must show the path of your compiler at first, (if you dont have a compiler you have to download an install, it is not difficult to find. f.e. GCC is good one.)
If code blocks could not find automatically the path of compiler it is an obligation to show it yourself.
But when you install, probably Code Blocks automatically find your compiler.
Enjoy.
This simple in below solution worked for me.
http://forums.codeblocks.org/index.php?topic=17336.0
I had a similar problem. Please note I'm a total n00b in C++ and IDE's but heres what I did (after some research)
So of course I downloaded the version that came with the compiler and it didn't work. Heres what I did:
1) go to settings in the upper part
2) click compiler
3) choose reset to defaults.
Hopefully this works
I'm a total noob but I reinstalled over the codeblocks giving me these "Can't find file executable in your configured search path for gnc gcc compiler" errors by downloading:
codeblocks-20.03mingw-setup.exe
(IMPORTANT: make sure it has the "mingw" in the file download name, that has the compiler build that is required to compile the code which doesn't automatically comes with the main codeblocks editor software download because codeblocks already assumes you already have another compiler installed on your computer {visual studio 2019 or such}).
Then when I created a new project (console application) and used the defaults to quickly test it out.
It gave me errors.
So I went to Settings > Compiler > Selected Compiler set to: GNU GCC Compiler > Click on the "Tooolchain executables" tab > Click on Auto-Detect > Should say "C:\Progam Files\CodeBlocks\MinGW" > Click OK.
Build and run a simple hello world code.
Should work! If not, look for the "MingGW" in the C:\Program Files\CodeBlocks and select it.
Here's an easy way for Windows users.
Uninstall the existing codeblocks from your system.
Restart system.
Go to http://www.codeblocks.org/downloads/26
Download the codeblocks-16.01mingw-setup.exe file. It includes the GCC/G++ compiler and GDB debugger from TDM-GCC (version 4.9.2, 32 bit, SJLJ).
During linking I get this message:
LINK : fatal error LNK1101: incorrect MSPDB120.DLL version; recheck installation of this product
I have seen solutions for similar errors on previous versions of VC2013 but those did not work for me. Those include:
running C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\bin\vcvars32.bat
adding %VS120COMNTOOLS% environment variable to the PATH environment variable
Reinstall or Repair the installation of MSVC2013 (NOT RECOMMENDED)
The first time I got this error I went ahead with a full reinstall of VC2013. I chose to take this rout because I thought maybe I had screwed up the install by installing older versions of VC after installing VC2013. Although reinstalling worked the first time, I can't recommend doing this. The MS installer seems rather broken and hung up on me on repeated attempts, resulting in the loss of 5+ hours of my life.
What are some other solutions to this problem if the first 2 options do not work?
Open Task Manager.
Check for the currently running processes mspdbsrv.exe and kill it if it is running and try again. I don't know why this works, but I have to do it every once in a while. The process comes back each time you compile and it seems random whether or not it gets stuck on this step.
Alternatively, if you do not need debug information generated, you can skip this process altogether by setting:
Project Properties -> Linker -> Debugging -> Generate Debug Info ->
No
I just had this happen. In my case, I had a statically-linked shared 'helper' lib that was compiled with the cl.exe CRT flags "-D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE", whereas my target app that linked in this helper lib did not have these set. Once I added these flags to the app's cl.exe flags, all was good.
I get this error message when another compile (jenkins) is still running in the background.
Waiting for it to finish, and retry fixes the error.
im just starting out with FreeSwitch, i downloaded via git, and am trying to build in VS
all i need i believe are the dlls of mod_managed, as my goal is to manage FS via .net
but i get 248 errors, most look something like this:
Error 5 error C1083: Cannot open source file: '....\jpeg-8d\jaricom.c': No such file or directory D:\FreeSwitch\freeswitch\libs\win32\libjpeg\c1 libjpeg
btw, i searched windows and cannot find any such file anywhere on my pc.
I tried
cleaning the solution first, but it did not help
moving the file to a path without spaces
downloading with autocrlf=false
building on another machine
but none of these steps helped
anybody have any idea?
if i can just download the dlls i need, i wouldnt mind skipping this step altogether
environment
win 8 64bit
visual studio 2012
thanks a million
The libjpeg sources are not in the git sources but are normally downloaded during the build process. If you build the entire solution that should not be a problem since it has the project dependencies set: libjpeg.2012 depends on Download libjpg.2012, which means the latter gets built before the first. All Download libjpg.2012 is run a cscript which downloads libjpeg from http://www.ijg.org/files/jpegsrc.v8d.tar.gz (see inside the project file).
So if you do not have the sources, either you are building incorrectly (not in VS for instance, or with a broken solution file) or the download script is broken. In that case, you should inspect the output: I assume it shows errors when it can not download the libs.
I need to install OpenCV on Win32. I do not have it installed currently. I downloaded OpenCV-2.0.0a-win32.exe and ran it. What the heck do I do now? There are no .lib's and whatnot.
I found some instructions for building the release using cmake at http://opencv.willowgarage.com/wiki/InstallGuide . I downloaded the latest and greatest cmake, and tried to follow the instructions, but I was guessing. No joy.
I specified VC++9 when I did the "configure," but cmake built a VC++ 6 dsw file. No vcproj. I converted the dsw into a vc++9 vcproj anyway, just to see if it would work. Nope. It compiled lots of files, but many failed because it could not find omp.h. Sure enough, it's not there, anywhere. The build log said, 'A tool returned an error code from "Performing Custom Build Step".'
I am lost.
Ideally, I would like to find a full installation with all the files pre-built for Win32 vc++ 2008. Failing that, I need instructions that even I can follow. Short sentences and small words, but lots of them.
Please help!
UPDATE: I tried to build just CXCORE. It complained, "cannot open file 'VCOMPD.lib'" There's that OMP again.
For version 2.0, you must build the project from source.
Here's what you will need:
The OpenCV installer.
CMake. Here's the CMake installer.
Instructions for using CMake to install OpenCV-2.0.01-win32. Those instructions need an extra step if you are using a vc++ Express edition. In that case you must un-check ENABLE_OPENMP when running the CMake GUI.
Instructions for setting up an application project. (Thanks to mloskot for this find.)
If you've installed OpenCV-2.0.0a-win32.exe then it will install pre-built DLLs and libs. Then you just have to follow the instructions in this tutorial.
I recommend that you wipe the folder you previously installed OpenCV2.0 in and reinstall it.
Update:
Well sorry it didn't work out. I suggest the following then: check out the latest version from the SVN repository, https://code.ros.org/svn/opencv/trunk/opencv with any SVN client - I use TortoiseSVN.
Then run CMake (I see you've already installed it) on the source folder and then compile the Solution file. This should work - it does for me.
I apologize for my old answer - I had started off with OpenCV a few months ago in the same way and assumed that downloading the Gold version would still work - apparently not.
OMP
The OMP issue may arise from the checked Enable OpenMP in the CMake config. Try unchecking that .. might solve your initial problem.
I followed Jive Dadson's procedure to get OpenCV2.0 to work on Visual Studio 2010 Express (disabled OMP).
All went good until compilation of the generated stuff in Debug and Release. In both cases got this error: "LINK : fatal error LNK1181: cannot open input file '../../lib/Release/cv200.lib'"
in debug the only difference is that the library is cv200d.lib.
EDIT: I solved by downloading the latest svn snapshot for OpenCV2.0. One additional thing on Vista/7: it may be good to execute CMake as administrator.
Download OpenCV installer for Windows
Read OpenCV-2.0.0a-win32.Readme.Please.txt
Follow OpenCV with Visual C++ 6.0, 2005 Express, and 2008 Express in order to create project using OpenCV