How to fix the "undefined symbol _main in module c0.ASM" error in TurboC++3?
#include
void palette(int pnum)
{
union REGS r ;
r.h.bh = 1 ; /* code for mode 4 */
r.h.bl = pnum ;
r.h.ah = 0xb ;
int86(0x10, &r, &r) ;
}
Why the above program has no problem in compiling but gives this error in the linker?
error:"undefined symbol _main in module c0.ASM"
![](https://forum.winworldpc.com/uploads/editor/40/afic0eqeyy6b.png)
![](https://forum.winworldpc.com/uploads/editor/h3/a4lkye3mhj87.png)
![](https://forum.winworldpc.com/uploads/editor/0s/079cb8qhq6ax.png)
![](https://forum.winworldpc.com/uploads/editor/uv/8ujm3u51vp9j.png)
void palette(int pnum)
{
union REGS r ;
r.h.bh = 1 ; /* code for mode 4 */
r.h.bl = pnum ;
r.h.ah = 0xb ;
int86(0x10, &r, &r) ;
}
Why the above program has no problem in compiling but gives this error in the linker?
error:"undefined symbol _main in module c0.ASM"
![](https://forum.winworldpc.com/uploads/editor/40/afic0eqeyy6b.png)
![](https://forum.winworldpc.com/uploads/editor/h3/a4lkye3mhj87.png)
![](https://forum.winworldpc.com/uploads/editor/0s/079cb8qhq6ax.png)
![](https://forum.winworldpc.com/uploads/editor/uv/8ujm3u51vp9j.png)
Comments
the pallette is a custom class you need to call from main. I'm no expert though, I just started learning C++