NO

Recent Posts

Pages: [1] 2 3 ... 10
1
Beginner questions / Re: exports
« Last post by frankie on April 28, 2017, 12:41:01 PM »
Hi, I want to create lib/dll with exports from already existing c code, so I placed this dll snippet into the code and both functions plusI and plusF are exported fine.
In which code? In the library? or this is a new sample library?

Code: [Select]
BOOL APIENTRY DllMain(HINSTANCE hInstDLL, DWORD fdwReason, LPVOID lpvReserved)
{
    switch (fdwReason)
    {
        case DLL_PROCESS_ATTACH:  break;
        case DLL_THREAD_ATTACH:   break;
        case DLL_THREAD_DETACH:   break;
        case DLL_PROCESS_DETACH:  break;
    }
    return TRUE;
}
__declspec(dllexport) int  __cdecl plusI(int a, int b) {  return a + b;  }

__declspec(dllexport) double  __cdecl plusF(double a, double b) {  return a + b;  }
This is your library?

However when I add __declspec(dllexport) int  ... to any other function from the original code  there is no error but the export in created dll does not exist.  :(
Which original code?
Do you mean that your sample library works and some other code not?

Sorry, but is not clear at all.
Post a sample minimal project that shows the problem.
2
Beginner questions / exports
« Last post by peter2005 on April 27, 2017, 08:49:40 PM »
Hi, I want to create lib/dll with exports from already existing c code, so I placed this dll snippet into the code and both functions plusI and plusF are exported fine.

Code: [Select]
BOOL APIENTRY DllMain(HINSTANCE hInstDLL, DWORD fdwReason, LPVOID lpvReserved)
{
    switch (fdwReason)
    {
        case DLL_PROCESS_ATTACH:  break;
        case DLL_THREAD_ATTACH:   break;
        case DLL_THREAD_DETACH:   break;
        case DLL_PROCESS_DETACH:  break;
    }
    return TRUE;
}

__declspec(dllexport) int  __cdecl plusI(int a, int b) {  return a + b;  }

__declspec(dllexport) double  __cdecl plusF(double a, double b) {  return a + b;  }

However when I add __declspec(dllexport) int  ... to any other function from the original code  there is no error but the export in created dll does not exist.  :(
3
Thanks everyone for the answers. I liked specially of the suggestion from DMac. :) Is it possible to install two or more versions of Pelle's C on the same computer? Or do I need to install it on a virtual machine?
4
Beginner questions / Re: compile in CPP
« Last post by kh_model on April 25, 2017, 11:31:12 PM »
Thank you for your kind efforts and for helping me to understand. I am deeply grateful and I wish you the best!
5
Beginner questions / Re: compile in CPP
« Last post by frankie on April 25, 2017, 04:07:25 PM »
Hello kh_model.
Sorry to delude you, but PellesC is a C compiler, not a C++ compiler. And it will never be...

Said that the good news, your code is not C++, but C code, with some c++ alteration  >:(. Simply changing file extension from .cpp to .c, and fixing the C++ contamination, you'll be able to compile it with PellesC.  ;)
Get the attached project with the correct file.
6
Beginner questions / compile in CPP
« Last post by kh_model on April 24, 2017, 07:41:42 PM »
I am new to Pelles, and I would like to know if there is any way to compile in C++. For example, is there a flag which can be set?

If anyone is interested, I am working with an existing piece of source code which appears to have originally been compiled by its author using Pelles. I base my assumption on the similar style of comments created by the WIN32 dll wizard.
7
General discussion / Re: Curious, why are there two different sub-forums..
« Last post by frankie on April 22, 2017, 04:49:45 PM »
The idea, I guess see here, was to to have a place, this, where discuss about the forum itself (i.e. forum layout, forum netiquette, etc) and the other specific for PellesC compiler discussions.
Many posts were moved to the proper general discussion subforum under PellesC_forum.
In last times while people continued to post technical topics on this forum nobody took care to move them.
I'll do it...

P.S. I removed also the <moved> post, because was a nosense.
8
General discussion / Re: Curious, why are there two different sub-forums..
« Last post by defrancis7 on April 21, 2017, 05:01:46 PM »
I went back and looked after I finished posting my query.  There are not two "Pelles Forum"s but one called "Pelles C Forum" and one called "Pelles C".  Back to my original question though, why does each have a "General Discussion" topic?  Maybe I am dense; but, is not general discussion general discussion?  I have also noticed that the last post, at least when I posted this, was dated 2017 Mar 16.
9
General discussion / Curious, why are there two different sub-forums..
« Last post by defrancis7 on April 21, 2017, 04:56:28 PM »
for the General Discussions category?  Just curious.  I look at the General Discussion category under the first section titled "Pelles Forum" and then the General discussion category under the second "Pelles Forum" section further down the page.  The contents are not always the same.  And, while I am at it; why are there two "Pelles Forum" sections?
10
The pellesc.de main page provides downloads of earlier versions of Pelles C. Years ago I used to support some old win 95 work stations in a lab using Pelles version 4.5.
Pages: [1] 2 3 ... 10