Menu

entry point error

jon
2011-09-18
2012-09-26
  • jon

    jon - 2011-09-18

    when i attempt to run a program using the function 'ofstream', the code
    compiles but fails to run; returning this error message

    "the procedure entry point _gxx_personality_v0 could not be located in the
    dynamic link library libstdc++-6.dll."

    ifstream returns the same error message. these functions worked fine on my old
    vista laptop, but dont work on my new 7 laptop.

    is there any way i can fix this myself?

     
  • Jim Pattee

    Jim Pattee - 2011-09-18

    Is it bring compiled with g++?
    Post the compile log.

     
  • jon

    jon - 2011-09-18

    there are no problems with compiling, the log simply reads 'compiler: default
    compiler, done'

    and that first bit didnt make any sense to me, could you clarify 'Is it bring
    compiled with g++?' please

     
  • Jim Pattee

    Jim Pattee - 2011-09-19

    The compiler will be indicated on the compile log.
    The compiler will be some form of either either gcc or g++ and will appear on
    the compile log.
    You need to look at the compile log with the detail, the entire command line.
    It should be in the bottom window during the compile.
    You may need to change an option to see it.

     
  • jon

    jon - 2011-09-19

    oh, that compile log. gotcha.

    it reads:

    compiler: default compiler
    executing g++.exe...
    g++.exe "C:\users\jon\documents\programming\test.cpp" -o
    ""C:\users\jon\documents\programming\test..exe"
    execution terminated
    compilation successful

     
  • Jim Pattee

    Jim Pattee - 2011-09-19

    The program is compiled with g++ so it is ok there.

    I think the problem may be that Windows 7 doesn't have the libstdc++-6.dll.
    The file should be in the bin directory of the MinGw compiler.
    Copy it to the directory containing your executable and see if it works.
    For a permanent fix it can be copied to the Windows directory instead.
    You may also need to copy other dlls as well.

     
  • Jim Pattee

    Jim Pattee - 2011-09-19

    The problem might also be solved by using the option -static-libstdc++ .
    This will include the code in your executable so a dll isn't necessary.

     
  • jon

    jon - 2011-09-20

    sorted it, thanks.

    tried copying the dll to the directory of my program, but it said the file was
    already there. i have a copy of gnuplots in the same folder, and that has a
    dll with the same name. so my program was reading that instead of the one in
    winGW. i just have to move gnuplots.

    thanks for your help

     
  • Jim Pattee

    Jim Pattee - 2011-09-20

    You were probably mixing 32 and 64 bit code. Your executable was one (probably
    32 bit), and the dll was the other. Hence the "personality" error. Windows 7
    will usually use 64 bit code. Dev-cpp probably comes with the 32 bit version
    of windows.

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.