Code Newbie
News     Forums     Search     Members     Sign Up    

My Code Newbie
Username

Password

Articles/Snippets
ASP Classic
ASP.NET
C
C#
C++
HTML / CSS
Java
Javascript
Linux / BSD
Perl
PHP
Python
Ruby
SQL
VB 6
VB.NET

C.N. Friends
  Planet Rome

Link to Us!
Code Newbie
  Code Newbie
    forums

Go Back   Code Forums > Application and Web Development > Standard C, C++

Reply
 
LinkBack Thread Tools Display Modes
Old 08-13-2002, 10:09 PM   #16 (permalink)
abc123
bloomberg
 
abc123's Avatar
 
Join Date: Jun 2002
Location: bloomberg
Posts: 263
abc123 is on a distinguished road
Send a message via AIM to abc123 Send a message via Yahoo to abc123
just grab g++ or something like that from somewhere... download.com might have it
__________________
-- bloomberg.
abc123 is offline   Reply With Quote
Old 08-13-2002, 11:07 PM   #17 (permalink)
redhead
Newbie
 
redhead's Avatar
 
Join Date: Jun 2002
Location: Denmark
Posts: 1,711
redhead is on a distinguished road
Quote:
Originally posted by w00t

undefined symbol _main in module co.asm
You need a main function, when compiling something, else the last linking will return with an error like this.. The compiler dont know where the executable should start, it's looking for a main() somewhere.. Yet can't find it anywhere, thats why it errors out.

If you wan't it to be made out of several files, then compile the ones without a main() with the flag -c and remember to include their respective header files in the one containing the main() function, and remember to give all the object files along with it's compilation ie.with files like:
myclass.cc, myclass.h, myotherclass.cc, myotherclass.h, mymain.cc
When compiling do:
# for i in *class.cc; do g++ -c $i; done
# g++ -o myproggy *.o mymain.cc

But since you mention you use Kdevelop, it would be easier, just to let that create a Makefile for you, and just use make all
__________________
Don't worry Ma'am, We're university students, We know what We're doing.
-----
If you pull the pin, Mr.Grenade would no longer be your friend.
-----
01000111 01101111 00100000 01000011 00100000 00100001
redhead is offline   Reply With Quote
Old 08-13-2002, 11:17 PM   #18 (permalink)
w00t
Totally Inept
 
w00t's Avatar
 
Join Date: Jul 2002
Location: The Great Northwest
Posts: 195
w00t is on a distinguished road
So adding an int main() would work?

Kdevelop is being a little prick so I've been practicing with Borland 5.5. Bland, but useful.
__________________
Office Space:
Best Movie.
Ever.

Contrary to popular belief, the true function of a programmer
is to turn coffee into source code.
w00t is offline   Reply With Quote
Reply

Bookmarks

Thread Tools
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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Couln't find any template, giving up infinite_root PHP 5 05-25-2004 08:07 PM
CodeNewbie helps detect Konquerer Bug . . . sde Lounge 1 02-19-2004 01:22 AM
bug anon Feedback 10 01-12-2003 03:30 PM


All times are GMT -8. The time now is 06:27 AM.


Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.0.0 RC8





Copyright © 2000-2008, Milano Interactive
Web Hosting provided by Portal 360 Web Hosting