Re: [Dev-C++] undefined reference error?
Open Source C & C++ IDE for Windows
Brought to you by:
claplace
|
From: Sebastien M. <seb...@te...> - 2002-12-15 09:19:44
|
Just I don't really agree about your definition of WinMain and main :) I would say, main is the standard, and WinMain is used by windows. According to which libraries you use to compile, you should be able to use main or WinMain under windows for both application (graphical and text). By default I think that main compiler under windows use WinMain, that's why you get the problem. But anyway I'm sure you can do graphical application using a simple main as an entry point. Sebastien. On Sat, Dec 14, 2002 at 11:11:33AM +0100, Zodiaq wrote: > Hello Zachary and all Dev-C++ users, > > Saturday, December 14, 2002, 9:12:08 AM, Zachary wrote as follows: > > ZU> Hi, > > ZU> I created empty project, I added 2 files to it: stack.h and stack.cpp > > ZU> When I compile I get weird error. It is very obtuse and does not even give > ZU> a Line number of the error! Here is error: > > Hmm... to run ANY project you need an entry point - special function > that acts as begining of application... for console apps you need: > int main( ) > ,and for GUI Apps you need: > int WINAPI WinMain (HINSTANCE hInst, HINSTANCE hPrev, LPSTR lpCmd, int nShow) > > And if added ONLY these two files it wont run, or compile properly > because there is no entry point - I can't see there int main nor > winmain... and It looks like you have chosen WinMain project but the > code uses std::iostream so you better choose console project... > > ZU> Zachary Uram > ZU> John 3:16 > > > -- > regards, Zodiaq > > > > ------------------------------------------------------- > This sf.net email is sponsored by: > With Great Power, Comes Great Responsibility > Learn to use your power at OSDN's High Performance Computing Channel > http://hpc.devchannel.org/ > _______________________________________________ > Dev-cpp-users mailing list > Dev...@li... > TO UNSUBSCRIBE: http://www.noicys.cjb.net/devcpp/ub.htm > https://lists.sourceforge.net/lists/listinfo/dev-cpp-users > -- Time remaining: 28 weeks 1 days 21 hours 23 minutes |