Discover the answers you need at Westonci.ca, where experts provide clear and concise information on various topics. Get quick and reliable solutions to your questions from a community of seasoned experts on our user-friendly platform. Join our Q&A platform to connect with experts dedicated to providing accurate answers to your questions in various fields.

How to compile graphics.h with emcascripten to a javascript file.
````makefile
CC=emcc
INCLUDE=-I./include
LIB=-L./lib
SRC=./src
LOPTIONS=-lbgi -lgdi32 -lcomdlg32 -luuid -loleaut32 -lole32
TARGET=js/torus.js

serve:
emrun --no_browser --port 8080 .

build:
$(CC) -o $(TARGET) $(SRC)/main.cpp $(INCLUDE) $(LIB) $(LOPTIONS)

clean:
rm -f $(TARGET)

.PHONY: clean
````
````main.cpp

#include
#include
#include"graphics.h"

int main()
{
int gd = DETECT, gm;
initgraph(&gd, &gm, NULL);

circle(50, 50, 30);

delay(500000);
closegraph();
return 0;
}

````