I'm going nuts with merging libraries

moster67

Expert
Licensed User
Longtime User
I copied a project of mine from my desktop computer to my laptop where I have the same version of Basic4PPC installed.

The project/program runs fine on the laptop but when I compile it, I always get a message saying that I need to distribute the involved libraries with my application. So when compiling takes place, the libraries don't merge! Optimized compiling is selected and I compile using Device (autoscale) exe.

I have the corresponding cs-files in the library-directory of Basic4PPC and I even tried to copy them to the application library but in vain.

Version of Basic4PPC is 6.80.01.

I guess that I am overseeing something but I can't trace it down. I have done this many times in the past (copying projects from my PC to my laptop and vice versa) without any problems.

Anyone who can help me out?

Thanks.
 
Last edited:

agraham

Expert
Licensed User
Longtime User
This seems very odd, is it not even merging the libraries supplied with Basic4ppc?

The rules for merging are pretty simple. The compiler looks at every component added to either the desktop or device depending upon the type of compilation. If the component has a ".dll" extension it removes that and adds a ".cs" extension. It then does a FileExists check for the *.cs file in the \...\Basic4ppc\Libraries folder and if it exists it adds it as a source file to the compilation so merging it, otherwise it adds a reference to the dll in the project folder to the compilation and marks that library as not merged. After compilation it displays those libraries marked not merged as requiring distribution.

The Libraries folder is obtained by finding the folder from which Basic4ppc was started and adding "\Libraries" to it. The contents of the \...\Basic4ppc\Tzor folder are required for compilation and that folder is located in the same way. If compilation succeeds without error then it must have found the Tzor folder, and by implication should also have found the Libraries folder. Assuming the relevant cs files were present in the Libraries folder I don't see how they would not be merged.

Maybe working through the above description of the process will help.
 

Zenerdiode

Active Member
Licensed User
The .dll and .cs file in the Libraries folder have to be the same version. Could you have got them out of synch sometime? Copied a new library without the .cs file or something?

Edit:
Sorry, cross posted with Andrew's reply. Maybe you don't have to have the versions the same.
 
Last edited:

agraham

Expert
Licensed User
Longtime User
The .dll and .cs file in the Libraries folder have to be the same version.
I'm afraid that is not true. There is no version checking done at compilation time as there is no straightforward way of obtaining it from the dll file. The version number displayed after merging (if any) is obtained from a comment on the first line of the merged cs file and is there merely as a confirmation of the source version merged.
 

moster67

Expert
Licensed User
Longtime User
Resolved! :signOops:

Agrahams reply got me to verify a few things and everything was due to an extra directory in the path:

instead of ..\Basic4ppc Desktop\Libraries\ (which is correct) I had the following directory structure:
..\Basic4ppc Desktop\Libraries\Libraries\

Who knows what I have done to get it that way??

I am sorry for wasting your time but to be sincere it was Agrahams' reply that got me reasoning :sign0013:

(Agraham - your reply was interesting reading as usual)

Thanks!
 
Cookies are required to use this site. You must accept them to continue using the site. Learn more…