Forum > Networking and Web Programming

microhttp guidance please

<< < (2/2)

Michael Collier:

--- Quote from: Thaddy on August 07, 2024, 07:43:36 am ---What happens if you copy  libmicrohttpd.pp and the example over to a new directory and change the version to libmicrohttpd-12 ?

--- End quote ---
It gave error 0xc0000022


--- Quote from: Thaddy on August 07, 2024, 07:43:36 am ---You need to use a 32bit FPC compiler.

--- End quote ---
I used fpcupdeluxe to install i386 compiler and tried with that (Target OS=Win32 and Target CPU=i386) I can't seem to compile Win64 & i386 (I get FPC configuration warning)

I've gone through all combinations I can think of to compile 32/64 bit and trying different DLL (10 & 12).

Always same error 0xc0000022


Thaddy:
I seem to remember that error 0xc0000022 is a permissions issue. Try to run as administrator and if that works, add a manifest resource with elevated rights.
Example manifest:
--- Code: XML  [+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i < x.length; i++) { x[i].style.maxHeight='none'; x[i].style.height = Math.min(x[i].clientHeight+15,306)+'px'; x[i].style.resize = "vertical";}};} ---<?xml version="1.0" encoding="UTF-8" standalone="yes"?><assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">  <assemblyIdentity version="1.0.0.0" processorArchitecture="*" name="YourApplicationName" type="win32"/>  <description>Your application description</description>  <trustInfo xmlns="urn:schemas-microsoft-com:asm.v2">    <security>      <requestedPrivileges>        <requestedExecutionLevel level="requireAdministrator" uiAccess="false"/>      </requestedPrivileges>    </security>  </trustInfo></assembly>
It may be enough to add this instead:
--- Code: XML  [+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i < x.length; i++) { x[i].style.maxHeight='none'; x[i].style.height = Math.min(x[i].clientHeight+15,306)+'px'; x[i].style.resize = "vertical";}};} ---<requestedExecutionLevel level="highestAvailable" uiAccess="false"/>The latter means that if the user is in the administrator group, requireAdministrator will be in effect.
Users that are not in the administrator group can not run the application, but will be notified that they have insufficient rights.

Michael Collier:

--- Quote from: Thaddy on August 08, 2024, 07:51:34 am ---I seem to remember that error 0xc0000022 is a permissions issue.

--- End quote ---

Ok yes that seemed to be the problem..

The exe and DLL's reside on a linux drive, the windows machine has a drive mapped to their location.

When I copy the exe and DLL's to windows desktop and run from there it is ok, but (so far...) must use exe compiled as 32 bit and use the version 10 DLL's - but at least it is running now.

Michael Collier:
I'd like to get macOS (macbook air) working too..

Found libmicrohttpd on this site, is it the correct download? (couldn't find libmicrohttpd-dev as per linux):
https://formulae.brew.sh/formula/libmicrohttpd

So I installed the Homebrew system (https://brew.sh/)
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"

And installed libmicrohttpd
brew install libmicrohttpd

I can see header file (microhttpd.h) and dylib files ( libmicrohttpd.12.dylib and 'shortcut' libmicrohttpd.dylib ). I've tried copying these files into simpleserver project directory (tried other directories, and setting library paths) but get linker errors.

The errors are 'undefined symbols for architecture x86_64' and list of names of functions that I can find in header file.

I'm not sure what to try next..?

Navigation

[0] Message Index

[*] Previous page

Go to full version