template boy template boy - 1 year ago 101
C++ Question

Why am I getting a procedure entry point error for this simple C++ code?

I'm writing an SFML game and when I try to run the code this is the error I get:

The procedure entry point
could not be located in the dynamic link library

I've linked to all the libraries correctly and the include files are correct. I've even tried what other answers suggested by putting the
inside the directory of my exectable but still nothing.

Another answer said to put the
directory before any other directory in the
environment variable, which I did as well and it still didn't work.

Note: I get this error only when I try to use SFML code. It runs successfully when I comment it out.

Answer Source

OK, the note you added tells me that the SFML stuff was compiled with another compiler version/configuration, newer one if memory serves right.

You need to make sure that SFML and your code are compiled by the same compiler (versions/configuration) or at least compatible compiler (versions/configuration).

I see that the latest binary packages of SFML use GCC 4.7, and the latest Code::Blocks (mingw) comes with the TDM GCC 4.7 build, so it might be enough to upgrade Code::Blocks and make sure you use the SFML GCC 4.7 TDM (SJLJ) package (and use the gcc that comes with Code::Blocks, of course).

Otherwise, you should probably install the TDM-GCC 4.7 compiler build manually, or if nothing works, compile SFML yourself.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download