|
[A44] Getting current Directory with allegro |
larienna
Member #3,185
January 2003
|
Does allegro offers a cross platform way to get the current directory? I found getcwd, but apparently, it's not cross platform. I found this thread that tried to do so: http://stackoverflow.com/questions/2868680/what-is-a-cross-platform-way-to-get-the-current-directory Not sure if it really works. Enjoy! and have fun |
Elias
Member #358
May 2000
|
-- |
Thomas Fjellstrom
Member #476
June 2000
|
He's asking about allegro 4.4 -- |
Audric
Member #907
January 2001
|
getcwd is extremely cross-platform. I know only two mostly-POSIX compilers that don't implement it: |
larienna
Member #3,185
January 2003
|
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? Enjoy! and have fun |
Audric
Member #907
January 2001
|
Yep. Write your code on Mingw-gcc, and almost everything will work on other systems. |
Thomas Fjellstrom
Member #476
June 2000
|
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. -- |
Aikei_c
Member #14,871
January 2013
|
Audric said: Microsoft compilers getcwd does seem to be implemented and actually works at least in my visual studio 2012. The header for it is direct.h. |
#00JMP00
Member #14,740
November 2012
|
When you don't use VS getcwd doesn't need direct.h. Maybe it derives from winallegro. But I can't tell for sure. |
|