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"



_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives:
<http://support.realsoftware.com/listarchives/lists.html>

Reply via email to