Borland's C++

Started by
7 comments, last by Kodra 22 years, 9 months ago
I just got the book IsoHex book and tried loading up some of their samples. Each time I got an error saying "Error Writing Output File". The error occurs after the very last line of code. My question. Is there something I need to do to get my complier to accept this code? Or do I need to get a different compilier? ~Kodra "You and all those mental wimps deserve to die, isn''''t that right, mister THREE-FOURTEEN"~Mortimer McMire
"You and all those mental wimps deserve to die, isn''t that right, mister THREE-FOURTEEN"~Mortimer McMire
Advertisement
I am completely guessing here what your problem is, be fore-warned:

It sounds like you are trying to write something to disk this is marked read-only or some other reason you have no access. Are you trying to compile something straight off the CD for example? Just some things you can possible look for.

YAP-YFIO
-deadlinegrunt

~deadlinegrunt

This happens sometimes if you compiled the program before and it crashed but is still running in the task list... thus being read only. Try checking the task list or restarting. It may also be because you are trying to compile off the CD like deadlinegrunt said.

I know only that which I know, but I do not know what I know.
Well that answers that question but now it gives me a Unreferenced external ''_main''. I''ve seen this before when I have parameter problems in other C++ progs, but in this context I''m rather stumped. Any help?

"You and all those mental wimps deserve to die, isn''''t that right, mister THREE-FOURTEEN"~Mortimer McMire
"You and all those mental wimps deserve to die, isn''t that right, mister THREE-FOURTEEN"~Mortimer McMire
Thats because its expecting

int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR szcmdline, int ncmdshow) { //code here }

instead of int main() { }
Hello from my world
It has the int WINAPI WinMain instead of the int main though.

~Kodra

"You and all those mental wimps deserve to die, isn''''t that right, mister THREE-FOURTEEN"~Mortimer McMire
"You and all those mental wimps deserve to die, isn''t that right, mister THREE-FOURTEEN"~Mortimer McMire
quote:it gives me a Unreferenced external '_main'


What I am getting out of this statement is that it is actually looking for main, not WinMain. Now if this is an actual win32api style program that should be using WinMain then somehow you have manage to link against the wrong libraries. (It's trying to make a console app instead of a windows app) Did this have a project included with it? If not and you just open the source files I know VC++ will default to console version linkage when it makes a default workspace. I'm not sure about Borland, but if I were to hazard a guess I believe it probably does something very similar.

YAP-YFIO
-deadlinegrunt

Darn tags --

Edited by - deadlinegrunt on June 30, 2001 11:35:46 AM

~deadlinegrunt

Do
bcc32 -W filename.c

THe -W implies its a windows program, else it will look for main.
Hello from my world
quote:Original post by Kodra
Well that answers that question but now it gives me a Unreferenced external ''_main''. I''ve seen this before when I have parameter problems in other C++ progs, but in this context I''m rather stumped. Any help?

"You and all those mental wimps deserve to die, isn''t that right, mister THREE-FOURTEEN"~Mortimer McMire


Try creating a new Win32 EXE program instead of a Win32 Console App. That should solve your problem...



"And that''s the bottom line cause I said so!"

Cyberdrek
Headhunter Soft
A division of DLC Multimedia

Resist Windows XP''s Invasive Production Activation Technology!
[Cyberdrek | ]

This topic is closed to new replies.

Advertisement