We're a community of 1.1M IT Pros here for help, advice, solutions, professional growth and fun. Join us!
1,080,449 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Start New Discussion Reply to this Discussion

Programming c in microsoft visual studio 2010 professional, Help with linking files

I am taking a data structures class and we are using the standard gcc compiler on a unix system. This is fine and I have no troubles using it, but I would like to begin using an IDE for my labs. I am trying Visual Studio 2010 Professional with my .c files and am able to get very simple programs to compile and execute, however the current lab I am doing requires me to first compile the .c file into a .o file before linking it to another .o file using gcc filename1.o filename2.o -o filename. From what I understand the object files on unix and windows platforms differ, but I still do not understand exactly what a .object file is. This i can look up. What I would like to know, is there a good IDE for the c language ( linux or windows is fine) and if Visual Studio is the recontamination how would I go about compiling my file into an object file, linking it, and then running it.

Any help is appreciated. Thanks in advance.

2
Contributors
2
Replies
1 Week
Discussion Span
2 Years Ago
Last Updated
3
Views
Question
Answered
baldwindc
Light Poster
35 posts since Nov 2010
Reputation Points: 10
Solved Threads: 3
Skill Endorsements: 0

You can use Visual Studio its OK. But if you are using Linux and Windows you may want to try something like Code:Blocks or Eclipse which are multi-platform and run on both Linux and Windows, that way you only have to learn the ins and outs of 1 IDE that you can use everywhere.

Both those IDEs use gcc on Linux and MinGW(a gcc port) on Windows.

Banfa
Master Poster
706 posts since Mar 2010
Reputation Points: 510
Solved Threads: 109
Skill Endorsements: 5

Thanks. That helped. Using code blocks. Was still having some issues getting it to produce the .o file and then link to another but i just used a custom makefile. Will mark as solved.

baldwindc
Light Poster
35 posts since Nov 2010
Reputation Points: 10
Solved Threads: 3
Skill Endorsements: 0
Question Answered as of 2 Years Ago by Banfa

This question has already been solved: Start a new discussion instead

Post: Markdown Syntax: Formatting Help
 
You
View similar articles that have also been tagged:
 
© 2013 DaniWeb® LLC
Page generated in 0.0950 seconds using 2.68MB