Generating C file using C#
-
Hi... I want to develop a C File using C#3.0 which will create the header file with structures, enums, macros..and all other features of the C.. I want to develop a tool in which i have a GUI and i have to select the options from GUI and accordingly i have to create a C file for the same So is it possible in C#3.0?
-
Hi... I want to develop a C File using C#3.0 which will create the header file with structures, enums, macros..and all other features of the C.. I want to develop a tool in which i have a GUI and i have to select the options from GUI and accordingly i have to create a C file for the same So is it possible in C#3.0?
-
Hi... I want to develop a C File using C#3.0 which will create the header file with structures, enums, macros..and all other features of the C.. I want to develop a tool in which i have a GUI and i have to select the options from GUI and accordingly i have to create a C file for the same So is it possible in C#3.0?
It sounds IDE kind of stuff you are looking for. According to my knowledge currently there is no any existing project or tool available which can assist you. However, it sounds R&D kind of project. HTH
Jinal Desai - LIVE Experience is mother of sage....
-
Sounds like an IDE. A C-sourcefile is usually in ASCII, meaning that it's plain text. You can compile this source off course, even using an external compiler. Should I imagine a code-generator, or more of a forms-generator?
I are Troll :suss:
thanks for ur reply.. Basically I am doing a project in which i will be designing a GUI and from there by taking the input I want to generate the C code in a file with ".C" extension. I will be using a different compiler to compile that C File. So is it possible?
-
thanks for ur reply.. Basically I am doing a project in which i will be designing a GUI and from there by taking the input I want to generate the C code in a file with ".C" extension. I will be using a different compiler to compile that C File. So is it possible?
Yup. There's some articles on CodeProject that deal with creating User-Interfaces, in a similar way that Visual Studio works. This[^] site shows how to create Windows and buttons from C. You'd have to generate source-code similar to that on the website. Most compilers can be run from the command-line, so that shouldn't be any problem.
I are Troll :suss:
-
Hi... I want to develop a C File using C#3.0 which will create the header file with structures, enums, macros..and all other features of the C.. I want to develop a tool in which i have a GUI and i have to select the options from GUI and accordingly i have to create a C file for the same So is it possible in C#3.0?
Niungareamit wrote:
So is it possible in C#3.0?
My last team leader used to say "everything is possible with software", and I would agree. The question you really need to ask is whether you are able to translate user input selections into a valid C program.
It's time for a new signature.
-
Hi... I want to develop a C File using C#3.0 which will create the header file with structures, enums, macros..and all other features of the C.. I want to develop a tool in which i have a GUI and i have to select the options from GUI and accordingly i have to create a C file for the same So is it possible in C#3.0?
I would recommend using an XML file to represent your C file. If you manipulate a .c file directly when you add or remove something like and include you have to do a whole lot more to find the correct line and insert or remove the text you want. If you use an XML file you could have an includes node, and in C# you just add and remove nodes to the tree as you please. You can also have class nodes which in turn have method nodes and so on. Then you use XSLT to turn the XML into a .c file.
-
Hi... I want to develop a C File using C#3.0 which will create the header file with structures, enums, macros..and all other features of the C.. I want to develop a tool in which i have a GUI and i have to select the options from GUI and accordingly i have to create a C file for the same So is it possible in C#3.0?
I don't know why you were downvoted. Of course it is possible and maybe even useful. :)
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler. -- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong. -- Iain Clarke
[My articles] -
I don't know why you were downvoted. Of course it is possible and maybe even useful. :)
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler. -- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong. -- Iain Clarke
[My articles]Agreed :thumbsup:
Dave
If this helped, please vote & accept answer!
Binging is like googling, it just feels dirtier. Please take your VB.NET out of our nice case sensitive forum.(Pete O'Hanlon)
BTW, in software, hope and pray is not a viable strategy. (Luc Pattyn)