Please login or register.

Login with username, password and session length
Advanced search  

News:

Forum rules - please read before posting, it can save you a lot of time.

Author Topic: Segmentation Fault with Plugin compiled with GNU-GCC  (Read 2965 times)

0 Members and 1 Guest are viewing this topic.

fernandonn

  • Lurker
  • *
  • Karma: 1
  • Offline Offline
  • Posts: 6
    • View Profile
Segmentation Fault with Plugin compiled with GNU-GCC
« on: February 14, 2012, 08:41:55 PM »

Hi,

I am developing a plugin for Wintermute, but as I don't have Microsoft C++ I used Code::Blocks & Gnu GCC
My first problem was a dynamic dependency that I could solve using -static-libgcc -static-libstdc++

Now I can compile the plugin and it is listed correctly as a available plugin. But when I run the application it gives me a Segmentation Fault.
As I was afraid of being doing something wrong, I tried compiling the Sample Plugin with the same problem, so I guess is a GCC problem.

Debugging the code, I find out the first line that gives me the error. It is when I call Stack->ExpectParams(1); at CSample::CSample. But more generally it is when I call any function from the WME objects.

Does anyone ever compile a plugin using Gcc? Is it required some configuration or switch?
Any advice will be very appreciated.

Thanks
Btw... sorry about my english  :-[
Logged

Mnemonic

  • WME developer
  • Administrator
  • Addicted to WME forum
  • *
  • Karma: 41
  • Offline Offline
  • Gender: Male
  • Posts: 5683
    • View Profile
    • Dead:Code Site
Re: Segmentation Fault with Plugin compiled with GNU-GCC
« Reply #1 on: February 18, 2012, 06:48:43 PM »

Not a clue, sorry. Maybe you could use the express edition of Visual C++?
Logged
Yes, I do have a twitter account
Please don't send me technical questions in private messages, use the forum. ::wave

fernandonn

  • Lurker
  • *
  • Karma: 1
  • Offline Offline
  • Posts: 6
    • View Profile
Re: Segmentation Fault with Plugin compiled with GNU-GCC
« Reply #2 on: March 16, 2012, 02:58:13 AM »

Better late than ever.. right?
I ended up compiling with VS 2008 Express edition and everything work all right.

But just if someone is facing the same problem....

VS2010 Express Edition have similar problems to those of  GCC, so it is not an option.
The demo plugin solution is for VS2005 but that version is no longer available on Microsoft's site.
Logged
 

Page created in 0.037 seconds with 19 queries.