Click here to Skip to main content
15,884,099 members
Please Sign up or sign in to vote.
5.00/5 (1 vote)
Hi, I'm playing with lcc compiler for .net

http://research.microsoft.com/en-us/downloads/b994fbbf-f7bb-4a4a-998c-2f6a6d340ec6/[^]

https://sites.google.com/site/lccretargetablecompiler/[^]

So, but, when I try to build the il generate code, I got that erro:

CSS
C:\lcc>set BUILDDIR=C:\lcc\bin

C:\lcc>%BUILDDIR%\cpp tst\array.c array.i

C:\lcc>%BUILDDIR%\rcc -target=msil/win32 array.i array.il
tst\array.c:33: warning: missing return value
tst\array.c:48: warning: missing return value

C:\lcc>%BUILDDIR%\illink array.il -l liblcc.dll -l msvcrt.dll
C:\lcc\bin\illink: undefined symbols:
exit
_setcallerp
printf
array.il(2) : warning -- Reference to undeclared extern assembly 'mscorlib'. Attempting autodetect
Error: unresolved global member ref 'printf'
Error: unresolved global member ref 'printf'
Error: unresolved global member ref 'printf'
Error: unresolved global member ref 'printf'
Error: unresolved global member ref 'printf'
Error: unresolved global member ref 'printf'
Error: unresolved global member ref 'printf'
Error: unresolved global member ref 'printf'
Error: unresolved global member ref '_setcallerp'
Error: unresolved global member ref 'exit'
Could not create output file, error code=0x80004005

***** FAILURE *****


btw, I have tryed to depurate the IlLinker code, but, but got no answers :(

I have builed the lcc MSIL with VS 6 in windows XP
Posted
Comments
Sergey Alexandrovich Kryukov 27-Dec-12 15:03pm    
Interesting product, my 5 for mentioning it. I don't quite understand why though. :-)
—SA

1 solution

Who told you that that stdio is available, through reimplementing it via .NET BCL, System.IO, System.Console or something like that?
I suggest you use System.IO and System.Console directly instead. Give it a try.
—SA
 
Share this answer
 
v3
Comments
Alexandre Bencz 28-Dec-12 5:33am    
Btw, How I can use in Ilcode the printf and the anothers functions... to build I pass the liblcc.dll and the msvcrt.dll, so, the illink pass the commands for ilasm to build the exe and link with the dlls :X
Alexandre Bencz 28-Dec-12 5:34am    
If u go to IlLink code ( C# code ), u see that, but, I think have an error in IlLink in find the informations on dll :(
Sergey Alexandrovich Kryukov 28-Dec-12 12:43pm    
You see, I don't know any detail on this product; my answer was just the first idea which naturally comes to mind...
Normally, .NET links together either modules or assemblies which are, in turn, are also composed of modules, and the modules are compiled, this is always CIL code.
—SA
Espen Harlinn 29-Dec-12 9:52am    
5'ed!
Sergey Alexandrovich Kryukov 29-Dec-12 20:08pm    
Thank you, Espen.
—SA

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