Hi everyone,
I've solved the problem. I got someone to send me a copy of LIBCMT.LIB
Stupidly enough, MS don't make this library available for direct
download :( Comes as part of MSVC, and NOT in the latest version!!! So
I had to hunt all over for it. Out of 3 versions I tried, one had it.
Anyhow... this works a lot better than CodeWarrior's standard DLLs...
It lets me use fsync, for a start :)
Also, CodeWarrior's dll's handle unix stuff terribly. They just aren't
part of the OS. That's why I need the standard DLLs, so it can do
stuff like "open", "read", "write". Or else, when I pass file paths to
it, CodeWarrior's win32lib can't handle the paths.
On 10 Nov 2008, at 17:49, Theodore H. Smith wrote:
Oh wait... that's not the problem.
Basically, the reason I used MSVCRT.lib was because I couldn't find
fsync in CodeWarrior's standard libraries. It's CW 8.3 btw.
Try this example:
#include <fcntl.h>
#include <stdio.h>
#include <stdlib.h>
int main(void) {
int pfd = 0;
fprintf(stdout, "Probably better not to execute this code!!\n");
pfd = open("/path/to/file.txt", 0);
if (pfd == -1) {
perror("Cannot open file\n"); exit(1);
}
fsync( pfd ); /* added this line */
return 0;
}
On 10 Nov 2008, at 17:39, Theodore H.Smith wrote:
On 10 Nov 2008, at 17:25, Christian Schmitz wrote:
Theodore H. Smith <[EMAIL PROTECTED]> wrote:
Hi everyone,
I've found out that my ElfData plugin doesn't work on Vista,
without
the MSVCRT71.dll file, which is NOT preinstalled on Vista by
default.
Well, you need static libraries in your projects like I do.
I use the static runtime from Codewarrior and have no need for a
msvcrt.lib file.
But can you access unix functions?
Does this code compile for Win32?
int main(void)
{
int pfd = 0;
fprintf(stdout, "Probably better not to execute this code!!\n");
if ((pfd = open("/path/to/file.txt", O_WRONLY | O_CREAT | O_TRUNC,
S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH)) == -1)
{
perror("Cannot open file\n"); exit(1);
}
return 0;
}
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>
Search the archives:
<http://support.realsoftware.com/listarchives/lists.html>
--
http://elfdata.com/plugin/
"String processing, done right"
--
http://elfdata.com/plugin/
"String processing, done right"
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>
Search the archives:
<http://support.realsoftware.com/listarchives/lists.html>