[A44] Getting current Directory with allegro
He's asking about allegro 4.4
getcwd is extremely cross-platform. I know only two mostly-POSIX compilers that don't implement it:
- The C compiler used on Atari MiNT
- Microsoft compilers...
Oh! so it's more compiler dependent than platform dependent?
So I could use getcwd if I compile a windows app with gcc, but not msvc?
Yep. Write your code on Mingw-gcc, and almost everything will work on other systems.
It's more dependent on the runtime libc library. msvcrt is missing a lot of things, and some are there, but have an underscore prepended.
It's pretty much just to make porting programs harder.
getcwd does seem to be implemented and actually works at least in my visual studio 2012. The header for it is direct.h.
Thread #613931. Printed from Allegro.cc
When you don't use VS getcwd doesn't need direct.h. Maybe it derives from winallegro. But I can't tell for sure.