473,325 Members | 2,860 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,325 software developers and data experts.

c (not c#) compiler

grs
We work in C# but have a need to compile and create a DLL of c code. I have
never programmed in c, can you do this in visual studio 2005.

It is c not c++.

Any suggestions would be appreciated
thanks
grs
Mar 25 '06 #1
2 1115
Not really the right group, but there are three issues at hand.

1) Yes, you can program c and c++ code in VS.NET. You should check the
documentation that is provided with VS.NET to see how to do this. I believe
you just create a C++ project and since C++ is backward compatible with C,
then you should be able to do everything that C allows.
2) If you have never programmed in C, then you will need to pick up some
books on the subject. Although the syntax is similar to C#, it is in no way
the same language. Concepts that you know in C# will not be available in C
and depending on the complexity of what you need done, learning C may be a
challenging endeavor.
3) C cannot compile to a .NET language. If you are looking for simply
referencing an assembly written in C, you are out of luck. The best you
would be able to do is to create the DLLs and then use the functions using
p/invoke calls.

"grs" <gs********@earthlink.net> wrote in message
news:ua**************@TK2MSFTNGP10.phx.gbl...
We work in C# but have a need to compile and create a DLL of c code. I
have never programmed in c, can you do this in visual studio 2005.

It is c not c++.

Any suggestions would be appreciated
thanks
grs

Mar 26 '06 #2
Peter,
Just to add one detail - if you use an extension of .c (rather than
..cpp), the C++ compiler will treat the code as C automatically.
Bob

"Peter Rilling" <pe***@nospam.rilling.net> wrote in message
news:%2****************@TK2MSFTNGP10.phx.gbl...
Not really the right group, but there are three issues at hand.

1) Yes, you can program c and c++ code in VS.NET. You should check the
documentation that is provided with VS.NET to see how to do this. I
believe you just create a C++ project and since C++ is backward compatible
with C, then you should be able to do everything that C allows.
2) If you have never programmed in C, then you will need to pick up some
books on the subject. Although the syntax is similar to C#, it is in no
way the same language. Concepts that you know in C# will not be available
in C and depending on the complexity of what you need done, learning C may
be a challenging endeavor.
3) C cannot compile to a .NET language. If you are looking for simply
referencing an assembly written in C, you are out of luck. The best you
would be able to do is to create the DLLs and then use the functions using
p/invoke calls.

"grs" <gs********@earthlink.net> wrote in message
news:ua**************@TK2MSFTNGP10.phx.gbl...
We work in C# but have a need to compile and create a DLL of c code. I
have never programmed in c, can you do this in visual studio 2005.

It is c not c++.

Any suggestions would be appreciated
thanks
grs


Mar 26 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Jørgen Hermanrud Fjeld | last post by:
On Tue, Aug 26, 2003 at 04:33:17PM -0500, Jeff Epler wrote: > 4. It's possible to write code so that __import__ uses compiler.compile > instead of the written-in-C compiler, but I don't have this...
10
by: Bjorn | last post by:
I'm using interfaces in C++ by declaring classes with only pure virtual methods. If then someone wants to implement the interface they needs to inherit from the class. If the implementing class...
32
by: Marcus | last post by:
We all know that the "gets" function from the Standard C Library (which is part of the Standard C++ Library) is dangerous. It provides no bounds check, so it's easy to overwrite memory when using...
7
by: B. Wood | last post by:
I have a small program (see below) that demonstrates an error I am getting when I build the program on a linux platform. I first initialize an unsigned char array (lines 16). I then initialize...
12
by: Ralf Dieholt | last post by:
I still don´t get it - what is the advantage of C ? I can program anything in BASIC V2 on a C64, does C have any advantages over BASIC V2 ? Seems to be more cryptic than BASIC to me.
0
by: rollasoc | last post by:
Hi, I seem to be getting a compiler error Internal Compiler Error (0xc0000005 at address 535DB439): likely culprit is 'BIND'. An internal error has occurred in the compiler. To work around...
3
by: Mark Rockman | last post by:
------ Build started: Project: USDAver2, Configuration: Debug .NET ------ Preparing resources... Updating references... Performing main compilation... error CS0583: Internal Compiler Error...
0
by: skip | last post by:
Here's a trivial little Python session which attempts to use compiler.walk (mostly unsuccessfully): % python Python 2.4.2 (#1, Feb 23 2006, 12:48:31) on sunos5 Type "help", "copyright",...
39
by: DanielJohnson | last post by:
I wrote a simply program with a 3 D coordinate called point. I am adding two points, taking their distance etc. gcc compiler is not identifying the struct. Here is the code. I get bunch of errors....
19
by: llothar | last post by:
I must say i didn't expect this. I just did some measures on FreeBSD 6.2 with gcc 3.4.6 and there is absolutely no significant difference between 32 and 64 bit mode - neither in compilation speed,...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.