|
-
January 9th, 2009, 11:29 AM
#30
Re: build a project using given obj files
 Originally Posted by lqakane
I think he did not write a main function when generating the obj files. The reason is through the interface he gave me I should write my own main to do testing. If he did write a main, I would not be able to test as a program cannot have two mains. Am I right?
I wrote my own main.cpp which includes all header files. In this cpp I wrote int main() { return 1;}
You may think you did...but...the linker is not seeing it.
Most likely, you did not include the file in the linker command, possibly you declared main as having file scope, maybe you even spelled main wrong. Please SHOW your implementation of main.
TheCPUWizard is a registered trademark, all rights reserved. (If this post was helpful, please RATE it!)
2008, 2009,2010
In theory, there is no difference between theory and practice; in practice there is.
* Join the fight, refuse to respond to posts that contain code outside of [code] ... [/code] tags. See here for instructions 
* How NOT to post a question here
* Of course you read this carefully before you posted
* Need homework help? Read this first
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|