I wrote a code with fork() but I keep on getting the problem undefined reference to fork(). I know my code works 100% because I run it on my school computer and it works. How do I fix this problem? I use code blocks IDE with GCC compiler and GDB debugger from MinGW.

What operating system? fork() is not supported on MS-Windows and your school computer is probably running *nix.

What operating system? fork() is not supported on MS-Windows and your school computer is probably running *nix.

yea i have windows 7. but my friend somehow got it to work on his windows computer. he told me that there is probably something wrong with my gcc compiler but i dont think so

Be a part of the DaniWeb community

We're a friendly, industry-focused community of 1.18 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.