Cannot run project unless host application is defined

Hello,

I am a newbie to RAD studio and win32 applications, though I have done some console applications in the past using MS VS. 
To kick off, I created a simple package with a form which displays the date upon hitting Submit. I can successfully Make and Build the package but when I run it I get the classic "Cannot run project unless host application is defined. Use Run|Parameter..." error.

Can somebody please tell me what .exe (host application) should I select? Also I have nothing selected for Parameters, Working Directory, Source Path under Run|Parameter?

Your help much appreciated!

Regards,
KF
0
Pradeep
6/30/2010 5:15:54 PM
embarcadero.cppbuilder.cpp 2803 articles. 0 followers. Follow

6 Replies
3939 Views

Similar Articles

[PageSpeed] 51

<Pradeep Kashyap> wrote in message news:256321@forums.embarcadero.com...

> To kick off, I created a simple package with a form which
> displays the date upon hitting Submit. I can successfully
> Make and Build the package but when I run it I get the
> classic "Cannot run project unless host application is defined.
> Use Run|Parameter..." error.

A Package is a DLL with native VCL support built-in.  AAs such, it cannot be 
executed as a standalone process of its own.  It needs to be loaded into 
another process.

> Can somebody please tell me what .exe (host application)
> should I select?

Whatever .exe is going to be using your package at runtime.

-- 
Remy Lebeau (TeamB)
0
Remy
6/30/2010 6:34:48 PM
k
1
banana
6/30/2010 6:55:52 PM
> {quote:title=Remy Lebeau (TeamB) wrote:}{quote}

> > Can somebody please tell me what .exe (host application)
> > should I select?
> 
> Whatever .exe is going to be using your package at runtime.

Thanks Remy but I am not sure what I am supposed to use. Should I point to C:\WINDOWS\system32\cmd.exe      OR         C:\WINDOWS\system32\regsvr32.exe     OR        C:\Program Files\CodeGear\RAD Studio\5.0\bin\bds.exe

Below is the sample code I was talking about......please suggest!
{code} 
#include <vcl.h>
#pragma hdrstop

#include "DateDisplay.h"
//---------------------------------------------------------------------------
#pragma package(smart_init)
#pragma resource "*.dfm"
TForm1 *Form1;
//---------------------------------------------------------------------------
__fastcall TForm1::TForm1(TComponent* Owner)
	: TForm(Owner)
{
}
  void __fastcall TForm1::Button1Click(TObject *Sender)
{
  DateSeparator = '-';
  ShortDateFormat = "m/d/yyyy";
  Label1->Caption = DateToStr(Date());
} 
{code}

Thanks,
KF
0
Korn
6/30/2010 6:56:53 PM
<Korn Find> wrote in message news:256354@forums.embarcadero.com...

> Thanks Remy but I am not sure what I am supposed to use.

Why are you creating a Package in the first place?  Presumably, you have 
another .exe project that you intend to load the package and display its 
Form.  That is the .exe that needs to be the Host when debugging your 
package.

> Should I point to C:\WINDOWS\system32\cmd.exe
> OR         C:\WINDOWS\system32\regsvr32.exe
> OR        C:\Program Files\CodeGear\RAD Studio\5.0\bin\bds.exe

None of the above.  You need to specify the .exe that is going to be 
directly using your package.

>  void __fastcall TForm1::Button1Click(TObject *Sender)
> {
>  DateSeparator = '-';
>  ShortDateFormat = "m/d/yyyy";
>  Label1->Caption = DateToStr(Date());
> }

If you want to format a TDateTime in a specific way, then you should use the 
TDateTime:::FormatString() method instead of trying to coherese DateToStr() 
to use your format, ie:

{code:cpp}
void __fastcall TForm1::Button1Click(TObject *Sender)
{
    Label1->Caption = Date().FormatString("m'-'d'-'yyyy");
}
{code}

-- 
Remy Lebeau (TeamB)
0
Remy
6/30/2010 7:45:52 PM
Typically you will have an application in your project group.  When you start the debugger, there needs to be an active .exe to run.  Instead of creating a package, try creating a new VCL forms application and add your forms directly to it.
0
Joshua
6/30/2010 11:50:07 PM
Thank you all guys......I got it working..........
0
Korn
7/1/2010 12:45:41 PM
Reply:

Similar Artilces:

eff you dephi support- cannot run project unless a host application is defi
Well I am a long time user of delphi 3 5 and 7 ( and liked 5 the best) and truthfull never upgraded because all I wrote were .exe ( I am a lower mid level programmer with 10+ years experiance) I deciteted to look at deplhi XE particually becaue I wanted to try the vcl for web intrweb stuff. I got and error when trying to run "cannot run project unless a host application is defined intraweb" so I called support I did not realize this was a .dll I figured this would be tranlated to html or something. TO make a long story short the tech was rude, chewing gum in my ear. acted ...

ASP.NET Project running an exe on local host level but do not when same project runs after virtual directory.
I have an asp.net project in which thereis a button on which some exe runs which resides in my computer only using System.Diagonistics.Process.Start("path of exe"); When I am running project on localhost through .net run utility then on pressing that button exe runs smoothly but after making virtual directory of the same project and then if i run that project by typing complete address in address bar then that particular button is not performing its function thus exe is not running . i have already tried to display the whole path in a label on both levels : localhost and after ma...

running my project as an application
While building my project to run as stand alone application, I un-checked the "build with runtime packages" in Project->option->packages. However when I run the application on a PC where Borland is not installed, I get following error while running the "myproject.exe": "Application failed to start beacause BORLNDMM.DLL not found" Can somebody help ? Thanks DK You need to turn off the option to link with "Dynamic RTL". -- Malcolm Smith MJ Freelancing http://www.mjfreelancing.com Associate Editor C++Builder Developers Jour...

Basic project runs from VS2008, not on hosted server
Hi, I'm playing around with the new MVC stuff. I've created just a basic application from the templates with a Home and About. It works fine when running from VS2008 RTM. When I publish and move the files to my hosting server (webhost4life, .NET 3.5 installed, running from a sub-domain) the application opens, but clicking on the About link shows a 404 error. Other than the .cs files, everything is there. What else can I check?  Thanks, James Do you have the <system.webserver> tags still in place? Do you know if they're running IIS6? It's a URL routing issue fo...

how can i run asp.net project in google chrome? OR how can in run iis 6.0 deployed web application in google chrome?
Hi, i need to run iis 6.0 deployed website in google chrome and i need to run my vs2005 web project in google chrome how can i? please helpThanks & Best Regards,-------------------------Muhammad Kashan KhanSr. Software Engineer &Freelance Software DeveloperEmail: itskashanhere@hotmail.com"OH MY ALLAH!, Grant me the serenity to accept the things I cannot change, Courage to change the things I can, and Wisdom to know the difference!" Hi, and welcome to the ASP.NET forums. You don't run a webform in a browser, of which Chrome is one, but rather render the output tha...

Unable to run the Application on the host.
Hi I am trying to run my application on the web host but it is not working, although it is working on my local machine. I get this  error     ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------  Runtime Error Description: An application error occurred on the server. The current custom error settings for this application prevent the details of ...

Getting my application to run on the host...
I currently have to add an <identity impersonate.../> tag to my web.config in order to authorize my application to run on my server. Is there another way to do this, or, to encrypt the information in the <identity impersonate.../> tag? I currently have the admin userid and password hard coded in there! I obviously do not like that!http://www.geneangelo.com Hello, I am assuming that you are using impersonation because you are accessing resouces for your site using windows authentication (for e.g. you are accessing your SQL server using your windows identity). A way around that ...

Visual Studio 2005 Install Problem
Hi all, I have just rebuilt my XP machine and installed Visual Studio 2005. When trying to open previously created projects I get the following error message: The application for project <project> is not installed. Make sure the application for the project type () is installed. At this point I did some reading and googling and discovered that 'Web Application Projects' is not included in the base Visual Studio 2005 package. I installed Service Pack 1 (SP1) expecting this to fix the problem, however I still received the same error message when trying to open the application. ...

In ASP.NET Project an exe is running at localhost level on a button click event but do not runs after I make virtual directory of same project and runs it at internet level
I have an asp.net project in which thereis a button on which some exe runs which resides in my computer only using System.Diagonistics.Process.Start("path of exe");  When I am running project on localhost through .net run utility then on pressing that button exe runs smoothly but after making virtual directory of the same project and then if i run that project by typing complete address in address bar then that particular button is not performing its function thus exe is not running . i have already tried to display the whole path in a label on both levels : localhost and aft...

Can I open a Web Project application after I install Web Applications Projects?
I have installed the Web Application Projects addin to my VS 2005.  I have used it to convert a web application that was written in VS 2003 to VS 2005. Now I want to open a Web Project application written by another developer on our team.  The Web Project is save in SourceSafe.  When I try to open the Web Project from SourceSafe I get an error "There are no solition or project files in the this location.  Please select a different location".  Am I geting this error because I have the Web Applications Projects installed?  Do I have to uninstall it to work o...

SQLCA works when application runs in PB not when application is run with Powerbuilder WDK.
Hi, My applications with out SQLCA run great through Powerbuilder WDK, my applications that contain SQLCA information doesn't. When I run the application in PB I get a splash screen and then the application starts. When I run it through PB WDK the splash screen starts and the I get a login box. No matter what I do it always show's up and when I hit OK I get the following SQLSTATE = 08001 error. How can I stop this from occurring? The SQLCA code and ini file are below. code: startupfile = "pds.ini" /* Populate sqlca from current PB.INI settings */ sqlca.DBMS...

Application as Service is an advanced system utility which lets you run any application as Windows 2000/XP/2003 Service at system boot. Specify application priority, run your program without the need
Application as Service is an advanced system utility which lets you run any application as Windows 2000/XP/2003 Service. You can easily configure Application as Service using its intuitive GUI interface or command line configurator directly from your software. Application as Service features very low CPU usage, custom environment variables, monitoring and detailed logging as well as many other features. You can use Application as Service software to: Launch any application as Windows 2000/XP/2003 service at system boot, before user logon; Automatically start applications before and after ser...

Application Error when running from Godaddy hosting
I am getting following error, my config file is attached below. Anyone point me in right direction? Thank you in advance Mon         Server Error in '/' Application.   Runtime Error Description: An application error occurred on the server. The current custom error settings for this application prevent the details of the application error from being viewed remotely (for security reasons). It could, however, be viewed by browsers running on the local server machine. Details: To enable the details of this specific error message to be...

Running NCS on Xen Host (dom 0)
According to the docs you can install NCS on a Xen "host" and use Novell clustering to manager virtual machines as cluster resources. This sounds doable but... The question is this.... According to the docs, iManager is the utility that you use to manage a Xen Host based Novell cluster except, again, according to the docs, Novell doesn't support running iManager on the Xen host. So, how does one manage a cluster from the xen host if you can't install iManager on the Xen host. My first thought was that I could run the clustering plugins from iManager mobile bu...

Web resources about - Cannot run project unless host application is defined - embarcadero.cppbuilder.cpp

Application - Wikipedia, the free encyclopedia
Text is available under the Creative Commons Attribution-ShareAlike License ;additional terms may apply. By using this site, you agree to the ...

Welfare experiment may have applications in Australia
A trial in Finland providing an obligation-free basic income could change how we think about welfare.

Apple patent application reveals exciting possibilities for twin-camera system rumored for iPhone 7
We heard a report in November that Apple was testing an iPhone 7 model with dual rear cameras , and a patent application published today not ...

Seagate Introduces First 8 TB Hard Disk Drive for Consumer NAS Applications
Seagate Technology on Tuesday introduced its new breed of hard disk drives (HDDs) for network area storage (NAS) and RAID applications. The new ...

Panasonic Develops a Stretchable Resin Film and Its Application Materials for Stretchable Electronics ...
A stretchable film is developed. This film stretches to 2.5 times the original length and then returns to the original form. A conductive paste ...

MBA: Mortgage Applications Decreased Over Two Week Period in Latest MBA Weekly Survey, Purchase Applications ...
From the MBA: Mortgage Applications Decreased Over Two Week Period in Latest MBA Weekly Survey Mortgage applications decreased 27 percent from ...

Mortgage applications rebound
Mortgage applications increased 21.3 percent on a seasonally adjusted basis, for the week ending January 8th, versus previous week,

SURPRISE! Mizzou Sees Application Drop After Days Of Protests, Illusory Klan Hoods, Poop Swastika
SURPRISE! Mizzou Sees Application Drop After Days Of Protests, Illusory Klan Hoods, Poop Swastika

In Application To Move To Los Angeles, Rams Shit All Over City Of St. Louis
... to relocate to the greater Los Angeles metropolitan area. The relocation would be effective for the 2016 NFL League Year.” The Rams’ full application ...

Panasonic touch panel production to be solely for vehicle applications by 2020, says report
Panasonic is aiming to transfer its touch panel production completely to vehicle applications by 2020 in order to meet increasing demand for ...

Resources last updated: 1/15/2016 12:06:34 AM