Click here to Skip to main content
15,884,041 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hello,

I'm using the QR source code provided by Fulvio Dominici (which is posted on CODE PROJECT web site "Simple C/C++ QR code Library")Simple C/C++ QRCode Library[^]

And whenever i try to complie the project, i get the following errors:
1- [ilink32 Error] Error: Unresolved external '_QRcode_encodeString' referenced from C:\USERS\RANIA\DOCUMENTS\QR CODE PRACTICE2\QRGENERATOR\QRGENERATOR\WIN32\DEBUG\QRGENERATOR.OBJ

2- [ilink32 Error] Error: Unresolved external '_QRcode_free' referenced from C:\USERS\RANIA\DOCUMENTS\QR CODE PRACTICE2\QRGENERATOR\QRGENERATOR\WIN32\DEBUG\QRGENERATOR.OBJ

3- [ilink32 Error] Error: Unable to perform link

and i've placed my project in the following path:C:\Users\rania\Documents\QR CODE PRACTICE2\QRGenerator\QRGenerator

So, i don't know what is the problem, why it cannot link? is it the location of the project or what?

Need help. Please!

Regards.
Posted
Updated 16-Mar-14 22:07pm
v2
Comments
Jochen Arndt 17-Mar-14 4:07am    
It seems that you did not add all sources to your project (especially those form the LibQREncode folder).
raniam 17-Mar-14 6:08am    
I've added all the *.h files in my *.cpp, but the problem is that the package does not contain any *.lib nor *.dll files.
So what can i do?

Regards.
Jochen Arndt 17-Mar-14 6:51am    
The article states that it did not build the library but provide the library source files to be compiled with your application. So you must add all the C files in the LibQREncode directory to your project so that they become part of the project and be compiled and linked.

I don't know C++ Builder XE3. So you must consult the manual on how to add existing source files to a project.
raniam 17-Mar-14 7:07am    
Thank you, i've copied all the C files into my project directory and included all the (.h) files into my (.cpp), and the previous errors were gone. But another error came up, which is:
1- [ilink32 Error] Error: Unresolved external '_main' referenced from C:\PROGRAM FILES (X86)\EMBARCADERO\RAD STUDIO\10.0\LIB\WIN32\RELEASE\C0X32.OBJ

2- [ilink32 Error] Error: Unable to perform link

Even though, i'm working on a console application, but i dont know why i get this error
Need you help pleeeeeeeeeeeeeese
Best Regards.
Jochen Arndt 17-Mar-14 7:23am    
The file QRGenerator.cpp contains the function 'int _tmain(int argc, _TCHAR* argv[])'. This is a Microsoft specific name to differentiate between Unicode and ANSI builds. Just rename the function in the source file to 'main' and the error should disappear.

Don't post this under Quick Answers - if you got the code from an article, then there is a "new message" button at the bottom of that article, which causes an email to be sent to the author. They are then alerted that you wish to speak to them.
Posting this here relies on them "dropping by" and realising it is for them.
 
Share this answer
 
You have to be sure that:
  • You have built the library (in order to generate the referenced symbols).
  • The linker is able to find it (assuming you are using Visual Studio, you have to both add the library as linker input file and add the libray's path to VC directories).
 
Share this answer
 
Comments
raniam 17-Mar-14 6:07am    
thank you for replying, but this is my first time to use a code from another vendor.
how can i build the library? since the package does not contain any *.Lib or *.Dll files!

And i'm using C++ Builder XE3 (not VC++)
Regards.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900