Lost Password?


Go Back   CodeCall Programming Forum > Software Development > C and C++

C and C++ C and C++ forum for discussing all forms of C except for C#. These languages are powerful low level languages used for creating Operating Systems, Device Drivers, compilers and much more.

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 07-19-2007, 11:35 PM
ananda6359 ananda6359 is offline
Newbie
 
Join Date: Jul 2007
Posts: 1
Rep Power: 0
ananda6359 is on a distinguished road
Default Can I do this in C?

I want to create an application. It shouldn't be OS-specific but I'm running 98SE so I'll be explaining things in terms of that. I've already written it as a working script in VBScript, but it's too slow and gets exponentially slower as it handles larger and larger files.

I want to write it in another language as an executable, but I'm not sure what language will work -- or which would be best.

I have a feeling that C or one of its relatives is what I should be using but to be honest in my ignorance I have almost no basis for any opinion.



Here's what I need to use this language to do:



I need a native, portable-OS GUI.

I need multiple-file-handling capabilities invoked via the shell (i.e., by right-clicking on a selected file or selected files and invoking the program through their context menu).

I need it to read binary data from disk.

I need it to write binary data to disk.

I need to produce it in (at least) executable form. I'm fine if it's platform-portable, but I need it in Windows and frankly the people I'll be giving it to will be using Windows, too.

I need a free compiler operable on 98SE.



In other words: the user will select files or a file and through the shell context menu invoke the program using the files or file as arguments (correct terminology? I'm not sure). After the user manipulates settings from the GUI, the program will read the files or file as binary data and write further binary data to disk.



What language should I use? How do I go about it?



I taught myself VBScript from scratch but that was accidental and although I've become proficient with it I am because of my ignorance at a loss when it comes to other programming languages' merits, drawbacks, capabilities, &c.

If I can produce an executable with a native, portable-OS GUI, shell integration, and binary IO capabilities (preferably in single file -- no installation needed), that's all I need.

As I've said I'm running 98SE and don't have any other option; and it does have to be a free compiler (this is only a personal project).



Thanks very much for the suggestions as to which language I need to use. I'm entirely uninformed about this despite spending hours researching it on the Internet.


`me
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote

Sponsored Links
  #2 (permalink)  
Old 07-20-2007, 02:13 AM
v0id's Avatar   
v0id v0id is offline
Retired
 
Join Date: Apr 2007
Location: Denmark
Posts: 2,654
Last Blog:
CherryPy(thon)
Rep Power: 29
v0id is a glorious beacon of lightv0id is a glorious beacon of lightv0id is a glorious beacon of lightv0id is a glorious beacon of lightv0id is a glorious beacon of lightv0id is a glorious beacon of light
Send a message via MSN to v0id
Default

Yes, it's possible to do in C.

I'll suggest you just to use the Win32 API, instead of something like wxWidgets. You're saying it shouldn't be cross-platform, so Win32 API will be just fine. Most of the functionality in Win32 API will work on Windows 98, because the last biggest changes there were was in Windows 95, though there've been minor changes as well, from version to version.

You're able to do some shell scripting through the Win32 API. Actually, almost everything you want to do in Windows, can be done using the Win32 API. So you just have to find the right functions, and everything will work out.

Which kind of "disk" are you going to read/write to?

To output it in an executable format should be the smallest problem in your whole project. If you're using GCC, then GCC will first compile your C-code, GAS will compile the outputted Assembly-code, and finally LD will take over and it will link your objects. This will result in an executable file.

I'll suggest GCC as your compiler. It's easy to use, open source and free. It's also able to compile a handful of other languages, including C++, and others.
__________________
05-03-2007 - 11-13-2008
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 07-20-2007, 11:55 AM
WingedPanther's Avatar   
WingedPanther WingedPanther is offline
Super Moderator
 
Join Date: Jul 2006
Age: 35
Posts: 3,418
Last Blog:
wxWidgets is NOT code ...
Rep Power: 37
WingedPanther is a splendid one to beholdWingedPanther is a splendid one to beholdWingedPanther is a splendid one to beholdWingedPanther is a splendid one to beholdWingedPanther is a splendid one to beholdWingedPanther is a splendid one to behold
Default

Actually, if you want portable and GUI, you're looking at using something like wxWidgets or GTK to get that effect. C/C++ do not provide native support for GUI programming, and using the OS API immediately makes it not OS-Independent. wxWidgets does a nice job for C++ of handling this.

I would also review the logic you are using. If your algorithm does not scale well, changing the language won't help much.
__________________
CodeCall Blog | CodeCall Wiki | Shareware | Linux Forum
Programming is a branch of mathematics.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 07-22-2007, 03:46 AM
kisna kisna is offline
Learning Programmer
 
Join Date: Jul 2007
Posts: 76
Rep Power: 6
kisna is on a distinguished road
Default

Sorry, guys it may be the very basic question, but I've done very little of c and I want to know this. How do I make the executable from a C programme?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)  
Old 07-23-2007, 12:04 PM
WingedPanther's Avatar   
WingedPanther WingedPanther is offline
Super Moderator
 
Join Date: Jul 2006
Age: 35
Posts: 3,418
Last Blog:
wxWidgets is NOT code ...
Rep Power: 37
WingedPanther is a splendid one to beholdWingedPanther is a splendid one to beholdWingedPanther is a splendid one to beholdWingedPanther is a splendid one to beholdWingedPanther is a splendid one to beholdWingedPanther is a splendid one to behold
Default

You have to use a compiler, such as GCC, MinGW, or others.
__________________
CodeCall Blog | CodeCall Wiki | Shareware | Linux Forum
Programming is a branch of mathematics.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote

Sponsored Links
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT -5. The time now is 04:59 AM.

Contest Stats

WingedPanther ........ 2753.6
Xav ........ 2704
Brandon W ........ 1702.32
John ........ 1207.73
marwex89 ........ 1175.24
morefood2001 ........ 966.05
dcs ........ 655.75
Steve.L ........ 475.59
orjan ........ 418.58
Aereshaa ........ 383.54

Contest Rules

CodeCall Goal

Goal: 100,000 Posts
Complete: 100%


Complete - Celebrate!

Ads