Re: /clr option
sarabjeetd_at_hotmail.com
Date: 08/11/04
- Next message: Val: "Re: C++ and VS 2002 .net"
- Previous message: Brandon Bray [MSFT]: "Re: C++ and VS 2002 .net"
- In reply to: sarabjeetd_at_hotmail.com: "Re: /clr option"
- Next in thread: Kang Su Gatlin [MS]: "Re: /clr option"
- Reply: Kang Su Gatlin [MS]: "Re: /clr option"
- Messages sorted by: [ date ] [ thread ]
Date: Wed, 11 Aug 2004 18:44:12 GMT
Hi ,
Also, i forgot to mention one thing.
I also want to know what i need to do so that i can call C functions from
a.c.
e.g.
There is a function g() defined in a.c and a function h() defined in main.c.
can i call h() from g() without having to do anything special.
All the code in our product is C code (no COM).
I appreciate your help in this regard.
regards
-sarab
<sarabjeetd@hotmail.com> wrote in message
news:LrtSc.7731$xr3.5006@news.cpqcorp.net...
> When i remove the /clr and /TP option, it links ok (i had to comment all
the
> .NET code for this to link).
> You are correct, the rest of the code is C.
> So, here is what i have.
>
> The C code(main.c) calls a function f() which lives in the file a.c. The
> file a.c has .NET code and it has to be compiled with /clr and /TP
> option.
> The file main.c has c code and is compiled without /clr and /TP option.
>
> How do i resolve the unresolved symbol f() during linking?.
>
> -sarab
>
>
> "Kang Su Gatlin [MS]" <kanggatl@microsoft.com> wrote in message
> news:vzKLVl2fEHA.1200@cpmsftngxa06.phx.gbl...
> > No, there is nothing you need to do. Try to remove the '/clr' option
only
> > (leave every other compiler switch the same) and see if you still get
the
> > unresolved symbols issue (the /TP you mention makes me suspcious that
the
> > rest of your code is in 'C') . If you don't, could you see if you can
put
> > together a simple repro with this behavior.
> >
> > Thanks!
> >
> > Kang Su Gatlin
> > Visual C++ Program Manager
> >
> >
> > --------------------
> > | From: <sarabjeetd@hotmail.com>
> > | Newsgroups: microsoft.public.dotnet.languages.vc
> > | References: <Y1QRc.7554$Cw1.6453@news.cpqcorp.net>
> > <ZBADtHvfEHA.1200@cpmsftngxa06.phx.gbl>
> > | Subject: Re: /clr option
> >
> > |
> > | Now, i have one file which has all the .NET code and it is being
> compiled
> > | with /clr /TP option.
> > | During linking, i get unresolved symbol for the function defined in
the
> > | file.
> > |
> > | is there anything special that i need to do so that the functions in
the
> > | file are visible to the rest of the code?.
> > |
> > |
> > | regards
> > | -sarab
> > |
> > |
> > | "Kang Su Gatlin [MS]" <kanggatl@microsoft.com> wrote in message
> > | news:ZBADtHvfEHA.1200@cpmsftngxa06.phx.gbl...
> > | > No, only those that use .NET classes (in fact you can use more fine
> > | > granularity than libraries, and do it at the file or function level,
> > using
> > | > #pragma unmanaged).
> > | >
> > | > Give it a shot, and if you hit any problems, please post back here.
> > | >
> > | > Thanks,
> > | >
> > | > Kang Su Gatiln
> > | > Visual C++ Program Manager
> > | >
> > | > --------------------
> > | > | From: <sarabjeetd@hotmail.com>
> > | > | Newsgroups: microsoft.public.dotnet.languages.vc
> > | > | Subject: /clr option
> > | >
> > | > | Hi ,
> > | > | We have a lot of code which runs fine under VC++ 6.0. We have
to
> > | move
> > | > to
> > | > | .NET becasue one of the librairies uses .NET classes.
> > | > |
> > | > | Does every library(including those which do not use .NET classes)
> > have
> > | > to
> > | > | be recompiled with /clr option?.
> > | > |
> > | > |
> > | > | regards
> > | > | -sarab
> > | > |
> > | > |
> > | > |
> > | >
> > |
> > |
> > |
> >
>
>
- Next message: Val: "Re: C++ and VS 2002 .net"
- Previous message: Brandon Bray [MSFT]: "Re: C++ and VS 2002 .net"
- In reply to: sarabjeetd_at_hotmail.com: "Re: /clr option"
- Next in thread: Kang Su Gatlin [MS]: "Re: /clr option"
- Reply: Kang Su Gatlin [MS]: "Re: /clr option"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|