I am using CodeBlocks 16.01 in Windows7. I have downloaded GLFW windows binary from here. I have copied include and lib-mingw to my project folder. Have provided the include and lib-mingw directories for Compiler and Linker options respectively in the build options. In the Linker settings tab, I have added glfw3,gdi32 and opengl32. I'm running the sample program given in the documentation page of the GLFW website. The program is compiling. While building a warning and an error message is displayed:
Warning: .drectve `-aligncomm:"__glfw",5' unrecognized
And
init.c undefined reference to `__chkstk_ms'
Have googled a lot, but in vain. Any help would be great.
Today the problem is solved. The problem was with the compiler settings in CodeBlocks. In CodeBlocks, under "Settings" tab "Compiler"->"ToolchainExecutables", it was "Dev C++". I installed TDM-GCC-32 (http://tdm-gcc.tdragon.net/download) 32 bit version. Then changed "Dev C++" with the directory where TDM-GCC-32 is installed in my computer.
Next in "Settings"->"Debugger" option, I selected "GDB/CDB Debugger" and "Default". Then provided the path of gdb32.exe located in the TDM-GCC-32/bin directory.
I think as I had installed Dev C++ before installing codeblocks, Dev C++ was selected by default (not sure). For those who are facing similar problems but DEV C++ is not their case, updating TDM-GCC may help.
However, this DEV C++ compiler was working for older GLFW 2.7. Today, I have also found another problem with this DEV C++ one. I was using freeglut. When I was including iostream along with GL/glut.h similar "undefined reference to `__chkstk_ms'" error message was appearing.
But now, it is ok. Thank you all :)
looks like you need to add library(.lib) with this stuff. .h file has been
deployed already so you need to detect it. Then you can google for library.
Related
How can I choose platform for cmake with QT creator?
This is my project settings:
My cmake settings (what i am supposed to put as platform/kit?):
This gives me gives me crazy output here:
Whats wrong here? I do have rc.exe in my path:
UPD: As asked, I've checked vcvars32.bat:
(what am I expected to see here also??):
I have managed to walkaround the problem in the end by removing MSVC2017, Windows SDK and reinstalling MSVC 2015 + Windows SDK for W10. But this is not enough, in this crazy dialog:
you have to select ...ninja+codeblocks and this allows to run cmake sucessfully. Why VS14 setting here causes problems -- this remains a mystery for me.
I checked if the question exists but it doesn't seem to help me. I'm clearly new to Qt, i installed Qt Creator 5.4 in my Windows 7 Ultimate. I installed everything Qt 5.4 provides and also installed MinGW 4.9.1. The problem is when i open a console application project it immediately gives these errors. I tried different projects and error is the same.
Project ERROR: Unknown module(s) in QT: core
I tried to check intellisense for include and it didn't show ANY library to me.
When i hover to include it gives : QCoreApplication: No such file or directory
I highly doubt Qt can't find it's own libraries. How can i show it to QtCreator ?
Additional info : Run button and everything related to run is disabled.
Any help will be appreciated, thanks :)
Maybe your project's path contains non ASCII characters.
Try a new project somewhere like C:\MyApp
Running or debugging anything gives me an extremely frustrating "Launch failed. Binary not found" error. I'm using Eclipse with a CDT plugin installed (specifically, I have the MinGW package installed).
I already tried setting both the user and system PATH variables to include my (MinGW directory)/bin
I also tried building the program before running it.
I also made sure that PE Windows Parser under the project's settings was enabled.
I went to Project Properties > Run/Debug Settings > New > C/C++ Application > Environment > Select > and I selected the Path
I also tried setting the C/C++ Application in the Main tab to the executable file that is made from building the program, but no such file is made when I do build my program. I seriously doubt that this is what's causing the problem, though.
I'm running out of options, and the problem still persists. What else needs to be done? What am I doing wrong?
When I was looking through the install instructions for MinGW, the tutorial referenced the mingw base package as the package to install after installing MinGW. But mingw base was not available to me. Instead, I saw mingw32 base. Could it be that Eclipse, a 64 bit program, is trying to run 32 bit code? Is that what's going on? If that's the problem, how do I fix it?
Build
Refresh the project. A new folder named Binaries will appear now in project explorer.
Now Run :)
It took me 3 days to figure out my problem. My Hello World C program would compile in eclipse using the Windows PE Parser, but there was NO EXE FILE!!!! AVAST Antivirus was identifying the exe file as a false positive and removing it....grrrrr. The solution was to add the eclipse workspace folder to the exclusions list. Voila!! Eclipse generated my test.exe file.
save the file first before you build and run... it works with me
Check the compiler you set while you created the project . If that is MINGW or Visual Studio ; check whether they are downloaded or not . If not do so and start a new project by closing the old one . Build the new project by pressing Ctrl + B and a new file 'Binaries' is created in the package explorer . Now you can use the run option to run the project .
First the solution: install "make"
I had the same issue.
I also tried the steps you did with no luck.
After some time i found a the solution!
The problem was that i did not have the application "make".
Apparently its not installed by default on Cygwin and eclipse doesn't give any indication for that...
I'm trying to build a C++ application in NetBeans 7.3. I'm using the MinGW compiler & I set up the project as a new project from an existing makefile. When I try to compile, I'm getting the following error from NetBeans:
CreateProcess error=193, %1 is not a valid Win32 application
I've looked at the NetBean's forums and I've done the following:
Ensured that my Path variable included the MinGW bin.
Ensured that NetBeans C++ extensions were installed.
Can anyone give me some pointers on where to look next - I'm not terribly familiar with C++. I should mention that I'm running on a 64 bit machine, but I'm unsure if this is causing my problem.
Please check these points too:
Make shure there are no blanks in paths (eg. path to gcc or source files should not contain any blanks)
Do you call any shellscript or other linux / unix stuff within your makefile?
If you setup a new project (like a default c/c++ application) - does this work?
Since you're using an existing source / makefile: can you compile your project on another system?
Do you have mingw msys installed?
are there any other informations or is this the only error / message you get?
What version of MinGw are you using?
Few days ago I had to reinstall all my Linux system, and I also had to reinstall Eclipse CDT as I used to work with it since few weeks.
Unfortunately, since then I do not have live error checking anymore... and I miss it ;)
If I create a new Hello World C++ project (New / C++ Project / Hello World C++ project) and then add some errors like calling a method from an nonexistent class or adding any undefined or untyped variable, well Eclispe doesn't underline and report them as it was doing before I had to reinstall it all.
I searched stackoverflow, and tried to deactivate/reactive "Build automatically" without any change. I also verified that the project path is included in the project sources (Project properties / C-C++ general / Path and Symbols / Source Location) but as it already was, it didn't solved the problem.
When I "Build All" the errors are well reported in the "Problems view", and then when I fix one problem and save the file, the error disappear from the Problem view, but then if I add another problem and save, nothing is reported until I build again. Even errors turned to comments still remains underlined until the next "build all".
Do you have any idea to help me reactivate this feature ?
I was under Eclipse Linux 3.5 and I now use Eclipse Linux 3.7.
I installed the Eclipse package: Eclipse C/C++ IDE Indigo SR-1 with Eclipse Platform 3.7.1 and that fixed the problem.
So I guess, there was a problem with the 3.7.0 currently provided by the Ubuntu Software Center.
With this new version all is Ok by default.