1

I've made several attempts to find this information on the internet via google, this site, and a few others; I can't seem to find a good tutorial and/or answer on/for it.

How would I go about using the Ruby C API in Visual C++ 2010? I've added Ruby include folders to my project's inclusion paths, and I've also added the Ruby devkit include folders as well. However when I #include <ruby.h> it still can't find inttypes.h, and before the devkit paths were added it couldn't find other various header files.

What am I doing wrong?

mu is too short
  • 426,620
  • 70
  • 833
  • 800
FenixFyreX
  • 35
  • 3
  • possible duplicate of [Where is in Visual Studio 2005?](http://stackoverflow.com/questions/1156267/where-is-inttypes-h-in-visual-studio-2005) – mu is too short Sep 03 '12 at 19:47
  • The header `inttypes.h` does not ship with Visual Studio. If you have to include a C99 header in Visual Studio be in doubt about its existence :). – halex Sep 03 '12 at 19:50
  • Not technically, that topic still doesn't explain to me how to use ruby's c api in visual c++. Simply adding `#include ` is not enough, it seems. – FenixFyreX Sep 03 '12 at 19:52

1 Answers1

0

Visual Studio does not ship with an inttypes.h as it does not have proper C99 support.

You need to get this header from a third party source such as http://code.google.com/p/msinttypes/

ThiefMaster
  • 310,957
  • 84
  • 592
  • 636
  • It seems that the "no such file or directory" @inttypes.h is not gone after I included the files you left me into my project..also, now I'm getting `c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\stdint.h(33): error C2371: 'int_fast8_t' : redefinition; different basic types 1> c:\users\owner\documents\visual studio 2010\projects\fyxtools\fyxtools\stdint.h(104) : see declaration of 'int_fast8_t'` – FenixFyreX Sep 03 '12 at 20:07