NO

Recent Posts

Pages: [1] 2 3 ... 10
1
Work in progress / Re: fSDK© - Frankie's SDK for PellesC
« Last post by TimoVJL on June 18, 2019, 06:28:39 pm »
PellesC don't support COMDAT  :(

So one source and an UNICODE support source file DxErrW.c for library
Code: [Select]
// DxErrW.c
#define UNICODE
#include "DxErr.c"
2
Work in progress / Re: fSDK© - Frankie's SDK for PellesC
« Last post by Abraham on June 18, 2019, 05:28:48 pm »
DxErr.lib in "DirectX SDK June 2010" is not linking because of external dependencies.

Clarify: This issue occurs with Windows 10, and maybe those that have Windows SDK.

I've made changes.
Use this one, and compile manually DxErr.lib for your settings:
x86 or x64.
Static Single Thread, Static Multi-Thread, or Dynamic Multi-Thread.
3
Work in progress / Re: fSDK© - Frankie's SDK for PellesC
« Last post by frankie on June 18, 2019, 01:45:56 pm »
Hello Abraham.
I'm not sure to understand what you mean.
4
Work in progress / Re: fSDK© - Frankie's SDK for PellesC
« Last post by Abraham on June 18, 2019, 01:27:19 am »
#include <DxErr.h>
#pragma comment(lib, "DxErr")

POLINK: error: Unresolved external symbol '_vsnprintf' - referenced from 'DxErr.lib(dxerra.obj)'.
POLINK: error: Unresolved external symbol '__security_cookie' - referenced from 'DxErr.lib(dxerra.obj)'.
POLINK: error: Unresolved external symbol '__security_check_cookie' - referenced from 'DxErr.lib(dxerra.obj)'.
POLINK: error: Unresolved external symbol '__GSHandlerCheck' - referenced from 'DxErr.lib(dxerra.obj)'.
POLINK: fatal error: 4 unresolved external(s).

Not sure how to get pass this issue.

For Visual Studio, it would be: legacy_stdio_definitions.lib, but
#pragma comment(lib, "legacy_stdio_definitions")
POLINK: fatal error: File not found: 'legacy_stdio_definitions.lib'.


Recompile DxErr.c and DxErr.h from the attachments. They are adjusted to also work with ANSI, not only UNICODE.
It would conflict without removal of your dxerr.h.

DXGetErrorDescriptionW and DXGetErrorDescriptionA would have different amount of parameters when compile from source.
5
Beginner questions / Re: A File have not the expected content ?
« Last post by John1 on June 10, 2019, 12:42:43 pm »
Hello,

Thanks for your Answer.

The Problem was a Syntax Problem in the case Construct, which I didn't post, due there were no Errors in execution of the Program, which didn't see an obvious Problem. Just the Content of the File was not correct.

Have a good time
John
6
Bug reports / Re: ***Process Returned -1***
« Last post by jj2007 on June 03, 2019, 06:27:54 pm »
Your program returns 0. Compile and test:
Code: [Select]
C_HelloWorldCon.exe & if errorlevel 0 echo NULL
7
General discussions / Redistribute Pelles C
« Last post by JacentyK on June 03, 2019, 02:06:30 pm »
Hi

I'm developer st in xHarbour/Harbour (old Clipper language). I must, for my client, change of her project written in CA-Clipper (and very old xHarbour). My client isn't programmer and not have software development company, but is owner copyright for the all project.

I try compiler Pelles C and after rebuild project with newest xHarbour, and Pelles C version 8.00, the project works fine.

Can I legally create portable package with environment to compile and rebuild a software project (copy files or install to selected directory) , in this package will be included: Pelles C binaries (maybe only command tools and libraries), make (I use gnu make), and xHarbour binaries.

If yes, how I may create ZIP package or Install Package to properly works of command lines tools of Pelles C (paths, environment variables, registers entries)?
This package must be very simple to install, and to using (to rebuild project if I'll be absent). For me and my client, the best solution would be the structure of directories and files:
%DISK%\xHarbEnv\xHarbour ...
%DISK%\xHarbEnv\PellesC ...
%DISK%\xHarbEnv\make


Regards
Jacek
8
Beginner questions / Re: A File have not the expected content ?
« Last post by John1 on June 03, 2019, 10:23:06 am »
Hello TimoVJL,

Strange I can't find errors in the code.
Maybe I missunderstand something.

Code: [Select]
void addNewElement(void) {
 FILE *fp;
 char nVal[BUF];
 
 if(fgets(nVal,BUF,stdin) == NULL) {
  printf("Wrong Input\n");
 }
 
 dump_buffer(stdin);
 killNL(nVal);

 fp = fopen(DATAFILE,"a+b");
 
 if(fp == NULL) {
  printf("Error in open: %s\n", DATAFILE);
  exit(EXIT_FAILURE);
 }
 //for (int i = 0; i < sizeof (nVal) / sizeof(nVal); i++) {
  //fprintf(fp, "%s", nVal[i]);
 //}
 //if(fwrite(&nVal, sizeof(nVal), 1, fp) != 1) {
  //fprintf(stderr, "Error in writing in %s\n", DATAFILE);
  //fclose(fp);
  //return;
 //}
 fprintf(fp, "%s\n", nVal);
 fclose(fp);
}

void dump_buffer(FILE *fp) {
 int ch;
 while((ch = fgetc(fp)) != EOF && ch != '\n'){}
}

void killNL(char *str) {
 size_t p = strlen(str);
 if(str[p-1] == '\n') {
  str[p-1] = '\0';
 }
}
9
Beginner questions / Re: A File have not the expected content ?
« Last post by TimoVJL on June 03, 2019, 08:45:42 am »
check errors in your code, try to delete file before running the program
Code: [Select]
#include <stdio.h>

#define DATAFILE "test.txt"

int __cdecl main(int argc, char **argv)
{
FILE *fp;
fp = fopen(DATAFILE,"w+"); // "w+" Truncate to zero length or create text file for update.
if (fp) {
fprintf(fp, "%s\n", "row1");
fprintf(fp, "%s\n", "row2");
fclose(fp);
}
return 0;
}
10
Bug reports / ***Process Returned -1***
« Last post by bcarrizo2018 on June 03, 2019, 06:59:03 am »
I'm new in Pelles C and trying to learn more about the C language, but when I try to execute any project (even the "hello world" project) it prints ***Process Returned -1***
I want to know if it's my computer or a DLL that's corrupted or missing, idk. I just downloaded the Pelles C in this PC.

#include <stdio.h>

int main(int argc, char *argv[])
{
    printf("Hello, world!\n");
    return 0;
}
(Just to let you know that there's nothing bad with the project itself)
Pages: [1] 2 3 ... 10