It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 10 years ago.
I would consider myself a fairly competent programmer with experience in Java and VB.net. My latest swim around the programming lake is having me modify a program written in C. (The program is Wireshark, an open source network analyzing tool.) I followed the instructions here http://www.wireshark.org/docs/wsdg_html_chunked/ChSetupWin32.html and simply don't know where to go from there. I'd like to use Visual Studio 2008 to work with the code if possible, but will do whatever is necessary. (I'm a total noob at using command prompt to do anything though.)
If you followed those steps, then you've built it. I'll copy Section 2.2.10 here.
2.2.10. Build Wireshark
Now it's time to build Wireshark ...
If you've closed cmd.exe in the meantime, prepare cmd.exe again
nmake -f Makefile.nmake all to build Wireshark
wait for Wireshark to compile - this may take a while!
run C:\wireshark\wireshark-gtk2\wireshark.exe and check if it starts
Just make changes in the code, do these steps over again, and presto! you've modified the program. You may want to bone up on C debuggers if you're doing anything very complicated.
Related
It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 10 years ago.
I'm trying to implement PLC like HW that would be able to be programmed with some universal programming language (can be ANSI C for a start).
I'd like to program HW in several steps :
write generic program in txt file (can be subset of ANSI C for a
start)
parse that txt file and build some sort of execution graph to
be sent to ansi c engine on embedded HW
have ansi c engine that can execute "execution graph" over and over...
I've found pretty similar and interesting project here:
http://collaboration.cmc.ec.gc.ca/science/rpn/biblio/ddj/Website/articles/DDJ/1989/8908/8908d/8908d.htm
but this is interpreter and parses program as a text for each step and is getting pretty slow and not space friendly. What I would like to change in this story is to parse C program in execution structure (AST?) once and then just execute it with ansi c engine on embedded HW.
I'm pretty sure that something similar is already done and shared. Please help me with starting points, advice or any other opinion...
Thanks in advance,
regards,
Bulek.
It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 10 years ago.
I have a project I'm going to be doing on a microcontroller. I plan on having it interface with my computer over a USB serial connection. I tried doing the basic tests like putc(getc()), but I'm having trouble getting it to behave as I expect.
With that simple hardware-echo thing, many things just don't work. When I push enter, I just get a carriage return. Backspace does nothing. CTRL-C for breaking doesn't work either.
I'm using GNU Screen as my terminal emulator. How do I learn how to handle all of this(along with stty settings) so I can make a useful command interface on my microcontroller?
You will need to know what terminal type your Screen terminal is emulating so that you know what codes to send out the serial port. For example, if you set your terminal to VT100, you can check out this link which provides some VT100 codes
And for gnu-screen you might want to check this out as it contains an exhaustive list of ESC and control strings/commands that you can use.
It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 10 years ago.
I'm having a problem with getting this code to print out to file due to some undefined behavior. It seems that when I test it the output file opened but was empty. can anyone run it on their system and tell me if it work on your system or is it not working at all. Also can you provide me with the output file if you run it.
here is the code
http://ideone.com/ku7qc
and the data for the file
http://ideone.com/TY1U8
thanks
Per the code comments:
The compiler is supposed to be gcc, the system("PAUSE") won't "work" in most UNIXes. It looks like it is meant to be compiled under cygwin running on a Windows PC, or under Linux. Not Windows. The PAUSE part makes very little sense, since that is largely a DOS command. You had to have copied the code from someone, it looks like the code scores competing ice skaters. The probability that it is production code is low.
Where did you get the code, and what assignment is this supposed to be for?
Suggestion:
See www.cygwin.com to install cygwin on your PC.
It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 11 years ago.
I have practically no experience with programming outside of ide's (Microsoft Visual Studio, netbeans and eclipse) and I am beginning to learn C programming. I have adequate experience with C++ and Java. I have downloaded gVim 7.3 and am looking for some guidance on how to program in C with vim. I do not even know where to type code with vim! I am completely lost and am looking for instructions to run simple command-line programs such as hello-world (to start). Also, would notepad++ be of any use?
Somebody please show me the world of C programming and Vim
Usually its done like this - you open up a shell window, set your compile enviroment configuration. Then open any files you are working on with gvim to have a C syntax highlighting available, modify them and save. Get back to shell window repeat make command or whatever you need to compile and link application.
The usefull extension for me was ctags, which allows to browse declarations. You dont get the comfort of code completions, intelissence, on-the-fly error messages or list of function parameters, but I didnt miss that much eitherway.
It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 11 years ago.
I'm quite interested in getting "stuck in" to some Unix source code, say Fedora or Ubuntu.
In practical terms, how would one "re-write" some part of the Unix OS. I presume you would need two machines, a dev machine and a tester? Would you need to re-install the OS on each modification of a .c file? How could I edit the file and re-compile it etc?
What resources are there for knowing which parts of a Unix OS/Kernel relate to which C files (I presume there is no C++) and how to find them?
Thanks in advance for help
ps my motivations for doing this are to eventually be able to learn more about the lower-level fundamentals of the Unix OS, so that I could try and get into programming high freq trading systems.
I think it would probably be a good idea to have some kind of virtual machine to experiment with, that way you could do a snapshot apply your changes but still be able to go back without much effort. Also it allows you to simulate communication between PCs in a simple fashion.
First you need to know what you're looking for. You want to download and look at the: linux kernel. Which is the same for Fedora and Ubuntu (and all other GNU Linux distributions). Second, you might want to start with something easy, like downloading the kernel, configuring and compiling it and booting it. Once you do that you can move up from there.