about afxres.h
Hi,
I was following the tutorial of Edge installation for windows desktop. I am using Visual C++ express edition 2005. Everything went fine but when i build it the following error arised
Cannot find file afxres.h
I included the afxres.h containing the 3 lines code in the solution. But then another error arised
fatal error RC1015: cannot open include file 'windows.h'
I tried to include windows.h in many ways. I am builing the application in Edge Ide for windows desktop (vc2005). There are many windows.h files in my PC and I tried with all but still the error is persistent. Can you tell me what really the problem is and how to solve it??
Thank you
ravi
Hi Ravi,
I think the error is caused by the resource file of your project. Edit your resource script (probably resource.rc) with a text editor (like notepad) and replace all occurences of 'afxres.h' with 'winres.h'. There should be 2 of them.
After making the change, save the file and try to rebuild.
Hi,
I now am trying it for Visual C++ 6.0. I followed all the steps in the tutorial and when I compile or build it many errors are arising.
c:\program files\microsoft platform sdk for windows xp sp2\include\bthdef.h(38) : error C2065: 'GUID_BTHPORT_DEVICE_INTERFACE' : undeclared identifier
c:\program files\microsoft platform sdk for windows xp sp2\include\bthdef.h(38) : error C2501: 'DEFINE_GUID' : missing storage-class or type specifiers
c:\program files\microsoft platform sdk for windows xp sp2\include\bthdef.h(38) : error C2078: too many initializers
c:\program files\microsoft platform sdk for windows xp sp2\include\bthdef.h(41) : error C2065: 'GUID_BLUETOOTH_RADIO_IN_RANGE' : undeclared identifier
c:\program files\microsoft platform sdk for windows xp sp2\include\bthdef.h(41) : error C2501: 'DEFINE_GUID' : missing storage-class or type specifiers
c:\program files\microsoft platform sdk for windows xp sp2\include\bthdef.h(41) : error C2374: 'DEFINE_GUID' : redefinition; multiple initialization
c:\program files\microsoft platform sdk for windows xp sp2\include\bthdef.h(38) : see declaration of 'DEFINE_GUID'
c:\program files\microsoft platform sdk for windows xp sp2\include\bthdef.h(41) : error C2078: too many initializers
c:\program files\microsoft platform sdk for windows xp sp2\include\bthdef.h(44) : error C2065: 'GUID_BLUETOOTH_RADIO_OUT_OF_RANGE' : undeclared identifier
c:\program files\microsoft platform sdk for windows xp sp2\include\bthdef.h(44) : error C2501: 'DEFINE_GUID' : missing storage-class or type specifiers
c:\program files\microsoft platform sdk for windows xp sp2\include\bthdef.h(44) : error C2374: 'DEFINE_GUID' : redefinition; multiple initialization
c:\program files\microsoft platform sdk for windows xp sp2\include\bthdef.h(38) : see declaration of 'DEFINE_GUID'
c:\program files\microsoft platform sdk for windows xp sp2\include\bthdef.h(44) : error C2078: too many initializers
c:\program files\microsoft platform sdk for windows xp sp2\include\bthdef.h(47) : error C2065: 'GUID_BLUETOOTH_PIN_REQUEST' : undeclared identifier
c:\program files\microsoft platform sdk for windows xp sp2\include\bthdef.h(47) : error C2501: 'DEFINE_GUID' : missing storage-class or type specifiers
c:\program files\microsoft platform sdk for windows xp sp2\include\bthdef.h(47) : error C2374: 'DEFINE_GUID' : redefinition; multiple initialization
c:\program files\microsoft platform sdk for windows xp sp2\include\bthdef.h(38) : see declaration of 'DEFINE_GUID'
c:\program files\microsoft platform sdk for windows xp sp2\include\bthdef.h(47) : error C2078: too many initializers
c:\program files\microsoft platform sdk for windows xp sp2\include\bthdef.h(50) : error C2065: 'GUID_BLUETOOTH_L2CAP_EVENT' : undeclared identifier
c:\program files\microsoft platform sdk for windows xp sp2\include\bthdef.h(50) : error C2501: 'DEFINE_GUID' : missing storage-class or type specifiers
c:\program files\microsoft platform sdk for windows xp sp2\include\bthdef.h(50) : error C2374: 'DEFINE_GUID' : redefinition; multiple initialization
c:\program files\microsoft platform sdk for windows xp sp2\include\bthdef.h(38) : see declaration of 'DEFINE_GUID'
c:\program files\microsoft platform sdk for windows xp sp2\include\bthdef.h(50) : error C2078: too many initializers
c:\program files\microsoft platform sdk for windows xp sp2\include\bthdef.h(53) : error C2065: 'GUID_BLUETOOTH_HCI_EVENT' : undeclared identifier
c:\program files\microsoft platform sdk for windows xp sp2\include\bthdef.h(53) : error C2501: 'DEFINE_GUID' : missing storage-class or type specifiers
c:\program files\microsoft platform sdk for windows xp sp2\include\bthdef.h(53) : error C2374: 'DEFINE_GUID' : redefinition; multiple initialization
c:\program files\microsoft platform sdk for windows xp sp2\include\bthdef.h(38) : see declaration of 'DEFINE_GUID'
c:\program files\microsoft platform sdk for windows xp sp2\include\bthdef.h(53) : error C2078: too many initializers
c:\program files\microsoft platform sdk for windows xp sp2\include\bthdef.h(58) : error C2065: 'Bluetooth_Base_UUID' : undeclared identifier
c:\program files\microsoft platform sdk for windows xp sp2\include\bthdef.h(58) : error C2501: 'DEFINE_GUID' : missing storage-class or type specifiers
c:\program files\microsoft platform sdk for windows xp sp2\include\bthdef.h(58) : error C2374: 'DEFINE_GUID' : redefinition; multiple initialization
c:\program files\microsoft platform sdk for windows xp sp2\include\bthdef.h(38) : see declaration of 'DEFINE_GUID'
c:\program files\microsoft platform sdk for windows xp sp2\include\bthdef.h(58) : error C2078: too many initializers
c:\program files\microsoft platform sdk for windows xp sp2\include\bthdef.h(64) : error C2065: 'SDP_PROTOCOL_UUID' : undeclared identifier
c:\program files\microsoft platform sdk for windows xp sp2\include\bthdef.h(64) : error C2501: 'DEFINE_GUID' : missing storage-class or type specifiers
c:\program files\microsoft platform sdk for windows xp sp2\include\bthdef.h(64) : error C2374: 'DEFINE_GUID' : redefinition; multiple initialization
c:\program files\microsoft platform sdk for windows xp sp2\include\bthdef.h(38) : see declaration of 'DEFINE_GUID'
c:\program files\microsoft platform sdk for windows xp sp2\include\bthdef.h(64) : error C2078: too many initializers
c:\program files\microsoft platform sdk for windows xp sp2\include\bthdef.h(65) : error C2065: 'UDP_PROTOCOL_UUID' : undeclared identifier
c:\program files\microsoft platform sdk for windows xp sp2\include\bthdef.h(65) : error C2501: 'DEFINE_GUID' : missing storage-class or type specifiers
c:\program files\microsoft platform sdk for windows xp sp2\include\bthdef.h(65) : error C2374: 'DEFINE_GUID' : redefinition; multiple initialization
c:\program files\microsoft platform sdk for windows xp sp2\include\bthdef.h(38) : see declaration of 'DEFINE_GUID'
c:\program files\microsoft platform sdk for windows xp sp2\include\bthdef.h(65) : error C2078: too many initializers
c:\program files\microsoft platform sdk for windows xp sp2\include\bthdef.h(66) : error C2065: 'RFCOMM_PROTOCOL_UUID' : undeclared identifier
c:\program files\microsoft platform sdk for windows xp sp2\include\bthdef.h(66) : error C2501: 'DEFINE_GUID' : missing storage-class or type specifiers
c:\program files\microsoft platform sdk for windows xp sp2\include\bthdef.h(66) : error C2374: 'DEFINE_GUID' : redefinition; multiple initialization
c:\program files\microsoft platform sdk for windows xp sp2\include\bthdef.h(38) : see declaration of 'DEFINE_GUID'
c:\program files\microsoft platform sdk for windows xp sp2\include\bthdef.h(66) : error C2078: too many initializers
c:\program files\microsoft platform sdk for windows xp sp2\include\bthdef.h(67) : error C2065: 'TCP_PROTOCOL_UUID' : undeclared identifier
c:\program files\microsoft platform sdk for windows xp sp2\include\bthdef.h(67) : error C2501: 'DEFINE_GUID' : missing storage-class or type specifiers
c:\program files\microsoft platform sdk for windows xp sp2\include\bthdef.h(67) : error C2374: 'DEFINE_GUID' : redefinition; multiple initialization
c:\program files\microsoft platform sdk for windows xp sp2\include\bthdef.h(38) : see declaration of 'DEFINE_GUID'
c:\program files\microsoft platform sdk for windows xp sp2\include\bthdef.h(67) : error C2078: too many initializers
c:\program files\microsoft platform sdk for windows xp sp2\include\bthdef.h(68) : error C2065: 'TCSBIN_PROTOCOL_UUID' : undeclared identifier
c:\program files\microsoft platform sdk for windows xp sp2\include\bthdef.h(68) : error C2501: 'DEFINE_GUID' : missing storage-class or type specifiers
c:\program files\microsoft platform sdk for windows xp sp2\include\bthdef.h(68) : error C2374: 'DEFINE_GUID' : redefinition; multiple initialization
c:\program files\microsoft platform sdk for windows xp sp2\include\bthdef.h(38) : see declaration of 'DEFINE_GUID'
c:\program files\microsoft platform sdk for windows xp sp2\include\bthdef.h(68) : error C2078: too many initializers
c:\program files\microsoft platform sdk for windows xp sp2\include\bthdef.h(69) : error C2065: 'TCSAT_PROTOCOL_UUID' : undeclared identifier
c:\program files\microsoft platform sdk for windows xp sp2\include\bthdef.h(69) : error C2501: 'DEFINE_GUID' : missing storage-class or type specifiers
c:\program files\microsoft platform sdk for windows xp sp2\include\bthdef.h(69) : error C2374: 'DEFINE_GUID' : redefinition; multiple initialization
c:\program files\microsoft platform sdk for windows xp sp2\include\bthdef.h(38) : see declaration of 'DEFINE_GUID'
c:\program files\microsoft platform sdk for windows xp sp2\include\bthdef.h(69) : error C2078: too many initializers
c:\program files\microsoft platform sdk for windows xp sp2\include\bthdef.h(70) : error C2065: 'OBEX_PROTOCOL_UUID' : undeclared identifier
c:\program files\microsoft platform sdk for windows xp sp2\include\bthdef.h(70) : error C2501: 'DEFINE_GUID' : missing storage-class or type specifiers
c:\program files\microsoft platform sdk for windows xp sp2\include\bthdef.h(70) : error C2374: 'DEFINE_GUID' : redefinition; multiple initialization
c:\program files\microsoft platform sdk for windows xp sp2\include\bthdef.h(38) : see declaration of 'DEFINE_GUID'
c:\program files\microsoft platform sdk for windows xp sp2\include\bthdef.h(70) : error C2078: too many initializers
c:\program files\microsoft platform sdk for windows xp sp2\include\bthdef.h(71) : error C2065: 'IP_PROTOCOL_UUID' : undeclared identifier
c:\program files\microsoft platform sdk for windows xp sp2\include\bthdef.h(71) : error C2501: 'DEFINE_GUID' : missing storage-class or type specifiers
c:\program files\microsoft platform sdk for windows xp sp2\include\bthdef.h(71) : error C2374: 'DEFINE_GUID' : redefinition; multiple initialization
c:\program files\microsoft platform sdk for windows xp sp2\include\bthdef.h(38) : see declaration of 'DEFINE_GUID'
c:\program files\microsoft platform sdk for windows xp sp2\include\bthdef.h(71) : error C2078: too many initializers
c:\program files\microsoft platform sdk for windows xp sp2\include\bthdef.h(72) : error C2065: 'FTP_PROTOCOL_UUID' : undeclared identifier
c:\program files\microsoft platform sdk for windows xp sp2\include\bthdef.h(72) : error C2501: 'DEFINE_GUID' : missing storage-class or type specifiers
c:\program files\microsoft platform sdk for windows xp sp2\include\bthdef.h(72) : error C2374: 'DEFINE_GUID' : redefinition; multiple initialization
c:\program files\microsoft platform sdk for windows xp sp2\include\bthdef.h(38) : see declaration of 'DEFINE_GUID'
c:\program files\microsoft platform sdk for windows xp sp2\include\bthdef.h(72) : error C2078: too many initializers
c:\program files\microsoft platform sdk for windows xp sp2\include\bthdef.h(73) : error C2065: 'HTTP_PROTOCOL_UUID' : undeclared identifier
c:\program files\microsoft platform sdk for windows xp sp2\include\bthdef.h(73) : error C2501: 'DEFINE_GUID' : missing storage-class or type specifiers
c:\program files\microsoft platform sdk for windows xp sp2\include\bthdef.h(73) : error C2374: 'DEFINE_GUID' : redefinition; multiple initialization
c:\program files\microsoft platform sdk for windows xp sp2\include\bthdef.h(38) : see declaration of 'DEFINE_GUID'
c:\program files\microsoft platform sdk for windows xp sp2\include\bthdef.h(73) : error C2078: too many initializers
c:\program files\microsoft platform sdk for windows xp sp2\include\bthdef.h(74) : error C2065: 'WSP_PROTOCOL_UUID' : undeclared identifier
c:\program files\microsoft platform sdk for windows xp sp2\include\bthdef.h(74) : error C2501: 'DEFINE_GUID' : missing storage-class or type specifiers
c:\program files\microsoft platform sdk for windows xp sp2\include\bthdef.h(74) : error C2374: 'DEFINE_GUID' : redefinition; multiple initialization
c:\program files\microsoft platform sdk for windows xp sp2\include\bthdef.h(38) : see declaration of 'DEFINE_GUID'
c:\program files\microsoft platform sdk for windows xp sp2\include\bthdef.h(74) : error C2078: too many initializers
c:\program files\microsoft platform sdk for windows xp sp2\include\bthdef.h(75) : error C2065: 'BNEP_PROTOCOL_UUID' : undeclared identifier
c:\program files\microsoft platform sdk for windows xp sp2\include\bthdef.h(75) : error C2501: 'DEFINE_GUID' : missing storage-class or type specifiers
c:\program files\microsoft platform sdk for windows xp sp2\include\bthdef.h(75) : error C2374: 'DEFINE_GUID' : redefinition; multiple initialization
c:\program files\microsoft platform sdk for windows xp sp2\include\bthdef.h(38) : see declaration of 'DEFINE_GUID'
c:\program files\microsoft platform sdk for windows xp sp2\include\bthdef.h(75) : error C2078: too many initializers
c:\program files\microsoft platform sdk for windows xp sp2\include\bthdef.h(76) : error C2065: 'UPNP_PROTOCOL_UUID' : undeclared identifier
c:\program files\microsoft platform sdk for windows xp sp2\include\bthdef.h(76) : error C2501: 'DEFINE_GUID' : missing storage-class or type specifiers
c:\program files\microsoft platform sdk for windows xp sp2\include\bthdef.h(76) : error C2374: 'DEFINE_GUID' : redefinition; multiple initialization
c:\program files\microsoft platform sdk for windows xp sp2\include\bthdef.h(38) : see declaration of 'DEFINE_GUID'
c:\program files\microsoft platform sdk for windows xp sp2\include\bthdef.h(76) : error C2078: too many initializers
c:\program files\microsoft platform sdk for windows xp sp2\include\bthdef.h(77) : error C2065: 'HID_PROTOCOL_UUID' : undeclared identifier
c:\program files\microsoft platform sdk for windows xp sp2\include\bthdef.h(77) : error C2501: 'DEFINE_GUID' : missing storage-class or type specifiers
c:\program files\microsoft platform sdk for windows xp sp2\include\bthdef.h(77) : error C2374: 'DEFINE_GUID' : redefinition; multiple initialization
c:\program files\microsoft platform sdk for windows xp sp2\include\bthdef.h(38) : see declaration of 'DEFINE_GUID'
c:\program files\microsoft platform sdk for windows xp sp2\include\bthdef.h(77) : error C2078: too many initializers
c:\program files\microsoft platform sdk for windows xp sp2\include\bthdef.h(78) : error C2065: 'HCCC_PROTOCOL_UUID' : undeclared identifier
c:\program files\microsoft platform sdk for windows xp sp2\include\bthdef.h(78) : error C2501: 'DEFINE_GUID' : missing storage-class or type specifiers
c:\program files\microsoft platform sdk for windows xp sp2\include\bthdef.h(78) : error C2374: 'DEFINE_GUID' : redefinition; multiple initialization
c:\program files\microsoft platform sdk for windows xp sp2\include\bthdef.h(38) : see declaration of 'DEFINE_GUID'
c:\program files\microsoft platform sdk for windows xp sp2\include\bthdef.h(78) : error C2078: too many initializers
c:\program files\microsoft platform sdk for windows xp sp2\include\bthdef.h(79) : error C2065: 'HCDC_PROTOCOL_UUID' : undeclared identifier
c:\program files\microsoft platform sdk for windows xp sp2\include\bthdef.h(79) : error C2501: 'DEFINE_GUID' : missing storage-class or type specifiers
c:\program files\microsoft platform sdk for windows xp sp2\include\bthdef.h(79) : error C2374: 'DEFINE_GUID' : redefinition; multiple initialization
c:\program files\microsoft platform sdk for windows xp sp2\include\bthdef.h(38) : see declaration of 'DEFINE_GUID'
c:\program files\microsoft platform sdk for windows xp sp2\include\bthdef.h(79) : error C2078: too many initializers
c:\program files\microsoft platform sdk for windows xp sp2\include\bthdef.h(80) : error C2065: 'HN_PROTOCOL_UUID' : undeclared identifier
c:\program files\microsoft platform sdk for windows xp sp2\include\bthdef.h(80) : error C2501: 'DEFINE_GUID' : missing storage-class or type specifiers
c:\program files\microsoft platform sdk for windows xp sp2\include\bthdef.h(80) : error C2374: 'DEFINE_GUID' : redefinition; multiple initialization
c:\program files\microsoft platform sdk for windows xp sp2\include\bthdef.h(38) : see declaration of 'DEFINE_GUID'
c:\program files\microsoft platform sdk for windows xp sp2\include\bthdef.h(80) : error C2078: too many initializers
c:\program files\microsoft platform sdk for windows xp sp2\include\bthdef.h(81) : error C2065: 'AVCTP_PROTOCOL_UUID' : undeclared identifier
c:\program files\microsoft platform sdk for windows xp sp2\include\bthdef.h(81) : error C2501: 'DEFINE_GUID' : missing storage-class or type specifiers
c:\program files\microsoft platform sdk for windows xp sp2\include\bthdef.h(81) : error C2374: 'DEFINE_GUID' : redefinition; multiple initialization
c:\program files\microsoft platform sdk for windows xp sp2\include\bthdef.h(38) : see declaration of 'DEFINE_GUID'
c:\program files\microsoft platform sdk for windows xp sp2\include\bthdef.h(81) : error C2078: too many initializers
c:\program files\microsoft platform sdk for windows xp sp2\include\bthdef.h(82) : error C2065: 'AVDTP_PROTOCOL_UUID' : undeclared identifier
c:\program files\microsoft platform sdk for windows xp sp2\include\bthdef.h(82) : error C2501: 'DEFINE_GUID' : missing storage-class or type specifiers
c:\program files\microsoft platform sdk for windows xp sp2\include\bthdef.h(82) : fatal error C1003: error count exceeds 100; stopping compilation
Error executing cl.exe.
helloworldtry.obj - 102 error(s), 0 warning(s)
All these errors pertain to the same header file bthdef.h. I do not know what the error is. Can you please tell me what the problem is?? Am I doing anything wrong?? It will be helpful if you can tell me about this.
Thank you,
ravi
Hi Ravi,
The errors may be caused by the order of which the Visual C++ environment scans for header files.
You can adjust this order in tools -> options and click on the 'directories tab'. We recommend putting the Windows XP platform SDK at the top of the list.
Hi,
Thank you very much for the reply.
ravi.
edge wrote:Hi Ravi,
I think the error is caused by the resource file of your project. Edit your resource script (probably resource.rc) with a text editor (like notepad) and replace all occurences of 'afxres.h' with 'winres.h'. There should be 2 of them.
After making the change, save the file and try to rebuild.
Hello
I have the same problem but with WS Smartphone(2003) I have started the project with Edge IDE and I don't have the file 'resource.rc' So I don't know how I get this error.
I have done a search about where are the ocurrences of 'afxres.h' but I don't get any results.
Do you know what is wrong?
Thanks for your help.
Hi Meiline,
The Edge IDE generates the resource file automatically, and deletes it when the build is complete (or when it has failed).
You can modify the template file to use winres.h instead of afxres.h. Go to your Edge IDE installation folder (probably: C:\projects\Edge\tools\EdgeIde) and open the 'templates' folder. You can open the file win32rc.ini and replace 'afxres.h' with 'winres.h'.
Let me know if it fixed the problem.
Hello Edge,
Thank you very much. It fixed the problem.

Hi Edge,
I'm having the same problem while trying to build the actual sample code provided for the multiplatform Hello World app. I'm building for WM Pocket PC 2005, but I haven't got the Vista SDK installed. I don't think it should matter, but it might. Here is the error I get:
C:\projects\helloworld_multiplatform\workspace_eide\resource.rc(4) : fatal error RC1015: cannot open include file 'afxres.h'.
Changing the templates only caused it to say it couldn't find winres.h instead.
Any ideas?
Thanks,
reQunix
Hi reQunix,
Can you tell me which version of Visual Studio 2005 you've installed? Also, can you try a search to see if you have the winres.h header file (it's probably located somewhere in C:\Program Files\Microsoft Visual Studio 8 )?
Also, are you able to build the helloworld executable using the project located in samples\helloworld\workspace_ppc2005?
Hi edge,
I've got Visual Studio 2005 Professional installed on Windows Vista, with Service Pack 1 and some updates.
No, I don't have the winres.h file anywhere, I suppose that is becuase I don't have a Platform SDK installed.
I can build the workspace_ppc2005 solution from Visual Studio (I have the Windows Mobile 5.0 SDK installed), but from the Edgelib Builder Tool I get a similar error message:
C:\projects\helloworld_multiplatform\workspace_eide\resource.rc(4) : fatal error RC1015: cannot open include file 'afxres.h'.
Thanks for the help.
reQunix
Just an update,
I've installed the Platform SDK for XP SP2 since the Vista Platform SDK failed on all the machines I tried it on.
Still having the same problem. I changed the afxres.h references in some files to winres.h and then to windows.h, but it didn't make a difference. Building in VS works but not in EDGELIB builder tool.
I changed the template file, now it actually looks for a different file but still doesn't find it.
I checked which additional folders are in the include folders list in the builder tool, and there doesn't seem to be any. Shouldn't there perhaps be something in there?
P.S.
I'm also having trouble figuring out where to put files I want to open to create a sprite surface. I've put it everywhere (res folder, release and debug folders, etc.) I've even tried specifying a relative path, but nothing works. The CreateSurface call is returning E_ERROR but I copied it from another sample so it should work. I suspect once I build with the builder it will work, hence the need to sort out the problem above.
Thanks,
reQunix
Hi ReQunix,
There should be an afxres.h or winres.h header file present inside your Visual Studio installation folder. Could you please open the resource.rc file inside the Pocket PC 2005 workspace (for Visual Studio 2005) and see if it includes this file as well?
The EDGELIB builder tool calls the Visual Studio 2005 compiler. The compiler then reads its own directory list (configured by the Visual Studio environment) and the given extra include paths in your EDGELIB project file. There should be no need to specify the path to the afxres.h header file.
When loading surfaces (and other files), you need to place the file where the executable file is. If you're using the emulator, you need to upload it to the emulator as well (the same goes when testing on a device). When building for Windows desktop, you can place the file inside the release folder.
Thanks edge
OK, I've found afxres.h and winres.h headers all under Visual Studio 8\VC\ce\atlmfc\include (amongst one or two other folders).
Should I now add this path to the project as well? I wasn't aware that these were ATL/MFC specific projects.
I did put the images in the Debug, Release and the folder where the program is running on the phone. All without success. I was thinking of trying packages but I need to get it to build first. (I just found the image behind the evaluation slider half-off the screen. I'll see if I can get it to work on the machine as well.)
I'll try some things, see what I come up with. Let me know if there's any help you can give.
Thanks again,
reQunix
It's odd that the afxres.h or winres.h header files are needed to build the resource file. I can tell for sure that EDGELIB isn't using any ATL or MFC objects in its source code. Maybe you can try to copy these header files into your workspace folder, and see if it works.
To fix the problem with the images, it may be a good idea to install a .CAB file of an existing EDGELIB sample and check where the files are installed and how these are loaded in the source code of the sample.
Another problem might be that your images aren't supported by any of the EDGELIB loaders. I recommend also trying to load an image file from the samples and check the return value.
The type of application I'm trying to make will have mostly content so I'll probably end up using packages.
I came right with the images. I'm not entirely sure why it wasn't showing before but I've got it to load GIFs from files.
On the build issue, I've found that the PlatformSDK installed with Visual C++ does not have some of the files required (like WS2bth.h), but I fixed this by adding the include folder from the XP SP2 Platform SDK folder in the general Visual Studio options under C++. This now allows VS2005 to build and run the app on my PC (with some bugs, but that's app specific).
I tried building with the EDGELIB builder tool and I still get the error that it can't find afxres.h (for both WinDesktop and WinMobile builds).
I can try adding the include folders in the builder, but aside from that, I'm afraid I'm not too sure what else to try.
Hi reQunix,
We've made a new template file and removed all references to afxres.h. Could you try the attached file and see if you can build with the EDGELIB builder?
Copy and overwrite the file inside the templates folder of the EDGELIB builder.
Hi,
Thanks for all the effort. This is quite confusing. Anyway, I've used the template you provided and it has made some progress. This is the output the builder gives now.
---------------- Building: sandbox - Windows desktop (vc 2005) Release ----------------
sandbox.ico
sandbox.res
sandbox.cpp
C:\Program Files\Microsoft Platform SDK for Windows XP SP2\include\windows.h(157) : fatal error C1083: Cannot open include file: 'excpt.h': No such file or directory
It used to get to the .res file and fail, now it gets to the .cpp file. It seems to be having problems finding headers that windows.h includes, which is odd.
I've double-checked and there's no excpt.h in that folder but there is one in the c:\Program Files\Microsoft Visual Studio 8\VC\include\ folder. I expected it to find it there since it's included in Visual Studios list of includes.
Just to try something I added that folder in the Edge Builder include list and it built , although it had a LOT of warnings about redefined macros etc.
I tested the executable and it works (after moving the resource files over manually).
I also tried building for WM5. It also gets further but ends with this error:
LINK : fatal error LNK1104: cannot open file 'OLDNAMES.lib'
It doesn't say where it's expecting the file so I'm not sure if it's one of yours or part of the SDK.
Hope you can make some sense of that...
Regards,
reQunix
Hi ReQunix,
It seems that the compiler and linker doesn't use their default include and link paths when running from the command line (it could be a difference between the express, standard and professional versions).
To fix the include paths we recommend editing the ini files in the "Edge Builder/platforms" folder. For the desktop version add the following line to the include list:
incpath = "%vstudiopath%\vc\include"
The warnings may be solved by moving this path to the top of the list.
Regarding oldnames.lib:
This is an error that also seem to occur when making a new native Windows Mobile 5 workspace in Visual Studio 2005 (in the hello world workspace this library is disabled in the project settings). Can you tell me if you have this library installed on your hard drive?
Hi edge...
I did a search through my entire c:\. No file named oldnames.lib
Any idea where it's meant to be or what it comes with. I have the WM5 SDK, XP Platform SDK, DirectX SDK, and probably some others isntalled. I can't really think of much that is missing.
Regards,
reQunix
Hi ReQunix,
With our installation the library came with Visual Studio 2005 and the platform SDK (however, it's not part of the Windows Mobile 5 SDK).
You can disable the library by editing the pocket 2005 platform ini file and adding the following option to the linker section:
/NODEFAULTLIB:"oldnames"
Should I put it in the startlink string, the commandlink string or on a new line?
I recommend modifying the startlink string and place the library to ignore just before the /INCREMENTAL command.
Thanks edge.
That did the trick. Now I have two of the platforms working. Luckily, that's all I need for now.
Keep well,
reQunix
reQunix wrote:Thanks edge.
That did the trick. Now I have two of the platforms working. Luckily, that's all I need for now.
Great. Please keep us posted!
Hi since the template without the afxres is not given above, I managed to compile it with the next algorithm.
1) Find the location of winres, afxres, dlgs.h
2) Add the include directories on the commandresource section of platform ini (in my case Windows Smartphone 2005) using the flag /i "1stdirectory" /i "2nddirectory" etc
- Code:
Example ...
commandresource = "%toolrccompiler% /i "1stdirectory" /I "2nddirectory" etc
3) Add as stated above on the platform ini startlink section /NODEFAULTLIB:"oldnames"
4) Save the files and then open again the Edge Tool, you have to reopen it since otherwise will have the previous settings