QB64.org Forum

Active Forums => QB64 Discussion => Topic started by: Mad Axeman on November 30, 2019, 04:32:25 pm

Title: Include a C library problems......
Post by: Mad Axeman on November 30, 2019, 04:32:25 pm
I'm trying to include a C library for creating PDF files but as this is all new to me I'm running into problems.
So far I've got the following

Code: QB64: [Select]
  1.     SUB wkhtmltopdf_converter (oldname, newname)
  2.  

I'm assuming it's trying to include the lib but I'm getting a C++ Compilation Failed message. When I read the error log it gives me :-

In file included from ..\\temp\\regsf.txt:1:0,
                 from qbx.cpp:987:
..\\temp\\..\\..\\pdf.h:28:34: fatal error: wkhtmltox/dllbegin.inc: No such file or directory
compilation terminated.

It looks like it can't find 'wkhtmltox/dllbegin.inc'. Any thoughts on where I should put the 'wkhtmltox' folder and its files? No matter what I've tried so far it still throws up that error.
Title: Re: Include a C library problems......
Post by: TempodiBasic on December 01, 2019, 06:03:25 am
Hi Axeman

about library to include in QB64 projects
see here
http://qb64.org/wiki/Keyword_Reference_-_By_usage#Libraries: (http://qb64.org/wiki/Keyword_Reference_-_By_usage#Libraries:)

here how declare a new external library
http://qb64.org/wiki/DECLARE_LIBRARY (http://qb64.org/wiki/DECLARE_LIBRARY)

here example of C library
http://qb64.org/wiki/C_Libraries (http://qb64.org/wiki/C_Libraries)

here DLL
http://qb64.org/wiki/DECLARE_DYNAMIC_LIBRARY (http://qb64.org/wiki/DECLARE_DYNAMIC_LIBRARY)

Good work!

PS include files like header must be in the QB64 directory for compilation!