Pelles C forum
Pelles C => General discussions => Topic started by: marzioni on July 24, 2008, 10:45:24 AM
-
hello at all,
i have built a dll with pelles c 5, and i obtain the follow message:
Building contes32.obj.
warning #2024: Empty input file.
Building CONTES32.res.
Building contes32.dll.
Done.
when i perform a double click on the dll file to open with pelles c 5, pelles gives to me the follow message:
Error reading from file 'contes32.dll'.
It's impossible to find the name of resource specified in the image's file.
what is wrong?
thanks in advance, marzioni
-
I suggest, you need to post the project.
John
-
i have attached the project.
marzioni
-
My guess is that you need to define the resource identifiers.
For example
AIUTO BITMAP "res1.bmp"
AIUTO2 BITMAP "res2.bmp"
BOTTOM BITMAP "res3.bmp"
AIUTO has no value associated with it.
Make a header file (.h) that is included in the RC file containing all identifier defines.
e.g.
// start contes32.h
#define AIUTO 1000
#define AIUTO2 1001
#define BOTTOM 1002
//end
You will need to define all resources hopefully with unique identifiers. That is for 'cursors', 'icons', 'bitmaps', 'dialogs', etc.
Include that header file in the RC file like so.
#include "contes32.h"
John
-
i have tried with a little piece of contes32.rc file (see below) and without h file the dll created works fine.
#include <windows.h>
#include <commctrl.h>
#include <richedit.h>
LANGUAGE LANG_ITALIAN,SUBLANG_ITALIAN
AIUTO BITMAP "res1.bmp"
AIUTO2 BITMAP "res2.bmp"
BOTTOM BITMAP "res3.bmp"
-
Ok, well, it seems that the compiler does not like various names.
These for example
PRINT_BLACK
PRINT_PROC
PRINT
MESS_CODICI
And a few more I can't remember.
I have changed various names so that it is ok. See the attached RC file.
You are better off using identifiers, not strings, IMO.
John
-
many thanks John, now works fine.
I have had messages from the compiler with the following bitmap names:
DELETE, HELP, MENU, i have changed the names, and the compiler has not given anymore messages.
now i will use the numeric identifier.
thanks again,
marzioni