It is currently Thu Jul 02, 2020 11:05 am

All times are UTC + 1 hour




Post new topic Reply to topic  [ 25 posts ]  Go to page Previous  1, 2
Author Message
 Post subject: Re: Create QRCode (2D-Barcode)
PostPosted: Tue Aug 06, 2013 3:38 pm 
Offline
Addict
Addict
User avatar

Joined: Thu Oct 16, 2003 8:30 pm
Posts: 1998
Location: North Florida
jassing wrote:
did you create the lib as indicated before your 1st post?


Sure did. I will try it again, for fun.

** still no go **

I have the DLL, created the lib.. do I need to register the DLL or the lib .. ?


Top
 Profile  
Reply with quote  
 Post subject: Re: Create QRCode (2D-Barcode)
PostPosted: Tue Aug 06, 2013 5:11 pm 
Offline
Addict
Addict

Joined: Sun Jun 25, 2006 7:28 pm
Posts: 1404
Hi
here is what i have done since i have beta 8 also and works okay.
1- download QrcodeXtra.7z from https://docs.google.com/leaf?id=0B_EW83 ... ist&num=50 mentioned above, you may need google chrome
2-and as jack said copy qrcodelib.dll to C:\PureBasic\Compilers and from prompt : polib qrcodelib.dll /machine:ix86 /out:qrcodelib.lib
so now the qrcodelib.dll and qrcodelib.lib in c:\purebasic\compilers folder.
3- edit the code above line 20 so it is:
ImportC "qrcodelib.lib"
instead of ImportC "..\Lib\qrcodelib.lib"
run it click on size


Top
 Profile  
Reply with quote  
 Post subject: Re: Create QRCode (2D-Barcode)
PostPosted: Tue Aug 06, 2013 5:18 pm 
Offline
Addict
Addict
User avatar

Joined: Thu Oct 16, 2003 8:30 pm
Posts: 1998
Location: North Florida
applePi wrote:
Hi
here is what i have done since i have beta 8 also and works okay.
1- download QrcodeXtra.7z from https://docs.google.com/leaf?id=0B_EW83 ... ist&num=50 mentioned above, you may need google chrome
2-and as jack said copy qrcodelib.dll to C:\PureBasic\Compilers and from prompt : polib qrcodelib.dll /machine:ix86 /out:qrcodelib.lib
so now the qrcodelib.dll and qrcodelib.lib in c:\purebasic\compilers folder.
3- edit the code above line 20 so it is:
ImportC "qrcodelib.lib"
instead of ImportC "..\Lib\qrcodelib.lib"
run it click on size


Thanks, it turns out that I was libbing a different version of the DLL than the one in that google docs download. Should be noted.

** and ps, you don't need to leave it in the compilers dir.. the app directory is fine.

- np


Top
 Profile  
Reply with quote  
 Post subject: Re: Create QRCode (2D-Barcode)
PostPosted: Thu Jan 07, 2016 4:37 am 
Offline
Addict
Addict
User avatar

Joined: Thu Jun 04, 2015 7:10 am
Posts: 1672
hello does anyone have 64bit libs?
thanks dige for the demo!!! :)

_________________
Thankyou to all the coders who generously helped & encouraged me in the nearly 2yrs when i was welcome here,
it was a tremendous privilege. I learned a lot. I wish you and your families all the best and success for the future.


Top
 Profile  
Reply with quote  
 Post subject: Re: Create QRCode (2D-Barcode)
PostPosted: Mon Feb 12, 2018 5:17 pm 
Offline
Enthusiast
Enthusiast
User avatar

Joined: Mon Feb 25, 2013 5:51 pm
Posts: 580
Location: US or Estonia
The reason it's hard to write a scanner is because you have to deal with noise and light levels when you get data from something like avicap32.dll. Getting dimension and angle using markers then decoding isn't that complex. Generating is just following the spec which uses only black and white and ninety degree vector shapes in proportion of markers.

Mobile devs have CIDetectorTypeQRCode for IOS and Barcode API for Android which is why everyone has a QR scan feature without knowing how it works..

I've yet to see a static scan lib on x86 though which sucks because QR is a fast air-gapped method for copy and paste.. I've transferred source code using it in seconds before..

_________________
The truth hurts.


Top
 Profile  
Reply with quote  
 Post subject: Re: Create QRCode (2D-Barcode)
PostPosted: Mon Jun 17, 2019 9:41 pm 
Offline
New User
New User

Joined: Fri Apr 28, 2006 4:20 pm
Posts: 9
Location: Missouri
I was able to create a program using Dige's code (thank you) that creates a scannable QR Code. It works fine from the compiled code but fails to start as an executable with the following error message:

The program can't start because qrcodelib.dll is missing from your computer. Try reinstalling the program to fix this problem.

I have both qrcodelib.lib and qrcodelib.dll in the compiler folder.

Any guesses as to what I'm doing wrong? Any help would be appreciated.

I'm using Purebasic 5.60 on WIndows 7 Ultimate and W10 Pro


Top
 Profile  
Reply with quote  
 Post subject: Re: Create QRCode (2D-Barcode)
PostPosted: Sun Apr 05, 2020 3:48 am 
Offline
Enthusiast
Enthusiast

Joined: Tue Oct 31, 2006 4:34 am
Posts: 534
I am having the same issue as bhatkins2000, and get the same error message.

I am using PureBasic 5.72
and use the following code
Code:
ImportC "qrcodelib.lib"
QRcode_encodeString8bit(Text.p-ascii, Version.l, QRecLevel.l) As "_QRcode_encodeString8bit"
QRcode_free(*Qrcode.QRCode) As "_QRcode_free"
EndImport

which works fine as long as I am using the purebasic compiler IDE mode.
But when I compile and create an executable program, it always errors out with:
The program can't start because qrcodelib.dll is missing from your computer. Try reinstalling the program to fix this problem.

Correct me please if I am wrong.
I think the problem is that qrcodelib.lib is just imported when using the purebasic compiler IDE mode.
But is not added into the program when creating an executable, as the qrcodelib.dll files location doesn't exist anymore
as far as the executable program can see. Is there a way with PB to actually be able to create the executable with
the qrcodelib.dl file actually compiled into the exe ? Or if the lib file has to be located in the same directory as the executable,
to be able to compile it to load it from there?
As said above by bhatkins2000, Any help would be much much appreciated.


Top
 Profile  
Reply with quote  
 Post subject: Re: Create QRCode (2D-Barcode)
PostPosted: Sun Apr 05, 2020 4:19 am 
Offline
Enthusiast
Enthusiast

Joined: Tue Oct 31, 2006 4:34 am
Posts: 534
Experimented and found the solution

Just remove qrcodelib.dll and qrcodelib.lib out of you compiler directory and place them in your
programs code directory. Then change the previous ImportC code to reflect that new location.

eg: My programs directory is : D:\MyPB_pgms\QrCode
Code:
ImportC "D:\MyPB_pgms\QrCode\qrcodelib.lib"
QRcode_encodeString8bit(Text.p-ascii, Version.l, QRecLevel.l) As "_QRcode_encodeString8bit"
QRcode_free(*Qrcode.QRCode) As "_QRcode_free"
EndImport

Now I can compile and run the code under the IDE,
and also compile it to a working exe file.
You just need to always include the qrcodelib.dll and qrcodelib.lib in the same directory
as your executable in order to run it. But at least it works.


Top
 Profile  
Reply with quote  
 Post subject: Re: Create QRCode (2D-Barcode)
PostPosted: Sun Apr 05, 2020 1:50 pm 
Offline
Addict
Addict

Joined: Sat Feb 08, 2014 3:26 pm
Posts: 903
5.72 LTS Windows x64

This works well with PB x86 version, but not with the x64 version.
Code:
[ERROR] Invalid memory access. (read error at address 18446744073709551615)

(Line where debug stop)
Code:
*Qrcode = QRcode_encodeString8bit(content, 0, EC_Level)

Is it possible to modify the code or is it a limitation of the lib?

qrcodelib.dll (x86 ?) 2012/10/11.
Is there a 64 version of this lib since this from 2011 ?

Some updates 2018
https://fukuchi.org/works/qrencode/

_________________
(English is not my native language, I use an online translator.)


Top
 Profile  
Reply with quote  
 Post subject: Re: Create QRCode (2D-Barcode)
PostPosted: Sun Apr 05, 2020 6:49 pm 
Offline
Enthusiast
Enthusiast

Joined: Tue Oct 31, 2006 4:34 am
Posts: 534
Hi Marc56us
Your right. It's a 32 bit lib, so it won't compile under a 64bit program compiler.
Yet it works real well on my Windows 10 64bit Desktop, that I didn't even try to compile it because of that.

Thanks very much for that link though.
It looks very interesting, and I may look more into that later.
But right now I am just too tied up with many things.
I just needed to get the 32 bit one working asap for a immediately needed project.
At least you are able to use the 32 bit program for the time being.
If and when I do get some free time, I will post what I've found here.
Hopefully someone else may be able to help you with this question in the mean time.
Sorry.


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 25 posts ]  Go to page Previous  1, 2

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 13 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  

 


Powered by phpBB © 2008 phpBB Group
subSilver+ theme by Canver Software, sponsor Sanal Modifiye