Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: C .NET MSIL compilation
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:
 
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 Frown | :(
 
I have builed the lcc MSIL with VS 6 in windows XP
Posted 27-Dec-12 7:33am
Comments
Sergey Alexandrovich Kryukov at 27-Dec-12 15:03pm
   
Interesting product, my 5 for mentioning it. I don't quite understand why though. :-)
—SA

1 solution

Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

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
  Permalink  
v3
Comments
Alexandre Bencz at 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 at 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 at 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 at 29-Dec-12 9:52am
   
5'ed!
Sergey Alexandrovich Kryukov at 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)

  Print Answers RSS
0 OriginalGriff 8,284
1 Sergey Alexandrovich Kryukov 7,327
2 DamithSL 5,614
3 Manas Bhardwaj 4,986
4 Maciej Los 4,920


Advertise | Privacy | Mobile
Web02 | 2.8.1411023.1 | Last Updated 28 Dec 2012
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100