ld exe in MINGW can not find library - c++

I am trying to build C++ code using MINGW 64 bit 4.8.0 and MSYS2.
I am using Windows 7 x64 with Netbeans 8.2 IDE.
I am getting below error while building the code
c:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/4.8.0/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot find -lldscripts
c:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/4.8.0/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot find -l6to4svcl
I search the entire MSYS/MINGW folder for these two library but I did not find any, is there any toolchain that need to be installed for this?

There is something wrong with Netbeans, I switch to codeblocks and same code works.

Related

codelite scan could not locate mingw any on your machine error

I installed mingw and checked it in cmd by writing c++ --version it runs sucessful but whenever i open my codelite it says could not locate any mingw on your machine i have tried reinstalling both mingw and codelite few times nothing works someone please help me
Tried scanning mingw compiler on codelite but it could not locate mingw and it(mingw) is already installed in my machine and running too help me please
I don't know much about this IDE but this link is probably what you are looking for.
https://wiki.codelite.org/pmwiki.php/Main/AddNewCompiler
Since the scan failed you will have to manually add the path to your compiler in codelite. The compiler will most likely be in the mingw folder under the name 'g++.exe'.

CLion Cygwin (32 bit) version 2.11.2 GDB Debugging Error 0xc0000135

EDIT 1
This seems to be related to linking to the mono library, once I remove any kind of reference to mono code and remove the linking to the library from my CMakeList.txt file, debugging works as expected.
EDIT 2
Okay, I've discovered something interesting. This actually might not have anything to do with how I am linking libraries, it appears to be directly related to how I am initialising a class in my unit test. For whatever reason, if I use my normal syntax of TypeDeclaration variableName; the unit test fails immediately with the error code 0xc0000135, but if I change it to read TypeDeclaration variableName(); the code will run. Only problem is that I then get a warning stating empty parenthesis interpreted as a function declaration. I came from linux using g++ to compile my code and there was never an issue, now all of a sudden trying to compile on windows using cygwin or mingw means I can't use the normal standard c++ syntax to actually do work...
Edit 3
I've discovered that this issue is occurring because the libraries I am dependent on aren't actually being copied into the build directory of my unit test project. If I manually copy the required libraries into my build directory debugging works as expected, will need to learn how to express this requirement in CMakeList.txt
More Details
CLion Specifics
CLion 2018.3.1
Build #CL-183.4588.63, built on December 5, 2018
JRE: 1.8.0_152-release-1343-b16 amd64
JVM: OpenJDK 64-Bit Server VM by JetBrains s.r.o
Windows 10 10.0
Toolchain Settings
Cygwin 32 bit version 2.11.2
CMake version 3.13.1
Make version 4.2.1
gcc version 7.3.0
Debugger Cygwin GDB version 8.1.1
catch.hpp for unit testing.
Problem
When debugging a unit test, CLion reports the following error:
During startup program exited with code 0xc0000135.
Google returns a lot of Qt and netbeans related results, everyone suggests to add C:\mingw\bin to the system PATH variable. However I am not using mingw I am using cygwin. I tried adding C:\cygwin\bin to my PATH directory but that does not help. I also tried switching toolchain to use mingw to see if that would help. but the same problem occurs with debugging.
Not sure what else I can do to proceed in resolving this one, any ideas would be most welcome.

SFML 2.1 Code::Blocks Static linking not working,

I am new to the idea of linking libraries in c++, and am trying to get SFML to work with C++. I am on Windows 7 64-bit and am using Code Blocks. I have downloaded the 32-bit mingw GCC SFML DW2 version of SFML. I followed this tutorial: http://www.sfml-dev.org/tutorials/2.0/start-cb.php to set up code blocks. I am staticly linking the libraries. When I press the "Build" button, I get whole host of errors, with undefined reference to '__Unwind_Resume' and '__gxx_personality_v0'. I have looked up this issue, and have only found command line fixes, using g++ instead of gcc. I cannot do this within the codeblocks UI. Can someone give me a hand?
The version of the compiler shipped with code::blocks is the 32-bit 4.7 TDM-SJLJ one, so you need the version of SFML compiled with the same compiler (GCC 4.7 TDM (SJLJ) - 32 bits)
If you want to use the 64-bit version of the library you need to install the 64-bit version of the compiler, available here
change the linker program in settings->compiler->toolchains to g++.exe or mingw-g++.exe

Using minGW not in PATH with eclipse CDT

In my professional computer, I have minGW 4.5.2 installed. Eclipse CDT works perfectly with it.
But I want to test some C++11 features. So I copied my minGW 4.8.x folder from my personal PC.
My problem is that eclipse uses libraries from the old minGW (witch is the PATH).
I'd want to set eclipse up to use the new version of minGW.
I know how to change the g++ used for compiling/linking but not the include libraries.
Any idea ?
Thanks a lot.
PS : I can't change the PATH in my professional computer. I run Windows 7
You can try creating a batch file the following code, assuming the MinGW you want to use is in C:\MinGW :
set PATH=C:\MinGW\bin;%PATH%
start eclipse.exe

How do I need to configure Eclipse to create a C++ program?

I installed Eclipse for C/C++ Developers.
After installing it I also installed PyDev.
I managed to create a C++ project (The Hello World project that comes with it). But I cannot compile/run it.
When I created the project there was nothing in the toolchain list. So I think I will need to install a toolchain. But I cannot find anything. I need someone to help me with this please.
I am using 64 bit Windows 7.
No compiler, no executable.
Check MinGW
This is one of the first results i got in google for eclipse and mingw:
http://max.berger.name/howto/cdt/cdt.jsp
You need to install not only Eclipse CDT, but also a C/C++ compiler for Windows, like minGW.
Try installing TDM-GCC from http://tdm-gcc.tdragon.net/ . This should have you up and going with a compatible GCC setup under Windows in a snap.