Hi,
I want to create lib file from my C / C++ code independent of compiler and uC platform.
My aim is to create lib files for easy usuability by others without giving my code to them
Can anyone help on this?
Hi,
I want to create lib file from my C / C++ code independent of compiler and uC platform.
My aim is to create lib files for easy usuability by others without giving my code to them
Can anyone help on this?
Dream on. There's no such thing.
Actually,
Once upon a time, there was the Architecturally Neutral Distribution Format (ANDF) ...
But that was never designed for SoC's .... (nor did it find a commercial footing). Still, something like the old p-System interpreter, or the USCD-Pascal interpreter ... I suppose taken to its logical conclusion, might be Java/.jar -- still, not for SoC's.
I suppose the OP could simply write in Forth, and then not worry about giving away the source, since it comes pre-obfuscated (or so I've heard
8-).Cheers, Rob.
No such thing.
No such thing.
This may sound a bit blunt, but if you're asking questions like this then I doubt your code will be of use to anybody.
-- Grant Edwards grante Yow! I'll eat ANYTHING at that's BRIGHT BLUE!!
ANYTHING
Dear Mr.Edwards,
I believe this can be possible to have - if we can have standard library functions for C or C++ functions which can be used for any targets - I should be able to create for others too. One should not reinvent the software once it is done by one person already.
Regards, Priti
pritiselec schrieb:
All libraries (even the stdlib) are highly target and compiler dependant. C is not Java. Use Java, and you have what you want - at the price of using a virtual machine environment.
-- Mit freundlichen Grüßen Frank-Christian Krügel
As SOURCE code within some constraints yes.
As Source code for ANY compiler/linker, ANY host platform, ANY target - NO!
You HAVE to provide the source to be ported to the host/compiler/target implementation.
Sorry NOBODY supplies a compiled library that is byte by byte identical for ANY complier/linker (different library formats, byte order, etc..), any host (file formats etc..), or ANY target (different instruction codes widths and lengths..).
You do not understand what you are trying to achieve.
-- Paul Carpenter | paul@pcserviceselectronics.co.uk PC Services
Then go ahead and do it. Prove me wrong.
Huh?
You don't seem to understand that:
Creating a single object library that can be used across incompatible ISAs and data representations, across different, incompatible toolchains is simply not possible.
-- Grant Edwards grante Yow! HUGH BEAUMONT died at in 1982!!
It may be called the Standard Library, but but the code to achieve it is compiled (or assembled) custom for toolset.
This is certainly possible, if you deliver the libraries as C source files and your program startup routine contains a C-interpreter to execute the functions.
However, the users might not like the program startup delay :-).
This is definitively the hardest part, since you would have to include the compiler/interpreter in your program distribution and some disassembly would easily reveal the encryption (if any) used.
Paul
nd
To assure quality, you have to test your code in every hardware platform for every micro.
That would defeat the OP's purpose of closing the "open source".
ng
The hardest part is to get anyone to trust and use his code.
This reminds me of a lady that looked at a well-toned young woman and said: "I would do anything to have a body like that. Except diet and exercise".
Yes, you can create code libraries that are easy and useful to others, independent of the architecture/OS/compiler/etc, if you will publish the source code. Note that if you are truly the original author, you can put any copyright on them, including restrictive, commercial licensing requiring payments to you.
-- Przemek Klosowski, Ph.D.
ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.