I use QtCreator 2.6 with Qt 4.8.4 and trying to compile my code on Windows 7 x64 by MinGW (4.4, 32bits).
I included Apache Thrift to my project, and got errors on file thrift\windows\GetTimeOfDay.cpp:
'errno_t' was not declared in this scope
'_get_timezone' was not declared in this scope`
'_get_daylight' was not declared in this scope
Have you ideas how yo solve that problem?
I got working idea. We must avoid all GetTimeOfDay, and delete from project files GetTimeOfDay.cpp, GetTimeOfDay.h and use <time.h>'s function gettimeofday.
If someone will get same error, I can provide more code.
And, of course, if you'll find better way to solve that problem (or point, that problem is solved in further versions of Thrift) -- feel free to post here! :)
Related
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
I am trying to install SFML(2.5.1) in CODEBLOCK(20.03) with and currently using windows 8.1. I have downloaded sfml-tdm-sjlj-32 bit as per the tutorials that I saw in the web. I did all the set-ups and declared all the linkers properly but unfortunately it gave me error asking for libgcc_s_sjlj-1.dll not found so I downloaded it and added to my CODEBLOCK environment. After doing so I build and debugged a code that I got from SFML::CODEBLOCK tutorial just to test it but it gives me the following error -
The procedure entry point_gxx_personality_sj0 could not be located in the dynamic link library c:\sfm\sfml\sfm-graphics-d-2.dll
thank you in advance :)
Don't mix gcc exception models. Your environment probably uses Dwarf and now you want to use a library compiled with a GCC that uses SJLJ. Even if you get it to link it's likely to crash if there is any C++ code in there. Best is to use SFML compiled with the same compiler the rest of your environment uses, or even build it from source.
I have tried the download folder for kotlininc, and did everything the instructions said. And I'm still getting an error saying:
error: Could not find or load main class org.jetbrains.kotlin.runner.Main
Is there a lite weight simple kotlin compiler for windows which is easy to install?
something like javac
or g++
etc
If you don't want an IDE, I would recommend using a build tool. Kotlin supports Ant, Maven, and Gradle.
Of course, using the plain kotlinc command-line compiler is the simplest, but you already linked to it. If you need help figuring out what you're doing wrong with that, create a new question and explain/show what you've tried.
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 ;)
I'm trying to compile a project someone wrote in visual C on my Netbeans+cygwin, and there are a lot of libraries I don't have.
One of the problems is conio.h, and it seems like I can use curses.h.
How do I get curses library?
Use Cygwin, as larsmans suggested.