make GNU gettext work for a MFC App - c++

im trying to add i18n support with gettext on my mfc app, but i found the following problems
1) The ufficial distribution stopped to support MSVC, so i found another build here.
http://gnuwin32.sourceforge.net/packages/gettext.htm
i fixed the include and linker path for the new libraries but when i try to use gettext it give me this error
Error 1 error LNK2001: unresolved external symbol __imp__libintl_gettext ToolManager.obj ToolManager
Any idea of why? im pretty sure the important .lib are in the linker path.

Try the binaries from ftp.gnome.org; latest gettext build is from 12-Sep-2010 and should AFAIK work fine with MSVC.
http://ftp.gnome.org/pub/gnome/binaries/win32/dependencies/

Related

openssl Could Not Find libcrypto-3-x64.dll

I connected openssl to my project and it compiles and runs well, but next to the program after compiling there is a file libcrypto-3-x64.dll, without which the program will not run, so the question is how do I use openssl without this dll how to integrate it into the project?
I found out what the problem is, with the dynamic library it does not exist, EVP_CIPHER_CTX_t ctx(EVP_CIPHER_CTX_new()); when I compile a program (static lib openssl) with this line there are so many errors unresolved external character (example __imp_getsockname)
VERSION 3.0.5
I compiled the library according to this guide https://youtu.be/PMHEoBkxYaQ x64 static and still errors like this "unresolved external symbol __imp_WSAGetLastError" "unresolved external symbol __imp_CertOpenStore.".
I solved my problem and leave the answer here, just add 2 libraries in Linker => Additional Dependencies
Ws2_32.lib
Crypt32.lib

Error building tensorflow C++ shared library on windows

I am trying to build tensorflow as a standalone project and have been following this tutorial
http://www.stefanseibert.com/2017/10/tensorflow-as-dll-into-your-windows-c-project-with-gpu-support-and-cmake-v1-3/
but alternatively with cpu support
My environment setup versions
protobuf 3.6.1
tensorflow 1.10.0
tf.GIT_VERSION = b'v1.10.0-rc1-19-g656e7a2b34'
Here are the steps I used to generate the shared lib
Acquired source code from https://github.com/tensorflow/tensorflow.git
Have installed the dependencies since I do not use the python bindings, there is no need for SWIG, so I installed Git (version 2.15.1.windows.2) and cmake 3.11.1
I used the 64bit tools from Visual Studio 2015 since VS2015 is necessary to build the DLL. I should be able to open the “VS2015 x64 Native Tools Command Prompt”. This is needed so VS uses the 64 bit toolset.
Navigated in the commandline to the “tensorflow/contrib/cmake” subfolder of the source code and create a directory with “mkdir build”. Afterwards navigate to the fresh build folder with “cd build”.
Create a build solution: cmake .. -A x64 -DCMAKE_BUILD_TYPE=RelWithDebInfo -Dtensorflow_BUILD_CC_EXAMPLE=OFF -Dtensorflow_ENABLE_GRPC_SUPPORT=OFF -Dtensorflow_BUILD_CC_TESTS=OFF -Dtensorflow_BUILD_PYTHON_TESTS=OFF -Dtensorflow_ENABLE_GPU=OFF -Dtensorflow_WIN_CPU_SIMD_OPTIONS=/arch:AVX -Dtensorflow_BUILD_SHARED_LIB=ON
Everything went fine till this. To build the tensorflow.dll, I issued the following command: MSBuild /p:Configuration=RelWithDebInfo tensorflow.vcxproj
This throws an error: D:\work\tensorflow\tensorflow/core/lib/core/stringpiece.h(34): fatal error C1083: Cannot open include file: 'absl/strings/string_view.h': No such file or directory (
compiling source file D:\work\tensorflow\tensorflow\core\lib\core\coding.cc) [D:\work\tensorflow\tensorflow\contrib\cmake\build\tf_core_lib.vcxproj].
I fixed the above error with this: https://github.com/tensorflow/tensorflow/issues/22007#issuecomment-424553600.
Doing the above I ended up with this error: path.obj : error LNK2019: unresolved external symbol "void __cdecl absl::base_internal::ThrowStdOutOfRange(char const *)" (?ThrowStdOutOfRange#base_internal#absl##YA
XPEBD#Z) referenced in function "class std::basic_string,class std::allocator > __cdecl tensorflow::io::internal::JoinPathIm
I am not able to proceed further. Any workaround for this? Thanks!
lnk2019 error occurs when your directly you are using in your source code are not linked properly. Please add additional dependencies to your project.
Going to project properties
select C/C++ option
Add aditional dependencies
Go to Linker Option Below C/C++
Add additional Dependencies here.
It might be help full for you from getting out to LNK2019 problem
view this to understand LNK2019 error.
I met same issue, I think tensorflow new version doesn't support CMake, but we can solve the issues.
1. Seems the absl version in project folder is out dated, so I cloned the latest version of abseil-cpp from: https://github.com/abseil/abseil-cpp
2. Use cmake to build the abseil-cpp, it will be fast.
3. Add lib path to tensorflow dependency, the needed one will be D:\git\abseil-cpp\abseil-cpp\build\absl\base\Release\absl_absl_throw_delegate.lib
4. If you meet other linking error, you can find the function name in absl sources and find the library contain it.
Hope this can help you and people who may met this issue in future.

Boost and Telegram API: unresolved external symbol

I am trying to build Telegram API to C++ from here https://github.com/reo7sp/tgbot-cpp
And it need Boost libs. I installed it, builded solution with CMake, but then I try to build my solution I have a lot of "unresolved external symbot" problems
These are OpenSSL library symbols. boost::asio::ssl requires OpenSSL. See notes at the bottom of this page: http://www.boost.org/doc/libs/1_64_0/doc/html/boost_asio/overview/ssl.html.

using OpenSSL in Visual Studio 2012

I have downloaded the latest release version of Openssl from http://www.openssl.org/source/
I would like to use it in Visual Studio 2012, especially getting the md5/sha-1 hash of a file, but I can not include / setup the environment with the openssl library. To be honest I got confused what to include, and where, however I have read the README-s.
I'm getting this error.
Error 1 error LNK2019: unresolved external symbol _MD5_Init referenced in function _main
So my question is, I have downloaded the latest release (openssl-1.0.1e.tar.gz), what should I config in VS2012 to be able to use the lib? Thanks!
UPDATE
This question helped me also in finding the solution. Boost SSL with Visual Studio 2010 and OpenSSL
The steps required to use the openSSL lib with VS2012:
download and install a version (I have 64bit OS, however I installed 32bit openssl) from http://slproweb.com/products/Win32OpenSSL.html.
New project in VS, then Configuration Properties/C/C++/General/Additional Include Directories: openssl include folder (C:\OpenSSL-Win32\include)
Linker/General/Additional Library Directiories: C:\OpenSSL-Win32\lib
Linker/Input/Additional Dependencies :
libeay32.lib libeay32MTd.lib libeay32MT.lib libeay32MDd.lib
libeay32MD.lib ssleay32.lib ssleay32MTd.lib ssleay32MT.lib
ssleay32MDd.lib ssleay32MD.lib
(It was written that I need to only add that one which matches with C/C++/Code Generation/Runtime Library, but It works me this way.)
Copy theese files into current VS folder /VC/lib
What compiler did you use to compile OpenSSL? Did you use MinGW? If so, make sure you don't strip them (or just with --strip-unneeded) otherwise import symbols will be stripped. Do the header and lib version match?
Maybe you want to try pre built ones from: http://slproweb.com/products/Win32OpenSSL.html those work for sure.

unresolved inclusion <GL/glut.h>

I am trying to get opengl to work with eclipse and I keep getting the following error
unresolved inclusion
however when i run some sample code it still works, it's just an issue of loads of errors showing up- which would make debugging next to impossible.
this is my path
GLUT is not a standard library, shipping with the OpenGL development resources. Most likely you either don't have installed GLUT or the examples you were compiling did configure additional include file search directories in their build options.
Make sure you have installed GLUT and your project build options cover the include and library paths the GLUT development files have been installed to.
You probably don't have the GL directory in your include path.