I am using AVR32 studio 2.6 to try to compile a c++ project, but everytime i try to run it, it says launch failure as no binaries could be found. Is there a fix for this error code ?
I have never used AVR32, but this is a very common C++ error. It essentially means that it can't find the executable to run the program from. Which either means you have not built the project properly, or your makefile has errors.
Make sure your project is properly built first, and if that isn't the problem, look up how to create makefiles for the compiler you are using.
Related
I started programming in C++ using CLion IDE.
When I run the program inside the IDE it works. However, opening the .exe file outside the IDE generates a bunch of errors:
The code execution cannot proceed because libgcc_s_seh-1.dll was not found. Reinstalling the program may fix this problem.
Hitting OK pops the same message again with a different dll.
Why does this happen? What are the different ways to fix it? What is the best option?
You always need to ship any libraries your application is linked with along with your application. The libraries are just as much a part of your app as the code you wrote yourself. This includes your compilers runtime libraries (which you forgot in this case).
I'm working on a project for my cryptography course, and I've been using the Windows Subsystem for Linux. Up until recently I was able to use make -j to build my entire project quickly.
Recently, I started getting compilation errors like the one below. Strangely enough, I have no issues compiling with just make (no -j)
Because this used to work fine, I do not believe the issue has anything to do with dependencies specified in my makefiles. (Most of my code is in header files anyway because templates)
In file included from /usr/include/stdlib.h:314:0,
from /usr/include/c++/5/cstdlib:72,
from /usr/include/c++/5/ext/string_conversions.h:41,
from /usr/include/c++/5/bits/basic_string.h:5249,
from /usr/include/c++/5/string:52,
from tests/cryptomath/../../catch.hpp:207,
from tests/cryptomath/test_extgcd.cpp:2:
/usr/include/x86_64-linux-gnu/sys/types.h:219:25: fatal error: /home/ipiano/[student id]/Documents/Code/Homework/512/project/modules/module_crypto/unittests/../libclassiccrypto/affine/headers/sys/select.h: Invalid argument
It looks to me like the compiler is trying to find c++ source files (sys/select.h in this specific error) in my project directory, which implies maybe a path issue?
The only thing that I can think of that changed recently is that IT approved the Creator's Update and I installed that, but I don't know if it's relevant or not.
If anyone has seen this behavior or errors like this and knows how to resolve it, help would be appreciated.
---------EDIT---------
Was able to narrow down to a specific makefile that my main makefile was including. It was defining part of it's targets, but not all of them. Still not sure why the -j flag brought this to light, but at least it's working now
I had the same problem: my compilation failed when using "make -jN", for N>1. After some research I found the same issue described here.
The problem is likely caused by a bug introduced in DrvFs, the Windows filesystem plugin for WSL, and it happens at least in Windows builds 16273.1000, 16299.19 and 16299.64 (mine). It doesn't happen in build 16251.
According to this, the bug was fixed on Windows Build 16299.98.
Since I cannot update my Windows due the company policies and I couldn't execute this workaround, I moved my files from /mnt/c to /home/<username> and they compiled without further problems.
I am coding in C++, using the SFML, since a little bit of time and everything has been running fine.
This morning I've been using the type sf::Image and some functions on that type, such as getPixel.
Then, the compilation works fine, however, when I try to run it, I get the missing dll error on sfml-graphics-d-2.dll.
I looked in the folder and I could see that indeed, there was no such dll! There was his brother sfml-graphics-2.dll instead however.
Why is it asking for the dll that I don't have :( ?
Informations:
I use code::blocks.
Linkers seems to be ok :
"C:\Program Files (x86)\SFML-2.3\lib\libsfml-graphics-d.a" for the debug
"C:\Program Files (x86)\SFML-2.3\lib\libsfml-graphics.a" for the release
I use the SFML2.
I'm on Windows 8.
My compiler is GCC MinGW.
I can't find sfml-graphics-d-2.dll on my computer (because I had to compile the SFML using Cmake, and it only generates files like sfml-graphics-2.dll, not like sfml-graphics-d-2.dll)
Thank you very much if you can help! :-)
The -d in sfml-graphics-d-2.dll stands for debug, so when you are building SFML, you need to change the build target from Release to Debug.
The Debug build target should have been generated by CMake when you ran it.
I changed my IDE from Eclipse to IDEA. I'm tring to configure it to work as effective as possible. I have following problem. I want IDEA to show me all files with compilation errors automatically after one file has been changed and causes the problem. I installed IntelliJ Eclipse Mode plugin and selected Eclipse compiler, but i have still following problem: In module-interfaces I have one interface - assume InterfaceA. Its implementation is contained in module-implementation1 Implementation1 and in module-implementation2 Implementation2 both depends on module-interfaces. Now when I change one interfaceA's method signature and save it, make is automatically triggered (eclipseMode plugin) but there is no compilation errors since in current module only interface resides. When I select all modules and select make selected modules compilation stops on the first module having errors i.e. module-implementation1 so I see only problem with Implementation1. Once I fix this implementation and start manually make process then IDE shows compilation error in Implementation2.
Is it possible to configure Intelij so that it compile all dependent modules and shows all files having compilation problems at all, as eclipse does?
Thanks in advance, it is really confusing to me.
See this answer. Basically, looks like it will be supported in IntelliJ 12
I've recently started using PDCurses in a C++ game I'm working on. When I compile the program on my own machine (windows) and run the .exe, everything works as it should.
When I take that .exe onto a different computer that doesn't have PDCurses and I try to run it, I get an error about a missing pdcurses.dll file.
After doing a bit of research online, I found out that including the .dll file along with the .exe should make it run but it didn't work for me.
This is how I compiled the program using MinGW: g++ game.cpp -o game -lpdcurses
So my question is, how do I make this program run on computers that don't have PDCurses setup, and also, is there a way to do this by combining the .exe with whatever additional file(s) the system needs to run the program? I've also read that you can do some sort of static linking but so far I've been unable to find a way to do this.
Thanks in advance for the help.
NOTE: In case it matters, I setup PDCurses following this tutorial: http://comptb.cects.com/1848-adding-pdcurses-to-mingw
Not sure if that was the best way to do it but I'm able to compile and run C++ code that uses pdcurses on my computer fine.
Sorry for not posting the exact messages. Here they are:
The first one I got when I didn't include the pdcurses.dll file along with the executable said :
The program can't start because pdcurses.dll is missing from your computer. Try reinstalling the program to fix this problem.
The second one I got after I included the pdcurses.dll:
*The program can't start because libcc_s_dw2-1.dll is missing from your computer. Try reinstalling the program to fix this problem.*
You need to include all the dynamic libraries you linked with. Be careful of licensing, although IIRC there's not much that will bite you with MinGW.
There should be a 'ldd' command if you have the MinGW shell. Try running it on game.exe and it will tell you what libraries you need to run your program. You need to include them all with the exe.
If you want to try and remove the dependency nightmare you can use the static linking (-static) option to your gcc link command. You may not be able to actually do that if you don't have the static versions of your libraries installed. This has other implications - your exe will be bigger and the OS's shared shared page code will not work because it can't tell what parts (DLL code) you are sharing with other apps. In effect, your application will use more memory as a result, although it may be insignificant.
Another option is to get the sources to PDCurses and compile it as a static library. That way you don't have to get involved in the DLL Hell.
Compile it as a C library instead of a C++ library and you should be good to go.