Jump to content


Photo

Gmapi V0.6.2 [updated: 26 Feb 2010]


  • Please log in to reply
337 replies to this topic

#301 Houdini

Houdini

    GMC Member

  • New Member
  • 195 posts

Posted 20 April 2011 - 02:27 PM

Really though I would try to push for yoyo to expose an interface we can use to make code::blocks and MS dll with. An interface they would be in charge of updating each release instead of you hacking you way through each time. Your dedication is appreciated. This api has done more for GM than any gm release since gm7.


I second this suggestion. If Snake_PL decides to stop supporting GMAPI there will be many many great GM extensions that will be DOA. YoYo Games really needs to think about integrating this!

- Houdini
  • 0

#302 Maarten Baert

Maarten Baert

    GMC Member

  • GMC Member
  • 714 posts
  • Version:GM8.1

Posted 21 April 2011 - 07:24 PM

I was trying to get one of my DLLs working in GM8.1 (the DLL doesn't use GMAPI but a much simpler system, it can only call GM functions), and I created a simple memory scanner. It works, although it's a bit slow (can take a few seconds). Anyway, I thought it might be useful for GMAPI too, so here it is:
http://pastebin.com/947kxZAA

Edited by Maarten Baert, 21 April 2011 - 07:24 PM.

  • 0

#303 blizter

blizter

    GMC Member

  • GMC Member
  • 50 posts

Posted 28 April 2011 - 03:56 PM

Anyone ever managed to get the api working with Code::Blocks ?

[Edit]

Ok, I got it working using MinGW with SJLJ exceptions.

Works great.

You might consider compiling it with dwarf2

Edited by blizter, 28 April 2011 - 04:36 PM.

  • 0

#304 icuurd12b42

icuurd12b42

    Self Formed Sentient

  • Global Moderators
  • 14389 posts
  • Version:GM:Studio

Posted 28 April 2011 - 04:39 PM

Yes.

http://code.google.c...gw.rar&can=2&q=

Add its include folder to the extra include directory in your project
Add its lib folder to the extra library directory in your project (not needed)
Add the .a file for the extra library in your project
  • 0

#305 brett14

brett14

    GMC Member

  • GMC Member
  • 1150 posts
  • Version:GM8

Posted 28 April 2011 - 11:25 PM

Yes I got it working with CB
  • 0

#306 icuurd12b42

icuurd12b42

    Self Formed Sentient

  • Global Moderators
  • 14389 posts
  • Version:GM:Studio

Posted 29 April 2011 - 01:47 AM

\/

Y]



I got it working with CB


How big is your resulting dll? Mine if effing big (600+KB regular and 12MB with debug info). A big difference with MS
  • 0

#307 ChaosMaker

ChaosMaker

    GMC Member

  • GMC Member
  • 288 posts
  • Version:GM:HTML5

Posted 09 May 2011 - 04:03 PM

incredible!
just thought a little tricky to use at the time.
I had no idea where to put my code, I downloaded some of their examples.
that was when I was in doubt if the GMAP makes dlls for the game maker, or if the GMAP is to program in C + + like in gml.
  • 0

#308 blizter

blizter

    GMC Member

  • GMC Member
  • 50 posts

Posted 18 May 2011 - 01:20 PM

Hey guys, I was wondering if there was any info on the "Last Save Date" or "Compile Date" in the header of a compiled gmk file with 8.0. If there is, can I access this data, I would use to do a version check.
  • 0

#309 Primoz128

Primoz128

    GMC Member

  • GMC Member
  • 277 posts
  • Version:GM:Studio

Posted 22 May 2011 - 11:45 AM

So when is update coming... 2 months ago i heard in one month so im bit worried but can wait no longer than 1 more month...
  • 0

#310 TheMagicNumber

TheMagicNumber

    GMC Member

  • GMC Member
  • 5247 posts
  • Version:Unknown

Posted 22 May 2011 - 02:31 PM

So when is update coming... 2 months ago i heard in one month so im bit worried but can wait no longer than 1 more month...

Snake_PL hasn't said anything.
  • 0

#311 Medusar

Medusar

    GMC Member

  • GMC Member
  • 1228 posts
  • Version:GM:Studio

Posted 22 May 2011 - 02:41 PM

He said he'd try.
  • 0

#312 Primoz128

Primoz128

    GMC Member

  • GMC Member
  • 277 posts
  • Version:GM:Studio

Posted 24 May 2011 - 09:09 PM

The Magic Number please don't type stuff you don't know.
  • 0

#313 TheMagicNumber

TheMagicNumber

    GMC Member

  • GMC Member
  • 5247 posts
  • Version:Unknown

Posted 25 May 2011 - 11:42 AM

The Magic Number please don't type stuff you don't know.

You do it all the time.
  • 0

#314 Loric

Loric

    GMC Member

  • GMC Member
  • 6 posts
  • Version:GM8

Posted 31 May 2011 - 12:53 PM

I got some errors :( how do i fix it


ERROR:
1>------ Build started: Project: GM Api Test, Configuration: Debug Win32 ------
1>  main.cpp
1>main.obj : error LNK2019: unresolved external symbol "public: static void __cdecl gm::CGMAPI::Destroy(void)" (?Destroy@CGMAPI@gm@@SAXXZ) referenced in function _DllMain@12
1>main.obj : error LNK2001: unresolved external symbol "unsigned long const gm::GMAPI_INITIALIZATION_SUCCESS" (?GMAPI_INITIALIZATION_SUCCESS@gm@@3KB)
1>main.obj : error LNK2019: unresolved external symbol "public: static class gm::CGMAPI * __cdecl gm::CGMAPI::Create(unsigned long *)" (?Create@CGMAPI@gm@@SAPAV12@PAK@Z) referenced in function _DllMain@12
1>C:\Users\Loric\Documents\Visual Studio 2010\Projects\GM Api Test\Debug\GM Api Test.dll : fatal error LNK1120: 3 unresolved externals
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
CODE:
Spoiler

  • 0

#315 paul23

paul23

    GMC Member

  • Global Moderators
  • 3355 posts
  • Version:GM8

Posted 31 May 2011 - 12:55 PM

I got some errors :( how do i fix it


ERROR:

1>------ Build started: Project: GM Api Test, Configuration: Debug Win32 ------
1>  main.cpp
1>main.obj : error LNK2019: unresolved external symbol "public: static void __cdecl gm::CGMAPI::Destroy(void)" (?Destroy@CGMAPI@gm@@SAXXZ) referenced in function _DllMain@12
1>main.obj : error LNK2001: unresolved external symbol "unsigned long const gm::GMAPI_INITIALIZATION_SUCCESS" (?GMAPI_INITIALIZATION_SUCCESS@gm@@3KB)
1>main.obj : error LNK2019: unresolved external symbol "public: static class gm::CGMAPI * __cdecl gm::CGMAPI::Create(unsigned long *)" (?Create@CGMAPI@gm@@SAPAV12@PAK@Z) referenced in function _DllMain@12
1>C:\Users\Loric\Documents\Visual Studio 2010\Projects\GM Api Test\Debug\GM Api Test.dll : fatal error LNK1120: 3 unresolved externals
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
CODE:
Spoiler

recompile the source code in vs 2010.. As the static library compilation was made with "whole program optimization" turned on it only works when the compiler version of the static library matches the version used for creating the dll.
  • 0

#316 Loric

Loric

    GMC Member

  • GMC Member
  • 6 posts
  • Version:GM8

Posted 31 May 2011 - 01:34 PM

I'm noob.. detailed instructions please :(
  • 0

#317 Loric

Loric

    GMC Member

  • GMC Member
  • 6 posts
  • Version:GM8

Posted 31 May 2011 - 04:26 PM

OK...

  • New project...
  • Win32 Project -> OK
  • Next -> Static Library -> uncheck 'Precompiled header' -> Finish
  • Copy source files to new project directory
  • Add -> Existing Item (source files)
  • Build project -> succeeded
  • Use created lib in my dll

But this doesnt work, what is wrong?

And what is GMAPICore folder in source rar? :D
  • 0

#318 TheMagicNumber

TheMagicNumber

    GMC Member

  • GMC Member
  • 5247 posts
  • Version:Unknown

Posted 31 May 2011 - 06:12 PM

This doesn't work with GM 8.1. If you're using GM 8, more details would be helpful.

Edited by TheMagicNumber, 31 May 2011 - 06:12 PM.

  • 0

#319 Primoz128

Primoz128

    GMC Member

  • GMC Member
  • 277 posts
  • Version:GM:Studio

Posted 03 July 2011 - 09:03 PM

The Magic Number please don't type stuff you don't know.

You do it all the time.


3 words: NO I DON'T
  • 0

#320 HaRRiKiRi

HaRRiKiRi

    GMC Member

  • GMC Member
  • 1364 posts

Posted 04 July 2011 - 09:44 PM

YYG has put this into the new version:

get_function_address() function has been added to help with external DLLs calling into GameMaker.

So now finally this can actually be updated.
  • 2




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users