| TIP: Click on subject to list as thread! | ANSI |
| echo: | |
|---|---|
| to: | |
| from: | |
| date: | |
| subject: | main() |
Hello, I would like to compile and link a program whose main() function is hidden in a .LIB file somewhere. I linked a library that contains the main() function, and then linked that into a program without a main() function, just to see what would happen. I got what I thought I would get, i.e., an "Unresolved external _main" error message from the linker. I was expecting this, but I'm curious as to why this doesn't work. I'm certainly no linker expert, but I would think that it could resolve the main() function stored in the library. So, I have 2 questions for anyone here; 1. why doesn't it work? and 2. how can something like this be made to work? I've seen class libraries where, instead of defining a main() function in your program's code, there is something like a zApp::main(), or, in the case of MFC, just a global variable of type CApplication or something. I'm assuming that main() is hidden away in a library somewhere, but I don't know. Thanks in advance, Kelly ___ X KWQ/2 1.2g NR X "640K ought to be enough for anybody." - Bill Gates, 1981 --- Maximus/2 2.01wb* Origin: OS/2 Shareware BBS, Fairfax, VA: 703-385-4325 (1:109/347) SEEN-BY: 12/2442 54/54 620/243 624/50 632/348 640/820 690/660 711/409 410 413 SEEN-BY: 711/430 807 808 809 934 942 712/353 623 713/888 800/1 @PATH: 109/347 2 7 3615/50 229/2 12/2442 711/409 54/54 711/808 809 934 |
|
| SOURCE: echomail via fidonet.ozzmosis.com | |
Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.