How can i solve this Erorr Could not open SSL LIbray - freepascal

Hey i am getting this error if i start my program. I am using Lazarus as plattform.
I am trying to get the source code of the site with following code:
uses Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, StdCtrls,
fphttpclient,openssl,fpopenssl,Buttons;
s := TFPCustomHTTPClient.SimpleGet('https://freepascal.org');
In the end my programm should show me the source code in the programm.
Thanks for your help:)

Download OpenSSL binaries and copy the DLLs in your executable folder or somewhere on the path. Pay attention that there are a lot of OpenSSL versions and they are not always interchangeables! Be sure to download the correct one.
If you have already the OpenSSL installed, then use a tool like ProcessMonitor to spy on your own application to find out which DLL it tries to open and where it expect the DLL to be.

Related

How to add arduino libraries to espressif IDE?

We are working on a project which requires CAN communication in it. We have made some code in the Arduino IDE which we are trying to do in ESP IDE. However, there are some libraries which we are finding difficult to import into the esp IDE, example (Adafruit). Is there any way we can do it?
We cloned the Arduino as component library from the github and made the necessary changes into some basic codes such as wifi scan from arduino IDE which worked successfully in the espressif IDE , we tried the same method and cloned the Adafruit libraries for OLED and MLX sensor but each time we tried to build program, it highlighted the library includation line and said "no such file or directory exits", we expect for a method to resolve this issue.
You can install libraries from a local ZIP file or by using the built-in library manager.
Go to Sketch > Include Library > Manage Libraries. Type a name in and find the one that you want to install and click install.

Compiling sqlite-winrt for using SQL in WinRT/WP app with SQLite

I'm trying to use the sqlite-winrt library at https://sqlwinrt.codeplex.com (cf. http://blogs.windows.com/windows_phone/b/wpdev/archive/2013/05/30/sqlite-winrt-wrapper-for-windows-phone.aspx) because I need to access an SQLite database via SQL commands in a WinRT 8.1 and a WP8 app and this library seems the only available option.
Anyway, there is no binary release and if I try compiling the source I get several link errors for unresolved externals against the SQLite DLL. I posted an issue at codeplex but got no reply yet, so I was wondering if anyone had already managed to successfully compile this lib and how (or if you know of any viable alternative for RT8.1 and WP8). Here is what I did:
downloaded the latest source from the site.
downloaded and installed 2 VSIX from http://www.sqlite.org/download.html: sqlite-winrt81-3080002.vsix for RT 8.1 and sqlite-wp80-winrt-3080100.vsix for WP.
executed the powershell scripts in each subfolder of the source code solution, which are required to update the projects with newer releases of the SQLite for WinRT extension. The current versions of the scripts refer to SQLite for WinRT 8.1 (prerelease) which is the same I downloaded above.
opened the VS2013 solution and removed the RT project (I just need RT8.1 and WP, this was for WinRT 8.0).
5) built the solution, which failed with link errors.
If I see the RT8.1 project properties, I can confirm the reference to SQLite is under C:\Program Files (x86)\Microsoft SDKs\Windows\v8.1\ExtensionSDKs\SQLite.WinRT81\3.8.0.2.
Did anyone manage to use this lib? Thanks!
I also once had that problem. I fix it by editing the project file manually. At that time, the powershell script updating the wrong path. That's why I always failed when compiling my project. After I edit the project file using external text editor (I use sublime text), the projects are linked correctly.
You can try DatabasesCx. It is another SQLite Wrapper using Windows Runtime Component technology. It is freeware distributed as precompiled binary. You can find the details at http://www.almanacsoft.com/databasescx

How to build OpenSSL for WP8?

How to build OpenSSL for WP8?
AFAIK, we must replace winsock.h by winsock2.h because WP8 only supports winsock2.h. And maybe we must replaces code to target WinRT architecture on WP8 (ThreadPool, ...)
The caveat is that we must build OpenSSL as WP8 static library, so that the output lib can be wrapped by WP8 runtime component, right ?
You can use the Microsoft openssl fork on github with support for windows phone 8.1/8.0 and Windows Store 8.1, that address the entropy on each platform using windows random generators, instructions are located at INSTALL.WINAPP, there is a script located at
ms\do_vsprojects.bat
you should be able to just execute that script withing the root location and open vsout\openssl.sln to build the openssl libraries for different windows platforms.
The fork is located at
https://github.com/microsoft/openssl
At this momment these changes are being in process to be integrated with the main OpenSSL source code base.
here is what you have to do, go to this link and download the VSbuild, now put that into the source files downloaded from the OpenSSL website, the folder structure should look like this:
apps
bugs
certs
.....
vsbuild
once that is done, open the solution, it should upgrade it to VS12, change the settings to a Windows Phone RT build, to generate DLL's there is no need to build *_lib*, so change the other projects, most changes you need to do are to libeay32, do not compile openssl project, just ignore that, start by building libeay32, and start making changes to the code, as there are some functions we don't have in WinRT, you can either #ifdef them out, or create your own functions,
NOTE for rand_win.c change the functions to use rand_s and #ifdef most of the code there is, this might muck up the security, you will have to test it out yourself
Good Luck !
This is so that if anyone wants to build the new version of OpenSSL "1.0.1g" that fixes the Heartbleed problem you can follow the previous steps whit the following changes:
I renamed the folder include to --include and create a new folder named include, the VS project will take care of copying the information, --include if you like you can remove this, when i build the project without this change there where compilation issues.
Note: the include folder that i changed is the one found in the root not the one found under VSbuild
Enjoy
Here is a download of pre-compiled OpenSSL libraries for Windows Phone 8.1 among other platforms:
https://www.teskalabs.com/blog/openssl-binary-distribution-for-developers-static-library
Disclaimer: I run that site.

Mysql Plug-in for Qt

I've installed recent Qt (4.5.3) sdk windows version. I'm want to use mysql in my app. Since Qt Mysql plugin in not available, so I compiled it from the included source. I copied compiled files D:\\Qt\2009.01\qt\plugins\sqldrivers.
Now when I run my application it still error "QMYSQL driver not loaded".
I suggest you take the whole Qt4 source code and compile it specifically for your own needs.
Something like this should do the job just fine:
Download the Qt source code from qt.nokia.com
Extract it somehwere and open a command prompt.
"cd" into the source directory and run "configure":
Just an example:
/Devel/qt/configure
-release
-fast
-opensource
-nomake "demos examples"
-silent
-qt-sql-mysql
You might have to additionally provide -I C:\path\to\mysql\includes and -L C:\path\to\mysql\libs.
After that, do "make install".
Hope that helps.
There may be several reasons leading to the driver not being loaded, I experienced several of them in my Qt experience.
Qt provides good documentation on this point, I suggest you have a look at the Troubleshooting subsection of Qt Assistant's SQL Database drivers section, it should help you diagnose your problem. It worked for me.
Hope that helps.
After compiling the plugin, you need to add the MySQL bin path to your PATH environment variable.

error in CUDA compilation

I'm getting this error while trying to run sample codes in CUDA SDK. I have CUDA 2.3 and Visual studio 2008
LINK : fatal error LNK1181: cannot open input file 'cutil32D.lib'
Any pointers how to solve this?
Since you're compiling the SDK samples, the project files are probably correct. Far more likely is that you haven't built the cutil library. Go to the SDK install directory, then into the "C" directory. You'll see a "common" directory, in there open the cutil.sln solution (or cutil_vc90.sln for VS2008) and build it in release and debug modes for your platform.
Then try your sample again.
The cutil library is used to avoid replicating the same code through all the samples, if you're starting your own project I'd avoid reusing the cutil library and write your own checker. For example, you should probably fail gracefully if you detect a CUDA error rather than just calling exit() as done in cutil.
The cuda.rules file included in the SDK is highly recommended! Using this you can just add .cu files to any project and Visual Studio will know how to compile them and link them in to the final executable. Easy!
Your MSVC project needs to include the library cutil32D.lib to link. Once you specify it as a library the linker needs to include in the final binary artifact this problem will go away. It would seem the library is missing at the location the linker is going to look for it. You'll have to change the library search paths or move that file to a directory in which the linker is already looking.
I ran into the same issue. It turned out not only did I need to build the cutil project but also the shrUtils project under the SDK's shared folder.