none
Incomplete install? Message and now build errors RRS feed

  • Question

  • Hello,

    After some time away I have again installed the trial version to see if CE is right for us.  I previously had a device driver written (DLL subproject) along with a basic Subproject application to test out the driver.  I am trying to build those and just recreate what I had before.

    First, after going through the installs, when I open the project in VS 2005 I get this message:

    "The project consists entirely of configurations that require support for platforms which are not installed on this machine.  The project cannot be loaded."

    However, it seems like the project opens just fine since the source files are there and it makes an attempt to build them.  Can I safely ignore this?

     

    Secondly, I now have a build error with some variables and I didn't have this error last time I used PB.

    // This is an example of an exported variable
    DeviceDriver1_API int nDeviceDriver1=0;
    
    // This is an example of an exported function.
    DeviceDriver1_API int fnDeviceDriver1(void)
    {
      return 42;
    }
    

    and the errors are

    error C2491: 'nDeviceDriver1' : definition of dllimport data not allowed
    
    error C2491: 'fnDeviceDriver1' : definition of dllimport function not allowed

    Now one change I made was previously the file had been named DeviceDriver1.cpp and now it is called Driver.cpp.  So I tried changing the declaration to

    // This is an example of an exported variable
    Driver_API int nDeviceDriver1=0;
    
    // This is an example of an exported function.
    Driver_API int fnDeviceDriver1(void)
    {
      return 42;
    }
    

    but now I get errors:

    error C2144: syntax error : 'int' should be preceded by ';'
    warning C4273: 'nDeviceDriver1' : inconsistent dll linkage
    
    error C2144: syntax error : 'int' should be preceded by ';'
    error C2086: 'int Driver_API' : redefinition
    warning C4273: 'fnDeviceDriver1' : inconsistent dll linkage
    

    Please help.  Thanks.

    Friday, April 8, 2011 3:07 PM

All replies

  • The first error is becuase you don't have the BSP for your project, or you don't have the catalog file (pbcxml).

    The second error has something to do with how you have defined DeviceDriver1_API.  I suspect that you have a macro which switches the definition.

    The last error are becuase you shouldn't have made the code changes.


    Bruce Eitman (eMVP)
    Senior Engineer
    Bruce.Eitman AT Eurotech DOT com
    My BLOG http://geekswithblogs.net/bruceeitman

    Eurotech Inc.
    www.Eurotech.com
    Friday, April 8, 2011 3:21 PM
    Moderator
  • The first error is becuase you don't have the BSP for your project, or you don't have the catalog file (pbcxml).

    The second error has something to do with how you have defined DeviceDriver1_API.  I suspect that you have a macro which switches the definition.

    The last error are becuase you shouldn't have made the code changes.


    Bruce Eitman (eMVP)
    Senior Engineer
    Bruce.Eitman AT Eurotech DOT com
    My BLOG http://geekswithblogs.net/bruceeitman

    Eurotech Inc.
    www.Eurotech.com


    Thank you for the help.

    Re: First Error.  I backed up all of C:\WinCE600 before I did the reinstall.  Can I just search through that backup for the files I need?  Or will this require a reinstall?

    Re: Errors 2 and 3:  I will undo the code changes (I thought it might matter to have the file named the same way, and since file was "Driver" and not "DeviceDriver1" that is why I changed).  Also, I looked in the header file and saw this (DeviceDriver1.h):

    // The following ifdef block is the standard way of creating 
    // macros which make exporting from a DLL simpler. All files 
    // within this DLL are compiled with the DeviceDriver1_EXPORTS
    // symbol defined on the command line. this symbol should not be
    // defined on any project that uses this DLL. This way any other 
    // project whose source files include this file see 
    // DeviceDriver1_API functions as being imported from a DLL, 
    // wheras this DLL sees symbols defined with this macro as being
    // exported.
    #ifdef DeviceDriver1_EXPORTS
    #define DeviceDriver1_API __declspec(dllexport)
    #else
    #define DeviceDriver1_API __declspec(dllimport)
    #endif
    
    // This class is exported from the DeviceDriver1.dll
    class DeviceDriver1_API CDeviceDriver1 {
    public:
      CDeviceDriver1(void);
      // TODO: add your methods here.
    };
    
    extern DeviceDriver1_API int nDeviceDriver1;
    
    DeviceDriver1_API int fnDeviceDriver1(void);
    
    
    

    I'm pretty sure this worked before.  Could it be related to #1?

    Friday, April 8, 2011 3:42 PM
  • #1 - yes you can copy the BSP that you were using from your back up of the Platform folder.

    #2/3 - you no longer have DeviceDriver1_API defined, which you must have defined somewhere before.


    Bruce Eitman (eMVP)
    Senior Engineer
    Bruce.Eitman AT Eurotech DOT com
    My BLOG http://geekswithblogs.net/bruceeitman

    Eurotech Inc.
    www.Eurotech.com
    Friday, April 8, 2011 6:28 PM
    Moderator
  • Thanks again for the reply.

     

    #1.  I copied the backup of WINCE600\PLATFORM over to the new install, C:\WINCE600\PLATFORM but I still get the same message.  I also copied over the backup of the SDK folder, and again, same message.  Is there something else to copy over?  Or can I just ignore this error?

     

    #2/3.  Doesn't the #if/else block in that header file I pasted cause DeviceDriver1_API to be defined?  It appears to be #defining it as either declspec(dllexport) or declspec(dllimport), right?

     

    Thanks,

     

     

    Jeff

    Monday, April 11, 2011 1:21 PM
  • #1 you need to fix that error

    #2 Yes, but you don't want it to be either of them, you want it to be dllexport.


    Bruce Eitman (eMVP)
    Senior Engineer
    Bruce.Eitman AT Eurotech DOT com
    My BLOG http://geekswithblogs.net/bruceeitman

    Eurotech Inc.
    www.Eurotech.com
    Monday, April 11, 2011 1:29 PM
    Moderator
  • #1 - does the BSP that you are using have a Catalog subfolder? and is there a PBCXML file in it?
    Bruce Eitman (eMVP)
    Senior Engineer
    Bruce.Eitman AT Eurotech DOT com
    My BLOG http://geekswithblogs.net/bruceeitman

    Eurotech Inc.
    www.Eurotech.com
    Monday, April 11, 2011 1:34 PM
    Moderator
  • #1 - does the BSP that you are using have a Catalog subfolder? and is there a PBCXML file in it?
    Bruce Eitman (eMVP)
    Senior Engineer
    Bruce.Eitman AT Eurotech DOT com
    My BLOG http://geekswithblogs.net/bruceeitman

    Eurotech Inc.
    www.Eurotech.com


    I thought I was using the x86 BSP.  When I searched the C:\WinCE600 folder for .PBCXML files, there were a bunch of "things" (BSPs?) in C:\WinCE600\PLATFORM\ that had Catalog subfolders containing a .PBCXML file:

    • ARUBABOARD
    • CEPC (is this the x86?)
    • DEVICEEMULATOR
    • H4SAMPLE
    • MAINSTONEIII
    • T5530

    There was also more stuff in the C:\WinCE600\PUBLIC folder that had .PBCXML files.  Does it help if I tell you what those are?

    Perhaps I don't have the x86 BSP installed?  But I am using the PLATFORM folder from the backup copy I made last year when things worked, so it should be there?

    Monday, April 11, 2011 2:03 PM
  • CEPC is an x86 BSP, yes.   Is it the one that you are using, I don't know.

    Close Visual Studio and reopen it, then open your project again.   See if that changes anything.

    Is it possible that when you installed that you did not install support for x86?  Let me answer that, yes it is possible, and more so, it is likely.


    Bruce Eitman (eMVP)
    Senior Engineer
    Bruce.Eitman AT Eurotech DOT com
    My BLOG http://geekswithblogs.net/bruceeitman

    Eurotech Inc.
    www.Eurotech.com
    Monday, April 11, 2011 2:24 PM
    Moderator
  • I hope it is the one I am using.  How would I know for sure?

     

    Closing/opening didn't help, so I'll work on the thought that x86 support wasn't installed.  I am pretty sure that when I used the CE6 dvd that I included support for everything.  Does VS2005 have an install setting for BSPs as well, or should I just look at the CE installs?

    Monday, April 11, 2011 2:32 PM
  • Just for the record, in case anyone else sees the same error, I didn't really have to fix #1.  That message still comes up when I open a project, but the project runs properly and I get the expected behavior, so it appears like it can be ignored.
    Tuesday, April 19, 2011 2:41 PM
  • While you can ignore it, it is a sign that something is wrong with your build environment - so I wouldn't ignore it.
    Bruce Eitman (eMVP)
    Senior Engineer
    Bruce.Eitman AT Eurotech DOT com
    My BLOG http://geekswithblogs.net/bruceeitman

    Eurotech Inc.
    www.Eurotech.com
    Tuesday, April 19, 2011 3:09 PM
    Moderator
  • I'm a newbie with Platform Builder, but would it not work to open a Release Build Cmd window from Visual Studio, and then look to see what folder FLATRELEASEDIR pointed to?
    email me: D HART (remove the space after the D) AT OICO dot COM
    Tuesday, April 19, 2011 9:00 PM
  • Yes.
    Bruce Eitman (eMVP)
    Senior Engineer
    Bruce.Eitman AT Eurotech DOT com
    My BLOG http://geekswithblogs.net/bruceeitman

    Eurotech Inc.
    www.Eurotech.com
    Wednesday, April 20, 2011 2:50 PM
    Moderator