I want to build nginx into a static library(preferably),but a dll could work as well.
Has anyone tried this before ?
Currently I have no luck on building ,tried to use the lib.exe to build the .objs into a lib,but when I try to use that library I get unresolved external for every function.
I have also tried creating a dll changing the CFLAGS from -MT into -LD ,wrapping the main into an exported function with __declspec(dllexport) but when I try to start the nginx main I get the Access Violation error.
Any hints would be appreciated.
The platform I am working is Windows.
2
votes
1 Answers
4
votes
My answer came somehow late. I have already build a windows static library from nginx source and using the configuration file delivered with. You have to remove nginx.c file from Makefile build rule. Then you must make sure your MAIN function does the same as nginx.c main function.
It's a little awkward to integrate Nginx in other project because it was designed to be the backbone and the other part would be staticly linked-module.
Bon Courage;)