Compiling error

Monkey Targets Forums/Desktop/Compiling error

lonnieh(Posted 2014) [#1]
Can not figure out what in the heck is the deal with this error. I am not even sure what I did differently. I haven't compiled anything in a few weeks and as soon as I come back I find this. Every time I try to start a newly created executable I get this error along with the message:

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

I have googled it and found that if I copy libstdc++-6.dll from the mingw\bin folder to the build folder it works. I have my MinGW path set correctly too, I have double checked that as well. My config is:
Windows 8.1
Monkey v78h
MinGW 4.8.1

I have also completed remove MinGW and reinstalled it using the automatic installer. Any ideas?


Pharmhaus(Posted 2014) [#2]
This behaviour pops up when you start your program from disk and not from whithin the IDE. (*Magic*)
you can link to stdc++ statically by putting this at the top of your code
#CC_OPTS+="-static"

I *believe* you can statically link to libstdc++ without running into licensing issues but I'm not a lawyer.
See here


lonnieh(Posted 2014) [#3]
That is currently how I am launching it is through the IDE. Both mollusk and Ted do the same. I have also tried debug and release, nothing.


Pharmhaus(Posted 2014) [#4]
Well, this sounds strange.
Did you upgrade your Monkey X version in between?
Or did you unintentionally move the dll from the bin folder instead of copying?
If nothing helps you could download ~gone~ and replace your existing one, maybe it's a MinGW problem...

EDIT: do you have multiple MinGW installations running? (e.g. for BlitzMax + Monkey)


lonnieh(Posted 2014) [#5]
I did go from 77f to 78h but I have compiled for desktop since upgrading and refreshing targets (I think?!?). As far as I know just one install of MinGW that is on my primary drive.


Pharmhaus(Posted 2014) [#6]
It could be rights problem with the IDE.
Have you tried starting Ted/Monkey with administrator rights?

If downloading
~gone~
also has no effect i will see if i can upload a working mingw version for you....


lonnieh(Posted 2014) [#7]
Yep. Same error, and I replaced the dll with the one you posted as well with no luck. I am actually a little frustrated with this version of MinGW I have because now it also nags about not having a disk in drive E every time I try to compile anything (http://mingw.5.n7.nabble.com/mingw32-gcc-exe-No-Disk-td32484.html) . I appreciate the help, but I think I'm going to head off to bed, this is driving me crazy.


Pharmhaus(Posted 2014) [#8]
Sorry for the inconvenience I believe It's a MinGw problem, can you please try this version.
~gone~


lonnieh(Posted 2014) [#9]
My knowledge is very limited compared to yours but I have to agree. I removed the old install, replaced it with yours and then encountered the same error. Currently downloading TDM-GCC. Thanks again for the help!


lonnieh(Posted 2014) [#10]
Wow, TDM-GCC install worked right after I updated my target config file. I am just baffled why mingw stopped working on my system.

(Edit: Was it a system update that possibly interacted with it negatively?)


Pharmhaus(Posted 2014) [#11]

Was it a system update that possibly interacted with it negatively?


I'm on Win7 so I can't tell, but it feels a lot like one..
Good to hear that it is working again now!