Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Languages / Managed C++ / March 2005

Tip: Looking for answers? Try searching our database.

IL & C++ & OBJ

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Dmitry Shuklin - 24 Mar 2005 17:14 GMT
I am compiled my C file into IL source,
How i can compile this file back to OBJ file, not to EXE or DLL?

or, can i compile to OBJ file VB or C# code and link them with C++ managed
OBJ files?

Thanks
William DePalo [MVP VC++] - 24 Mar 2005 19:00 GMT
>I am compiled my C file into IL source,
> How i can compile this file back to OBJ file, not to EXE or DLL?

There is no tool from MS to accomplish this.

> or, can i compile to OBJ file VB or C# code and link them with C++ managed
> OBJ files?

AFAIK, no tool for this, either.

<rant>
It is a shame that you can't currently do this especially since VAX/VMS
allowed modules written in disparate languages to be linked and used
together seamlessly more than two decades ago.
</rant>

It is not what you asked, but it is possible to link to "net modules" and
then to create an "assembly" from net nodules. I've not tried it, but I
_think_ that the C# and VB.Net compilers are capable of creating netmodules.

Regards,
Will
Dmitry Shuklin - 24 Mar 2005 20:45 GMT
Generally i wrote completly new project and want write it in one language,
but

- i need MC++ to interact with native code
- MC++ have few restrictions and stranges so i can't use only C++ ((

may be third party tools?  C++ can generate managed OBJ files which link
links
it is very strange that asm can not be compiled into OBJ instead of C++

>>I am compiled my C file into IL source,
>> How i can compile this file back to OBJ file, not to EXE or DLL?
[quoted text clipped - 19 lines]
> Regards,
> Will
William DePalo [MVP VC++] - 24 Mar 2005 20:57 GMT
> - i need MC++ to interact with native code

This is what it does best.

> - MC++ have few restrictions and stranges so i can't use only C++ ((

Hmm, what do you mean?

> it is very strange that asm can not be compiled into OBJ instead of C++

Without going in to great detail, why don't you explain exactly what you
need to do?

Together, MC++'s "It just works" which allows mixing native and managed code
in the same MC++ module - and Platform/Invoke which permits invocation of
external functions in unmanaged DLLs provide a lot of capability.

Regards,
Will
Dmitry Shuklin - 25 Mar 2005 20:50 GMT
>> - MC++ have few restrictions and stranges so i can't use only C++ ((
>
> Hmm, what do you mean?
>
>> it is very strange that asm can not be compiled into OBJ instead of C++

- i already wrote this as separate message to this group
System.TypeLoadException: Method GetObjectData in type
MyProj.Runtime.NativeHandle from assembly MyProj.Runtime does not have an
implementation. without reasonable motive

- can't code private inheritance of interface class MyClass :private
IMyInterface, but when  IMyIterface marked as private its defenition is
absent in assembly metadata, but inheritance still stays public - assembly
fails to load ((

not so huge

- cant implement interface with property name == class name

- can't directly override Finalize, when implementing ~__dtor compiler makes
reference to MSVCRT71, i don't want install to clients this dll only because
of dtors (C# and VB dont use __CxxUnwind ... )

- cant mark native class as public or private, strange, but native classes
becames public

- the same with all native data types or functions. - i understand why MS
need describe them in metadata, but why public ? (((

and many small issues, even dont want to recall
William DePalo [MVP VC++] - 25 Mar 2005 21:30 GMT
> - i already wrote this as separate message to this group
> System.TypeLoadException: Method GetObjectData in type
[quoted text clipped - 21 lines]
>
> and many small issues, even dont want to recall

Probably my problem but I have no idea what the heck you are talking about.
I'll bow out of this thread now ...

Regards,
Will
Ioannis Vranos - 25 Mar 2005 04:45 GMT
>>I am compiled my C file into IL source,
>>How i can compile this file back to OBJ file, not to EXE or DLL?
>
> There is no tool from MS to accomplish this.

I think that he probably meant compiled in mixed mode, and I think this
can be done by using extern "C" inside a C++ file and then compile the
whole thing with /clr.
William DePalo [MVP VC++] - 25 Mar 2005 05:06 GMT
> I think that he probably meant compiled in mixed mode, and I think this
> can be done by using extern "C" inside a C++ file and then compile the
> whole thing with /clr.

Could be, which is why I mentioned IJW and asked for more details.

The only thing that is clear is that his "compile back" is at least a
problematic usage of the language if not a problematic request in its own
right. :-)

Regards.
Will

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.