You saved me again! Success
Thank you so much.
libhpdf.lib is there among my other libs, phew! I am too tired to check if it works fine, we'll see.
Perhaps we should have here a seperate forum category, something like "popular libs and dlls".
A place with compiling tutorials, test code etc. This could attract newbies that usually switch to another IDE whenever they cant get any precompiled stuff.
edit:
So i compiled libhpdf.lib, tested a simple code and what I received when comiling a simple win32 code is:
POLINK: error: Unresolved external symbol '_deflateInit_@16'.
POLINK: error: Unresolved external symbol '_deflate@8'.
POLINK: error: Unresolved external symbol '_deflateEnd@4'.
Looks like zlib's stuff, I played a little with defining ZLIB_WINAPI here and there with no success.
What i did:
1. Downloaded src files: zlib, libpng, libhpdf
2. Compiled zlib lib according to TimoVJL instructions (applied the fix he mentioned) -Ze -Go
3. Compiled libpng lib according to TimoVJL instructions -Ze
4. Compiled libhpdf, I didnt use any scripts, -Ze -Go. I simply grabbed all the c files, all the h files + libharu-libharu-d84867e\win32\include\hpdf_config.h and gave it a go in an empty lib project. According to the website, it can be compiled easily with no tricks.
Simple code:
#include <hpdf.h>
#include <windows.h>
int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance,
LPSTR lpCmdLine, int nCmdShow)
{
HPDF_Page page1;
HPDF_Doc pdf = HPDF_New(NULL, NULL);
page1 = HPDF_AddPage(pdf);
HPDF_InsertPage(pdf, page1);
HPDF_SaveToFile(pdf, "pdf1.pdf");
HPDF_Free(pdf);
return 0;
}
Am I doing something wrong?