Missing libraries on compiled gtkmm program on windows (MSYS2) - winapi

after numerous issues I finally have succeeded in compiling (Using \mingw64\bin\g++) my program that uses GTK+ 3 (gtkmm3) on windows.
However, trying to run the .exe file now fails and it complains about the following missing libraries:
libstdc++-6.dll
libgcc_s_seh-1.dll
libwinpthread-1.dll
libatkmm-1.6.1.dll
I guess something about my path may be wrong? However I dont really know what to do as I didnt face something like this before. I would appreciate any help and I am willing to provide any information that may be neccessary to resolve it^^
Edit: I know I could just download or locate these libraries to make the program run, but I would like to know why it can't seem to find them as they belong to gtkmm (at least thats true for libatkmm-1.6.1.dll)

I found the answer myself... I have added in my case C:\msys64\mingw64\bin to my PATH variable. But now I face my program immediately closing after opening it. Well I guess the challenge continues ;)

Related

How to make CLion stop flagging PlatformIO dependencies with "file not found"?

I'm experimenting with using PlatformIO and the CLion IDE. I'm pretty new to C++ and writing for embedded hardware. I got PlatformIO working and my simple program compiles and runs but CLion highlights my PlatformIO dependencies as not being found.
I've seen it said that CLion looks where cmake looks, but CMakeLists.txt says
# !!! WARNING !!! AUTO-GENERATED FILE, PLEASE DO NOT MODIFY IT AND USE
# https://docs.platformio.org/page/projectconf/section_env_build.html#build-flags
That URL seems like a dead end in terms of helping me solve my problem.
Update:
I was playing a little bit more with CLion and PlatformIO and wanted to use the library manager as well.
The installed libraries are located in {PROJECT_DIR}/.pio/libdeps/
I was not able to detect all libraries automatically, but with the method described below, I could get rid of the CLion warninings by explicitly defining the dependencies in the CMakeListsUser.txt likes this
include_directories("${CMAKE_CURRENT_LIST_DIR}/.pio/libdeps/mkrwifi1010/Keyboard/src")
include_directories("${CMAKE_CURRENT_LIST_DIR}/.pio/libdeps/mkrwifi1010/WiFiNINA/src")
For the few dependencies I got, this is sufficient. But of course it is not ideal to add every dependency manually. So if somebody has a better solution, please share it.
Original Answer
I stumbled on a similar issue, but maybe this could help you or others.
In my case, I added the ArduinoLog library in the "lib" folder. Although I was able to compile my code, the import showed up as an error and I had no code completion.
As described in the XMakeList.txt, I was able to resolve this issue, by adding a "CMakeListsUser.txt" in the root project directory with the following content.
include_directories("${CMAKE_CURRENT_LIST_DIR}/lib")
After a rebuild and a restart I got no more errors and the code completion worked as expected. Maybe you can add the folder of your PlatformIO libraries there as well.
Seems like the best way to do it is to go to Tools->PlatformIO->Re-Init. New dependencies should stop showing up as missing.
It worked for me.
Source: https://community.platformio.org/t/clion-cant-find-lib-deps-library-headers/23929/2

How to develop for PIC32MM without either MPLABX or XC32

While working for just one month with the MPLABX5.5 + XC32 3.01 I've already had 3 separate instances where code compiled incorrectly, causing my program to fail after either the stack or frame pointer began using an incorrect address. I would like to dump these tools and try something else as tracking down compiler errors is sucking up too much of my time. Is there anything else available that I can use to work with a PIC32MM? Even access to a different compiler than XC32 might help.
I would like to do the same thing. Maybe we can collect the best options for how to get there, as after many many tries, I haven't yet been successful. As one starting point, I'd also like to be able to recompile xc32-gcc from source to understand exactly what it's doing, and to be able to compile xc32 binaries for other architectures (like, as insane as it may sound, I'd like to compile some code for the pic32mm platform with clang or gcc running on a raspberry pi.)
I would love to be able to even just compile xc32-gcc from source. I know this is possible, but I've not been successful. Some links and starts:
https://github.com/zeha/xc32
This seems to be the most recent grouping of source I've found, but I haven't yet figured out how to compile it.
ChipKit is cited a lot, but, I haven't gotten to the bottom of getting that to build for me either. There are numerous projects here, and I'm not sure how they all fit together yet:
https://github.com/chipKIT32
I suspect somebody (maybe someone who will see this post) knows the formula or script or docker file, or whatever to make this simple.
https://gitlab.com/spicastack/pic32-parts-free
This project seems close to what we're talking about, but, the
recommended way to install is with podman and gentoo. I'm not a
gentoo person (yet?), and the docker version failed for me. It's
probably a simple fix to the dockerfile for a gentoo person, but.. I
didn't get there yet. (I did try installing gentoo and started down
the path but holy cow, talk about being down a rabbit hole when what
I'm trying to do is get a pic cross-compiler working.. when emerge on my new gentoo install failed with a python error, I gave up.)
https://github.com/andeha/Twinbeam
This project also says some of the "right things" about building pic32 code using llvm, and has references to llvm2pic32 in this project: https://github.com/andeha/Sprinkle
I've also not yet managed to get this to make viable intel hex files that I can use on a pic just yet, but there's promise.
Use clang/llvm to generate code. I think it will compile C and generate mips out of the box and I've gotten that far, but I can't get it to link and produce a valid hex file yet. The linker scripts from microchip seem sort of ok, but the hex files end up putting the code in the wrong place, I think. I should probably put together a blinky-light example and try to push it farther, and share it with others to figure out what the deal is, but even stepping one step further back and just trying to get a super simple mips assembly program to get linked and be uploadable to a PIC32MM part would be a great success to me.
Maybe others have better references and links?

How to compile srlua (or a link to the binaries)

Related:
How to compile srlua?
How do I Make an executable Lua script using srlua?
The first link is the exact question I am asking here. However, the sole answer is unsatisfactory as it assumes multiple things, namely that the OP is already using Cmake (a fact disproved by the OP's comment on the answer). The second link seems to already be most of the way through a tutorial, and while a link to precompiled binaries for both srlua.exe and srglue.exe are provided, the link no longer contains binaries but instead the source.
I have found several other threads on various websites all asking the same thing, but all of them either assume that you essentially already know how, or explain nothing (many have potentially helpful links, but they are old and no longer work).
I have already tried to compile srlua, and got a srglue.exe, but when I tried srlua.c I ended up with a list of undefined references (such as "lua_type" or "lua_getfield").
lua_getfield, lua_type, lua_settop, lua_getfield, lua_type, lua_settop, lua_pushstring, lua_pushinteger, lua_call, lua_pushfstring, lua_load, lua_tolstring, lua_tointeger, lua_touserdata, luaL_openlibs, lua_createtable, lua_pushstring, lua_rawseti, lua_setfield, luaL_checkstack, lua_pushstring, lua_call, lua_tolstring, luaL_callmeta, lua_type, lua_type, lua_typename, lua_pushfstring, luaL_newstate, lua_pushcclosure, lua_pushcclosure, lua_pushinteger, lua_pushlightuserdata, lua_pcall, lua_tolstring, lua_close
My question is this:
How does one use a C compiler (I know the basics of gcc) to compile srlua specifically? Or, if anyone has a functioning link to either precompiled binaries or a tool to compile the binaries, could they share it?
Important: I am on Windows. Thus, I cannot just use make. I must actually compile the .c files to .exe files. I am asking how. If you simply provide links to threads with the aforementioned problems, you are not helping. If you give an answer that assumes in-depth prior knowledge of a particular tool that does not have good documentation, you are not being helpful. If you tell me tools to use, but not the specific procedure for compiling srlua, you are not being helpful. If there is a better place for this, tell me and I can move it there.
I don't know any Windows pre-compiled binaries for srLua.
To compile srLua, you should first install the Mingw compiler to use GCC as a C compiler : you can install TDM-GCC (https://jmeubank.github.io/tdm-gcc) or http://winlibs.com.
You can then open a Console prompt. Enter the "gcc" command to be sure that the compiler is working (and that the PATH is correctly set).
Then go to the directory you extracted the srLua source files and type the command :
mingw32-make
Cross your fingers and it should compile everything :)
When linking, you should include the Lua libraries with the -l Switch : -llua54 for Lua 5.4 library for examples.
I found this already compiled release on webarchive, it's kinda old but works:
https://web.archive.org/web/20130721014948/http://www.soongsoft.com/lhf/lua/5.1/srlua.tgz

cudart32_31_9.dll is missing from your computer

I have a visual studio 2010 c++ solution (with cuda and nsight), it builds just fine, but I try to run it, it tells me this:
The program can't start because cudart32_31_9.dll is missing from your computer. Try reinstalling the program to fix this problem.
I've looked and I have cudart32_31_9.dll and cudart.lib on my computer and in my linker options, I've set the Additional Dependencies with the link to my cudart.lib (which is suppose to be "linked" with the dll in question).
I've looked a on Google, but the only things I found seems to be related to a program called "Folding"... which isn't quite my problem.
Any hint would be appeciated :)
I'm assuming it's a "typo", but there is no point in linking against a DLL. To solve your main problem however, make sure that cudart32_31_9.dll is either in the directory of your executable, or that its directory is part of the PATH environment variable.

Using a .lib built with Visual Studio in Eclipse/CDT/gcc

I am having some trouble compiling a programm with gcc on windows which was initially developed with Visual Studio. So far I was able to resolve almost all problems like missing header files and such, but now I am stuck at one last thing: gcc fails to link to one of the third party libs my program uses (FlyCapture2.lib). It tells me that it does not find any of the functions/methods there. I already checked if the library is actually on the library path and that sort of things, but it still does not work.
I searched a bit around and learned that it might have something to do with the format of .libs created with the Microsoft compiler. Is there any way to convert such a lib to be compatible with gcc? Anything else I might have missed?
(I already found this similar question, but its solution won't work here)
In this page the author gives several ways to achieve what you want

Resources