-
November 20th, 2003, 07:54 AM
#1
<dirent.h> on MSVC
I have a code that I need to compile and it uses the functions and structs defined in <dirent.h>
I found out that this is not a msvc standard header but I need to use msvc (for other stuff in the project).
So I searched in the internet a lot and could only find the file but now I need to find a .lib or .obj file that contains the functions bodies, and unfortunately I cannot...
Can someone please tell be where I can find this!
thanx a lot for any help
It's only when you look at an ant through a magnifying glass on a sunny day that you realise how often they burst into flames
-
November 20th, 2003, 08:50 AM
#2
I don't think that's available, but replace the function you need from dirent.h with the equivalents in the Win32 API.
What functions do you use from dirent.h?
-
November 20th, 2003, 11:27 AM
#3
Re: <dirent.h> on MSVC
Originally posted by SeventhStar
I have a code that I need to compile and it uses the functions and structs defined in <dirent.h>
I found out that this is not a msvc standard header but I need to use msvc (for other stuff in the project).
So I searched in the internet a lot and could only find the file but now I need to find a .lib or .obj file that contains the functions bodies, and unfortunately I cannot...
Forget about trying to find a "dirent.h" for MSVC and just concentrate on the functions that you're trying to call. It's all part of porting your code to another compiler.
You may never find a header file or lib file to call your functions exactly as before, so you use the functions that are available that mimic or closely resembles what the other functions did.
Regards,
Paul McKenzie
-
November 20th, 2003, 12:24 PM
#4
dirent.h is part of POSIX, so it's quite unlikely you'll ever find it on Windows, except if you use some POSIX port like Cygwin.
For platform-independent directory and path handling, use the Boost Filesystem library from www.boost.org
All the buzzt
CornedBee
-
November 20th, 2003, 08:17 PM
#5
The equivalent functions in MS are _findfirst(), _findnext() and _findclose().
-
November 21st, 2003, 03:18 AM
#6
DJGPP and DEV C++ are both windows compilers and both have dirent.h so it does exist for windows
Also are you sure that nobody has ever written a shell to _findfirst(), _findnext() and _findclose() functions that looks just like dirent.h just to make his UNIX and POSIX programs compile without change under windows
(I see someone has done it for windows gnu c compilers but has nobody done it for windows?)
If noone has, it sure will be easier for me to write it than change the code that I already have because, as I said, it's a LOT!
Last edited by SeventhStar; November 21st, 2003 at 03:21 AM.
It's only when you look at an ant through a magnifying glass on a sunny day that you realise how often they burst into flames
-
November 21st, 2003, 10:51 AM
#7
Both DJGPP and MingW (the compiler used in Dev-C++) are ports of GCC to Windows and thus include a port of POSIX functions.
The problem is that most ports of POSIX functions to Windows are probably done by people who come from Linux, and thus are likely to be licensed under the GPL. Don't forget: if you use that code your app must be released under the GPL too!
Don't know about MingW's port though, maybe it has an easier license (would make sense in a way). Maybe you can use theirs (or adapt theirs so you can use it).
All the buzzt
CornedBee
-
November 24th, 2003, 07:37 AM
#8
the problem is that I want these functions written for msc
i need a .lib file with them or at least their sources
i dont have the sources of these compilers
It's only when you look at an ant through a magnifying glass on a sunny day that you realise how often they burst into flames
-
November 24th, 2003, 08:37 AM
#9
-
November 24th, 2003, 09:47 AM
#10
nevermind...
i re-wrote the functionallity i needed it took me several hours and i'm fine now
thanx for the help
It's only when you look at an ant through a magnifying glass on a sunny day that you realise how often they burst into flames
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|