CHAR to WCHAR ??
-
Sounds like you need to link to the LiteZip library. I've never used it but there should be either an import library if it's implemented as a DLL or else a static library. LiteZip.lib? Mark
Yea, there is both. The LiteZip.dll I placed in the windows\system32 folder while the LIB file I placed in the LIB folder under VC8. Obviously there more I need to do. So I need to write the code in to tell that the DLL is there and where it is ? Pete
-
Yea, there is both. The LiteZip.dll I placed in the windows\system32 folder while the LIB file I placed in the LIB folder under VC8. Obviously there more I need to do. So I need to write the code in to tell that the DLL is there and where it is ? Pete
Fritzables wrote:
The LiteZip.dll I placed in the windows\system32 folder while the LIB file I placed in the LIB folder under VC8.
Generally you want to keep 3rd-party dlls in the same folder as your app unless the vendor explicitly states to move it to a system folder. This helps prevent versioning clashes with other applications. The lib file can stay where it was (for the same reason I suppose). This is from VS 2003 so may be a bit different on 2005... In solution explorer - right click your project and select Properties. Go to the Linker/Input section and add the libfile pathname to the Additional Dependencies line. For example "C:\LiteZip\Lib\LiteZip.lib". Substitute the actual path and file name as usual. If there's multiple lib files on the line then separate them with a space. Should link! :) Mark
-
Fritzables wrote:
The LiteZip.dll I placed in the windows\system32 folder while the LIB file I placed in the LIB folder under VC8.
Generally you want to keep 3rd-party dlls in the same folder as your app unless the vendor explicitly states to move it to a system folder. This helps prevent versioning clashes with other applications. The lib file can stay where it was (for the same reason I suppose). This is from VS 2003 so may be a bit different on 2005... In solution explorer - right click your project and select Properties. Go to the Linker/Input section and add the libfile pathname to the Additional Dependencies line. For example "C:\LiteZip\Lib\LiteZip.lib". Substitute the actual path and file name as usual. If there's multiple lib files on the line then separate them with a space. Should link! :) Mark
Any reason you did not suggest using a #pragma?
#pragma comment(lib, "LiteZip")
It's a lot easier, and if the #pragma line is placed in the LiteZip.h header file it is something that one never has to remember to do when using the library.
You may be right
I may be crazy
-- Billy Joel --Within you lies the power for good, use it!!!
-
Fritzables wrote:
The LiteZip.dll I placed in the windows\system32 folder while the LIB file I placed in the LIB folder under VC8.
Generally you want to keep 3rd-party dlls in the same folder as your app unless the vendor explicitly states to move it to a system folder. This helps prevent versioning clashes with other applications. The lib file can stay where it was (for the same reason I suppose). This is from VS 2003 so may be a bit different on 2005... In solution explorer - right click your project and select Properties. Go to the Linker/Input section and add the libfile pathname to the Additional Dependencies line. For example "C:\LiteZip\Lib\LiteZip.lib". Substitute the actual path and file name as usual. If there's multiple lib files on the line then separate them with a space. Should link! :) Mark
That's it Mark, Now it compiles and end up with an EXE. Where did you learn all this ?? Just reading out of books or have ya done some courses ? Pete :-D
-
That's it Mark, Now it compiles and end up with an EXE. Where did you learn all this ?? Just reading out of books or have ya done some courses ? Pete :-D
Fritzables wrote:
Where did you learn all this ?? Just reading out of books or have ya done some courses ?
Lots of books (measured in pounds/Kgs I guess) and I started PC programming before there was Windows :) Man, I'm old. I don't miss command-line compiling/linking/building one bit! I'm still always learning though - that's why it's handy hanging out here. Cheers! Mark
-
Any reason you did not suggest using a #pragma?
#pragma comment(lib, "LiteZip")
It's a lot easier, and if the #pragma line is placed in the LiteZip.h header file it is something that one never has to remember to do when using the library.
You may be right
I may be crazy
-- Billy Joel --Within you lies the power for good, use it!!!
PJ Arends wrote:
Any reason you did not suggest using a #pragma?
I left that for you to suggest! I suggest you suggest it to the OP :laugh: Thanks for the tip! Mark
-
That's it Mark, Now it compiles and end up with an EXE. Where did you learn all this ?? Just reading out of books or have ya done some courses ? Pete :-D
Fritzables wrote:
Where did you learn all this ?? Just reading out of books or have ya done some courses ?
you can add libaray file just like adding c++ file~!
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers, Alok Gupta VC Forum Q&A :- I/ IV Support CRY- Child Relief and you
-
Mark...... you're a legend !! All Ok now. So what does the 'L' basically do ? Cheers Pete :-D
Fritzables wrote:
So what does the 'L' basically do ?
You too can achieve 'legend' status by reading here.
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
-
Fritzables wrote:
Where did you learn all this ?? Just reading out of books or have ya done some courses ?
you can add libaray file just like adding c++ file~!
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers, Alok Gupta VC Forum Q&A :- I/ IV Support CRY- Child Relief and you
ThatsAlok wrote:
you can add libaray file just like adding c++ file~!
:laugh::laugh::laugh: :doh: Good one! I just looked at some of my projects and I have some added like c++ files and some in the project settings. :rolleyes: In my defense, some of these projects started before Visual C++. O M G
-
I am trying to write a simple application that is capable of zipping files. To do this I am using ‘LiteZip’. I am writing with Visual C++ 2005. The code which generates the error is: #include "litezip.h" HZIP hz; ZipCreateFile(&hz,"FileName.zip",0); The error message is: error C2664: 'ZipCreateFileW' : cannot convert parameter 2 from 'const char [9]' to 'const WCHAR *' Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast From what I understand, I need to convert a CHAR to WCHAR. This is done by…. ?? Regards Pete :doh:
-
ThatsAlok wrote:
you can add libaray file just like adding c++ file~!
:laugh::laugh::laugh: :doh: Good one! I just looked at some of my projects and I have some added like c++ files and some in the project settings. :rolleyes: In my defense, some of these projects started before Visual C++. O M G
Mark Salsbery wrote:
In my defense, some of these projects started before Visual C++.
he he he
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers, Alok Gupta VC Forum Q&A :- I/ IV Support CRY- Child Relief and you
-
Fritzables wrote:
So what does the 'L' basically do ?
You too can achieve 'legend' status by reading here.
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
Thanks Dave, I have come across from using Borland's Delphi, so it's difficult coming to terms with some of the coding. Fritzables.